Drupal Fun: Auto generating playlist thumbnails from videos

Nov 20th, 2011 | By | Category: Linux / Freebsd

Another exciting hurdle crossed in the Drupal world!  I’ve recently installed the Mediafront module to drupal so that I can have dynamic video playlists for specific users based on content being uploaded in their name.  It took a tiny bit of fiddling to get it all setup in views, nothing worth mentioning here that’s not mentioned all of drupal.org, but the real fun came from the need to have the thumbnails that appear in the playlist section of the player be automatically generated.   You see right now the only way to get your video playlist to have thumbs in it is to upload them manually and attach them to the video node they are associated with.  Pffffftttt I say to that!  This manual stuff is for the birds and doing things by hand sure as hell isn’t what I signed up for so we need to make a better way.

Introducing Media Mover!

If you don’t know what Media Mover is then you’re missing out.  This module is probably one of the most badass ones around depending on what you are using drupal for.  In this current situation it’s going to be our saving grace!  So I’m assuming that by this point you have your video content type setup, you are uploading videos just fine and they are showing up equally well in your Mediafront playlist as per your custom view that you’ve created to display them.

What you need to do now is to open up your video content type and manage the fields.  You are going to need to add a new file field with an image widget selected from the drop down list.  Call it thumbnail or something along those lines and add it into the mix.

Now you are going to need to download ffmpeg_wrapper and media mover and install all of the relevant modules.  Oh  I am also assuming that you have image cache enabled and all setup(who doesnt?) After this you need to go into media mover and create a new configuration which is going to automatically extra a thumbnail from our video and then put that in the thumbnail CCK field you would have created as per the instructions at the end of the previous paragraph, aka: Media Mover CCK module: Save data in a CCK field.  Choosing the thumbnail cck field to save it as.  I made the mistake here the first time of attaching my thumb to the node but that doesn’t work, it needs to go into that cck field that you created.

You can completely bypass the ‘complete’ operation of media mover as it’s done everything you need it to do and that’s it!  You should be able to run it and have it pull up any stray files that already haven’t been taken care of… You kmight want to go into display fields and hide the thumbnail field so it doesn’t show up when people go to the node.

Tags: , , , , , ,

One Comment to “Drupal Fun: Auto generating playlist thumbnails from videos”

  1. Richard says:

    Hi I have had a look at your tutorial which has been helpful but unfortunately leaves out some very big key steps to get this to work.
    I followed your tutorial step by step and ran into the following any suggestions on how to resolve these two obstacles would be very helpful and gratefully received.
    1. Image Cache is part of core in Drupal7
    2. FFMPEG is required but there is zero documentation on how to set this up just lots of issues posted on this subject.

Leave a Comment