Support » Plugin: Video Embed & Thumbnail Generator » Control over thumbnails

  • Hi, this is an excelent plug-in filling out a huge gap in video embedding throughout WordPress.

    It might be already solved, but I’ve just started using the plug-in. My doubt is: can we have complete control over the thumbnails? Let’s say I want to retrieve 30 thumbnails out of the uploaded video and create an image sequence out of it, how would I do it?

    Every help is appreciated.
    Thanks in advance, guys.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Kyle Gilman


    Interesting. You could do that now by monitoring your current uploads folder (presumably wp-content/uploads/2013/02) and downloading everything from the thumb_tmp folder after you’ve created the thumbnails but before you choose one. I could also figure out a way to add this as a function of the plugin. My first thought is a “Save All” button that would add all the generated thumbnails to the WordPress CMS as attachments of the video. Then you could make a photo gallery out of it using a gallery shortcode or whatever else you’d like to do with them.

    The “save all” function would be a great addition! Because I’m precisely trying to use only the thumbnails, no video, so using the plug-in as a seamless medium to create an image sequence out of a movie. Do you think this is hard to develop? I have little php knowledgment…

    Sorry go get back at this.

    Just wanted to inform you I was successful doing that, by deleting the function that deletes the thumb_tmp files after one hour and then grabbing all images in the folder for the post. It’s not a genious way to do it, but it worked for my pursposes. I’m having a hard time though, because I now want to have more control over these images. I noticed they are displaying with a very low jpeg quality. I want to make the thumbs bigger and better their jpeg compression. Where in the code can I change this?

    Thank you for the great plug-in, once more!

    Plugin Author Kyle Gilman


    I don’t know about making them larger. They should be the same size as your video, so there’s no point increasing the resolution. But I’ve just done a little bit of investigating and it looks like I could boost the quality of the JPGs using the -qscale flag. I’m going to do that in the next release (I won’t have time to make your “save all” button for this one) but for now find line 2035:
    $ffmpeg_options = '-y -ss '.$movieoffset.' -i "'.$moviefilepath.'" '.$movie_rotate.' -vframes 1 "'.$thumbnailfilename[$i].'"';

    and change it to

    $ffmpeg_options = '-y -ss '.$movieoffset.' -i "'.$moviefilepath.'" '.$movie_rotate.' -qscale 2 -vframes 1 "'.$thumbnailfilename[$i].'"';

    the lower the number the higher the quality. 1 might generate excessive file sizes.

    Thanks, the -qscale tip was really helpful.
    Might help other users to know the scale moves from 1 (highest) to 31 (lowest).

    As for the size, let’s say I don’t want to make them bigger, which as you said, makes no sense, but constrain it to no bigger than a given size (e.g. iof a user uploads a full HD video, constrain it to 800 px height for example?


    Plugin Author Kyle Gilman


    I think the simplest system would be if you add all the thumbnails as WordPress attachments. That way WordPress will automatically generate “medium” and “thumbnail” versions of all the images. And you can easily make galleries out of them. The Add From Server plugin would probably help you out a lot.

    It would take a bit more programming to limit the size of the generated thumbnails. It’s not an easy fix like adding qscale unless you can count on all of the videos being the same aspect ratio and resolution.

    By the way, I did some more testing and I think -qscale 1 is the best choice. The file sizes don’t seem to go up much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Control over thumbnails’ is closed to new replies.