Search code examples
codeigniterffmpeg-phpvideo-thumbnails

get image from uploaded video codeigniter


I am using Codeigniter to develop a website in which one of the features is to upload videos to a folder. There will be a gallery that contains several thumbnails corresponding to each video. Those thumbnails would work as a links to the corresponding video.

I created the gallery following this tutorial(code is available here):

Only changed the accepted files and added to the htaccess these lines:

php_value upload_max_filesize 100M php_value post_max_size 100M

Here is my question: is it possible to use the present code to get the thumbnails (because I can do that if I upload images) or do I have to use ffmpeg or similar.


Solution

  • You will have to use FFMPEG-PHP (or similar) to get a thumbnail from a video.

    Part of this guide explains how it's done: https://arjunphp.com/upload-video-convert-flv-using-ffmpeg-codeigniter/