Extract frame from video - PHP-FFMpeg -
i using php ffmpeg in laravel project, multiple things probe, extract frame , encode. having issue when creating frame uploaded video file. how frame created:
$video = $ffmpeg->open($destinationpath.'/'.$filename); $video ->frame(ffmpeg\coordinate\timecode::fromseconds(10)) ->save(public_path().$frame_path);
this working , creates frame other times not. noticed bug comes when trying open .mov file.
it's possible version of ffmpeg not support codec used in source video file, , hence not able decompress video , extract image.
you try processing file command line see if can extract image way, , ffmpeg may give more information on problem.
an example command line extract png frame video file
ffmpeg -y -ss 30 -i [source_file] -vframes 1 [target_file]
add -f image2
output option if output name variable.
Comments
Post a Comment