One of the features I LOVED about Acidfree was that it could do automatic video thumbnailing for me. I have modified the video_image module to include an option for this. In the settings menu, it has the following options now:

1) promote thumbnail images to front page
2) auto thumbnail videos using mplayer
3) use auto thumbnail exclusively (no user supplied images)
4) set the path to mplayer

Try out the patch and let me know what you think. It is on my list of things that video must do in order for me to make Acidfree use Video instead of its own node types.

Comments

vhmauery’s picture

One thing I noticed while playing with this patch was that I had to set the weight of the video_image module in the system table so that it would execute its hooks AFTER the video_upload module. So I did something like this:

mysql> update system set weight=1 where name='video_image';

That ensures that this module will see the video_upload module's file so it can thumbnail it.

seaneffel’s picture

I would love it if this patch could get some attention and added to the video_image module. Steps for us at CCTV to post a video require us to screenshot the video manually for each movie we upload, and I'll tell you we have tons of videos to manage.

Is it possible to supply a patched module file for me to test? Our macs at our station don't have a patching utility, one of the short comings of apple...

Thanks very much!

fax8’s picture

@seanjuan

you need to be able in patching apply and creating if you want to help with development.

I'm sure you will find lot of documentation on the web on using patch/diff on mac machines.

Fabio

vhmauery’s picture

StatusFileSize
new10.03 KB

Fabio,

Here is an updated version of this patch that applies on CVS on top of the udpates to head patch found in http://drupal.org/node/82224

--Vernon

vhmauery’s picture

StatusFileSize
new12.24 KB

Here is a new and improved patch. There are a couple of key improvements:

  • No longer make the check for Image module -- since this is now done in the .info file using the 'dependencies' line.
  • Use the default settings for Image nodes 'publish' and 'promote' settings if no preferences for video thumbnails are set on the admin/content/video/image page.
  • Automatically updates video_image weight in {system} table so its hooks get called AFTER video_upload and can therefore have access to uploaded videos to thumbnail them.

This has been tested on my machine and works great. Please review and apply.

jake28’s picture

I was really looking forward to testing this, but realized cvs is now version 5.0. Any pointers on getting this to work with 4.7? I'm running 4.72 and would love this feature. I'll test your other patches done for 4.7 in the meantime.

fax8’s picture

I;m now trying this patch.. however I was not successful in it..
It seems to doing nothing.

I'm just using video core with patched video_image. I active the auto thumb in settings.

Any hints?

Fabio

vhmauery’s picture

Just to make sure things are working how I intended, could you make sure that the video_image module's weight in the {system} table was updated to be greater that the weight of the video_upload module? The reasoning is this: the video_upload module sets the stage by putting the file information in the session. The video_image module checks to see if there is an uploaded file in the session that it can thumbnail. By default, the modules get their hooks done in alphabetical order, so the video_image module would go first and not see the uploaded file. So by changing the weight, we make sure that it runs its hooks AFTER the video_upload module so it will always see the file.

I have tested this patch over and over. :) Some days I have considered throwing it out. Do you have mplayer set up at the right path? Does mplayer have all the necessary codecs?

Would it be useful to have an option to turn on that would allow for some debugging information to help determine the problem? Maybe I will work on that and post it.

fax8’s picture

mmm... I tried this morning without changing anything and started working.
Images are now generated correctly. Really a good work.

Would it will be possible to use also ffmpeg to generate the thumbnails?
I'm asking because I think that it will be the backend we will use for automatic
conversion to other formats (flv like youtube) so we can support both ffmpeg and mplayer.

Is it possible to generate thumbs also on not uploaded videos?

Is it possible just not get the first frame of the video?
Imagine a website of movies.. usually the first frame is just black!
Maybe the user could specify the frame to get the thumbnail or
the script can set it to 2/3 of the lenght..

Fabio

fax8’s picture

in the settings page admin/content/video/image you are talking about Acidfree...

If user does not have acidfree installed he should not see that note.

Fabio

vhmauery’s picture

StatusFileSize
new12.91 KB

Okay, I removed the Acidfree reference. :) But really, people should use Acidfree because it r0x. Their loss if they don't I guess.

I updated it to have a nicer settings form (added a fieldset for the auto thumbnail stuff) and added some new features -- a debugging option and seek offset option for where to grab the image.

I also updated it to use ffmpeg rather than mplayer. It turns out that ffmpeg is faster and easier to script. Good idea.

fax8’s picture

Really a good work, Vernon.

Committed to CVS.

Thanks.

Fabio

p.s.: don't worry.. as soon as we will have released video and acidfree for drupal 5 we
will advise the cool things that it can do together.

fax8’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
spooky69’s picture

I wanted to get auto-thumbnailing working for 4.7 and saw a patch on this site for the video_image.module that indicated it would allow auto-thumbnailing, but it does not work (no thumbnails are created). Does anyone know how to incorporate auto-thumbnailing into the 4.7 version? Subsequent to applying the above patch, I now get the following when I click on administer/video_image:

warning: Missing argument 2 for drupal_get_form() in /hsphere/local/home/accountName/domainName.com/includes/form.inc on line 61.

Did anyone actually get auto-thumbnailing working with 4.7 and, if so.... help !

spooky69’s picture

Any help on this issue guys? Again, I was under the impression that the above patch would introduce auto-thumbnailing but I still get the above error when trying to access video_image. Help would be appreciated.

doc2@drupalfr.org’s picture

Mac users: Mac OS X ffmpeg installation for Video:
http://drupal.org/node/151449