50 thoughts on “FFMPEG & PHP: Get Thumbnails (Screenshots) From Video

  1. can you make a video on uploading a video and having ffmpeg do the conversion to mp4 like youtube does? thanks that would be real helpful. your videos are pretty good. Keep up the great work…

  2. Thanks for your excellent tutorial~
    I would like o create a video file from multiple images
    And I have a cmd "ffmpeg -i video.mpg image%d.jpg"
    But I don't know how to use this~
    Could you help me?

  3. AWESOME !! BUT, I had some problems getting the posted files.. 
    After googling for about an hour, i found out that i had to change max file size and/or upload max size under php.ini . 
    🙂 |Great TUT !!!! Thanks.

  4. Hi, Abell12, it does not work for me. It say thumbnails created by i can't find the image in the folder. Please help! I follow each step, install…., download the code, try with the down load code and the picture not creates in the path.  Thank you!  

  5. For multiple thumbnails, better to use 'fps' param in conjunction with '-frames:v', as in

    $totalTumbnails = 10;
    $cmd = "{$ffmpeg} -ss {$getFromSecond} -i {$videoFile} -an fps=fps=1 -frames:v {$totalTumbnails} -s {$size} {$imageFile}";

    with -ss option before -i for better performance.

  6. hi abell12, when i upload the video it says thumbnail created but when i look for the thumbnail in folder theres no thumbnail.. i even download the code from website to make sure there werent any errors

  7. You can do if you have your own server or have shell access on Linux, which I don't think you would have.
    There is a perl extension which I'm planning on doing a video on, and maybe looking into other ways to get it working for many hosted websites.

Leave a Reply to 5p3ctr3 x Cancel reply

Your email address will not be published. Required fields are marked *