0

Unable to set the size of image frame so I am unable to use thumbnail size.

$video = $ffmpeg->open($videoFile);
$video
    ->filters()
    ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
    ->synchronize();
$frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(1));
$frame->save('C:\wamp64\www\woc\image_bucket\thumbnail\\'.$thumbnailFileName);
Tester
  • 35
  • 7

1 Answers1

1

If you want to generate thumbnail using command, you should try this :

ffmpeg -i INPUT.mp4 -an -ss 1 -y -s 320*240 -vframes 1 OUTPUT.png 
  • ss : set the start time offset(Screenshort time)
  • an : disable audio
  • vframes : set the number of video frames to record
  • s : set frame size
  • y : overwrite output files
Pooja Jadav
  • 279
  • 1
  • 3
  • 17