Reputation: 1438
Is there a way to generate a thumbnail image from mp4 files on my server?
Do i have to read the complete file for a thumbnail, or is there a way to just get the video information , seek to the frame at middle of the video and take that frame as a thumbnail?
Any Help or example is highly appriciated
Upvotes: 0
Views: 309
Reputation: 118
Take a look at:
https://github.com/PHP-FFMpeg/PHP-FFMpeg
Documentation is great and you probably want:
$frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(42));
$frame->save('image.jpg');
Upvotes: 3