Reputation: 1860
Is there any way to create multiple thumbnails from a video through php? I don't have ffmpeg installed in my hosting account's web server. What should I do now?
Upvotes: 2
Views: 994
Reputation: 11
You have to install FFMpeg package in your server, only then you'll be able to create your required thumbnails for the videos. You can find out the installation process and do follow the steps.
Upvotes: 1
Reputation: 197757
You have two options with ffmpeg (after you have made it available on your server) to create multiple thumbnails:
Depending on how many thumbnails you want to create, the one method is faster than the other or vice versa.
For commandline examples, PHP code and speed comparison please see the following blog post: Capturing multiple thumbnails from a movie using ffmpeg.
If you don't have ffmpeg installed on your server, you need some other library/tool that is able to extract thumbnails from videos. However I would say, when something is offered, it's ffmpeg and not something else (e.g. apple quicktime), so I would not look much around for alternatives.
Upvotes: 0
Reputation: 5707
Assuming the videos are hosted on your own server, your best bet would be to request that ffmpeg be installed by your hosting provider. If the videos are hosted by a third-party such as YouTube or Vimeo, you can use their APIs to request the thumbnails (see How do I get a YouTube video thumbnail from the YouTube API? for an example of Youtube thumbnail handling).
Upvotes: 0