The FlashVideo CCK Plugin

Previous to version 2.2, the FlashVideo module aimed to create a very simple user interface for uploading videos by placing all video conversion configuration within the FlashVideo Settings, rather than within the actual node creation. Although this did allow for easy video submittal, it lacked in the ability to allow for node specific video conversion configurations. What this means is that in order for you to specify any conversion configurations, you must do so by changing the configurations within the FlashVideo Settings and NOT when you actually submit your new node. The FlashVideo CCK Plugin aims to solve this problem by using the power of the Content Construction Kit to define standard fields that will be used to override each of these default FlashVideo Settings when you submit or update each node! Listed below is just a sample of what this new feature allows you to do...



With the FlashVideo CCK Plugin, you can now...

  • Allow your users to customize how many seconds to delay before taking the image snapshot of their video when they submit their video.
  • Regenerate your video using different conversion commands, or even a different conversion application besides ffmpeg without changing the whole node type and then uploading again.
  • Regenerate your thumbnail after realizing that the snap-shot provided is not good enough.

Below are the fields that you can create using CCK to override the FlashVideo functionality. Please note that each parameter MUST be labeled the same as below, otherwise the FlashVideo Module will just ignore it. Also, for all these parameters, the same format should be used as in the FlashVideo Settings. Please Note: You must enable this module in the Modules Section in order to utilize this plugin.


Parameter NameTypeDescription
flashvideo_regen_thumbIntegerUsed to allow the node editor to regenerate the thumbnail after an edit.
flashvideo_regen_videoIntegerUsed to allow the node editor to regenerate the video after an edit.
flashvideo_output_dirTextUsed to command the output directory. This is relative to the system files directory.
flashvideo_cmd_pathText Used to specify the CWD path to the conversion utility executable. Be sure to include the executable in the path. Example /usr/bin/ffmpeg
flashvideo_video_argsTextThe arguments given to the conversion utility executable to generate a video. The same format should be used as in the FlashVideo Settings.
flashvideo_thumb_argsText The arguments given to the conversion utility executable to generate a thumbnail. The same format should be used as in the FlashVideo Settings.
flashvideo_thumbsizeTextThe thumbnail size specified in the following format "WIDTH x HEIGHT". Example 130x100
flashvideo_thumbwidthIntegerThe integer representation of the thumbnail width.
flashvideo_thumbheightIntegerThe integer representation of the thumbnail height.
flashvideo_thumbtimeTextThe amount of time to delay before taking a snapshot of the video. Denoted as "00:00:00"
flashvideo_thumbsecsIntegerThe amount of time in seconds to delay before taking a snapshot of the video.
flashvideo_thumbextTextThe extension of the output thumbnail. Example: For JPG's this would be jpg
flashvideo_videoextTextThe extension of the output video. Example: For output FLV's, this would be flv
flashvideo_videomimeTextThe mime type of the output video.

After you have created these custom CCK fields for your node type, you will then have complete power over the FlashVideo Conversion routine during node insertions and updates! Enjoy the new enhancements!

flashvideo cck

Can anybody explain step by step how to regenerate a thumbnail

I just did this:
1-. create an integer field named flashvideo_regen_thumb (I tested both, check box and select list)
2-. create a text field named flashvideo_thumbtime

When I checked the flashvideo_regen_thumb check box, or select list option (0 or 1), the thumbnail created when I uploaded the video is erased and no other thumbnail is created

What' s happened?

Thanks a lot for your help

not working?

So I created a text field and used the "flashvideo_thumbtime" parameter. I go to create a new video and it seems like it's working since the default thumbtime value (2 seconds) is there. I change the time and submit the new video. However, upon running the cron job, the ffmpeg command is still using 00:00:02! What's wrong?

Not working??

whoops, double post

I don't understand, where do

I don't understand,
where do you put the "flashvideo_thumbtime" or the "flashvideo_regen_thumb"

I've created a widget type CheckBox called flashvideo_regen_thumb
but where do you put the flashvideo_regen_thumb ?

I really would like to be able to regenarete the thumbs :)
and set a new thumb time :)

All you need to do is use

All you need to do is use CCK to create a checkbox with the ID called "flashvideo_regen_thumb".... then when you submit a new video, you will see that field show up where you can just place whatever time you like.

Let me know if this helps.

Travis.

Kind of fixed it...

I had to create two fields

one:
checkbox (Check boxes/radio buttons) "flashvideo_regen_thumb"
with the options (allowed value list)
0|no|selected
1|yes

and two:
a textfield "flashvideo_thumbtime"
where you can put the amount of seconds where you want to get the thumbnail from

Is this the correct way ?
I don't know if it works with just one of the fields ... but I don't dare to touch it now anymore :-)

Still some bugs (non critical)

Still some bugs:

In the "content types" > "display fields" the teaser and full diplay "9999"...
I had to put both of these on "< hide >"

really great stuff

Hey thanks a ton for making this. I'll get to my main question first and then something I was just thinking about.

I have come upon a roadblock. I want to use Views to group my latest videos by date. Unfortunately atm views only supports lists and tables for this. This means I have to recreate most of the teaser view by using fields. However Views does not offer me a thumbnail field that will link to the node. You can create text links to node but I can't call the thumbnail.

You have all these great fields for CCK but what about "normal" fields. Say I want to create a Node where the user doesn't have to place [video] in the body. So I need a field that does that for me. I hope I am making sense. To be concise:

Use CCK to allow upload of the video but have fields that take care of adding [video] to the content type and also providing a field for thumbnails so they can be used in a list view type.

What I was pondering is, how many videos do you think this can hold before you see a performance slow down? Does You Tube and sorts use a database scheme or do they do hardfiles?

I am not sure how YouTube

I am not sure how YouTube does this...  but I think I can present a solution for you.
As for always having the [video] in the node when you submit your node, you need to look into the Content Template module to create a template for your node and teasers. I do this at the following link http://www.travistidwell.com/node/8. As for creating a view that is a table that includes the thumbnail, I have actually done this before as well, but had to use PHP in my page to do it. You can use the very handy theme('table', $header, $rows) to construct your table...again I use this theme when I describe how to make a table of links at http://www.travistidwell.com/node/43. This will at least give you a general idea of how to construct the links table. Now all you have to do is just call the API function flashvideo_get_thumbnail in on of the columns and then you are all set.
If you are not familiar with PHP, I will actually do this for you for a small fee. Just contact me using my contact page and let me know if you are interested.
Thanks, Travis.

video node

ok that makes sense. now what i need to figure out is how to extract info into the node body like duration time, download link, and tab with comments.

yeah how ?

Interesting for me too