0

I am using a below repo via composer everything works well but i have a problem extracting the image as a poster ( thumbnail )

https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming#extracting-image

I used below code.

$video = $ffmpeg->open('./videos/example1.mp4");
$frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(51));
$frame->save('/var/media/poster.jpg');

But got an error below using mac os

Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-ss' '00:00:51.00' '-i' './videos/example1.mp4' '-vframes' '1' '-f' 'image2' './videos/example1/poster.jpg': Error Output: ffmpeg version N-109428-g10a56363a7-tessus https://evermeet.cx/ffmpeg/

Just want to know what is missing, i have already run chmod -R 0777 . to have a sufficient permissions.

Sarotobi
  • 707
  • 1
  • 9
  • 28

0 Answers0