Answer the question
In order to leave comments, you need to log in
Question about using FFMpeg library in Laravel?
Hi all! I have a question about using the FFMpeg library in Laravel.
How can I get several videos of different qualities from one video?
The code itself:
$video = $ffmpeg->open("D:/PROfit/PHP/htdocs/VideoTasc/public/file/".$fileName);
$frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(37));
$name = explode('.',$fileName);
$n= $name[0];
$frame->save('img/'.$n.'.jpg');
Answer the question
In order to leave comments, you need to log in
The given code has nothing to do with the task.
Here is an excerpt from the documentation
FFMpeg::open('my_movie.mov')
// export to FTP, converted in WMV
->export()
->toDisk('ftp')
->inFormat(new \FFMpeg\Format\Video\WMV)
->save('my_movie.wmv')
// export to Amazon S3, converted in X264
->export()
->toDisk('s3')
->inFormat(new \FFMpeg\Format\Video\X264)
->save('my_movie.mkv');
// you could even discard the 'toDisk()' method,
// now the converted file will be saved to
// the same disk as the source!
->export()
->inFormat(new FFMpeg\Format\Video\WebM)
->save('my_movie.webm')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question