Create your page
Ok, here's the fun part! Now that we have everything in place to submit, convert, and view our video, lets create a node that will actually do it! We need to first enable the FlashVideo module for whatever node type in the Drupal system. We will just make it easy and enable the FlashVideo module for the Page node type. Go to Administer->Site Configuration->FlashVideo Settings, and then select the link that says FlashVideo Settings for this node type next to the Page node type. Once you are in there, you will want to check the box that says Enable the FlashVideo for this node type. And thats it! You are ready to go.
Let's now click on the link that says Create Content, and then click on Page. Do you see what I see? You should notice that the upload module now sits at the top of the page, and has been renamed to "Video Upload". So, let's do just that. Select a video from your local hard drive (preferably one under 5 MB), and then hit Attach. You will then see the gif progress bar image show up, telling you that your video is uploading. While it is uplaoding, lets place our Video tag in the Body of the node. Simply type [video] anywhere in the Body of your node. When the video is finished uploading, you can then hit Submit at the bottom of the form.
You should then see a preview of your node... but wait!! No video? It just says, "Video is currently not available". Well, remember our cron tasks? Your video will not show up until the cron task has had time to convert your video and create a thumbnail. If you set up your cron task for 5 minutes, then you will just have to wait 5 minutes. However, if you are extremely impatient like me, then you can just simply go Administer->Logs->Staus Report and click on the link that says Run cron manually. You should see it think for a little bit, but once it is done, go back to your node! Egads! You have just embedded flash video in your website! Pretty easy, huh?
If you would like to see what this tutorial looks like in real life, then I have actually implemented it my EasyFilter module section at http://www.travistidwell.com/easyfilter. Check it out and see for yourself how easy this really is! Also, if you have found this tutorial helpful, or would like to show your appreciation for the module which I submitted, please feel free to
- Step 1: Get FFMPEG
- Step 2: Set up your php.ini file for FlashVideo
- Step 3: Get the FlashVideo Module
- Step 4: Download Joroen Wijering's Flash Player
- Step 5: Set up a Cron Task
- Step 6: Create a Content Template.
- Step 7: Create your Page! <-- You are here!
- Troubleshooting the FlashVideo Module




flashvideo thumbnail cck field
hey there,
so im creating a video, and i see i get a nice flashvideo cck field to display the video. why isnt there a thumbnail field? am i missing something?
How do I get rid of Video Module and switch to FlashVideo?
Oh well. You know, I have a site running on Drupal 4.7 and uses Video Module. I problem came out where I can't upload videos without worrying if they are going to be deleted by the same module, so I teached the user to upload videos through FTP and to add the content with video module.
Sincerely I want to get rid of Video Module and Drupal 4.7. So I'm looking for options. So far I think I have found everything I need to start using Drupal 6 except the video problem. I read that you need to run a cron job in order to add a video, that really puts me off! Since I don't want the user to give admin rights as to run the cron job, nor to tell him "you have to wait X minutes". He's a user that won't be sure if the thing would be actually working and that I actually giving him more problems than solutions.
Also the files has been set on different folders thanks to the FTP method, easily creating a video node that has the url of the file as to add the content.
My question is simple. Can I migrate all my videos easily from Video Module to FlashVideo Module? The fact would be not how easily would it be to migrate but how different would it be to set a new way to create new video content for a "simple" user.
I don't want to try Drupal 5 still with the annoying video module, just because of this module. Please!
What I did to make my flash video module work
To install the mp3 codec and FFmpeg player follow the link:
http://dev.gemin-i.org/wiki/index.php/Ffmpeg_install_instructions
Follow all the steps given out there and test whether the ffmpeg works or not as shown on the site.
After that is done I still could see the same message on the node page
"Video is currently not available"
so I tweaked the setting a little bit they r as follows::
go to admin>>Flash video settings
select the node type and enter into the settings page for that node type
goto ffmpeg settings
change the ffmpeg Command to
-i @input -f flv -ar 22050 -ab 64k -ac 1 @outputalso dont forget to change the ffmpeg Path: on the same ffmpeg settings
So as soon as I submit the video it is seen on the node page and I do not have to run the cron also.
Tags for multiple emails
I've read around that I can have more than on video on a node.
3 Questions:
1. I saw how to play all videos for a certain node [video:node=2:fids=all], but I want to create a template that plays all videos for the current node, whatever node number in might be I would need something like [video:node=mynode:fids=all]. If I understand it correctly, if I specify fids=all and not mention the node number, it will default to all nodes, correct? How can I get this to work?
2. On this page: http://www.travistidwell.com/node/59 on point number 2) I saw a reference to a "index" tag. but there is no explanation on that page as to how to use it. Although I've looked all around your site, I feel I'm missing something.
3. This page http://drupal.org/node/187149 mentions a "Convert Immediately Option", how do I use it?
No Video Conversion
Hi,
Every thing is setup properly but i don't know why the uploaded video does not convert to flv file.........however *thumbnail get created. Can you please point out what the problem can be? When we run the cron manually it displays..
here we are /usr/bin/ffmpeg -y -i "/home/purestoc/public_html/files/44_11.wmv" -vframes 1 -ss "00:00:02" -an -vcodec mjpeg -f rawvideo -s "130x100" "/home/purestoc/public_html/files/flashvideos/44_11.jpg"
here we are /usr/bin/ffmpeg -i "/home/purestoc/public_html/files/44_11.wmv" -f flv -acodec mp3 -ar 22050 -ab 64k -ac 1 "/home/purestoc/public_html/files/flashvideos/44_11.flv"
But when you go to the flashvideos folder, only thumbnail exists but no flv file at all.
Please advise if you have any idea how to get thissorted.
Thanks in advance
Sultan
Usually this happens when
Usually this happens when you do not have the mp3 codec installed for your FFMPEG installation... Either that, or your mp3 codec is called something different. Please make sure that you have mp3 codec installed for FFMPEG and let me know if that works.
Similar problem
I get a thumbbail but an .flv file of 0M size. So I always see the "VIDEO NOT AVAILABLE" image.
Strange problem
Hi Travis, thanks for all the work you' re doing. I'm having the following problem: as you say: the upload- box in the Create Content-part now shows a message that it is meant for uploading Videos. True but that message is there only for a few seconds, and then it is just an ordinary file upload box. When I try to upload a video, the progress bar appears and stops after sometime, suggesting an upload, but in the end there is no file uploaded. What do I do wrong?
Many thanks for your time.
Theo Richel
Is it possible to have a
Is it possible to have a single video player dynamically load videos when you click on the link (so you have a player and a list of videos - similar to youtube I guess) of the video? Instead of having several videos on the same page.
Yes... You can utilize the
Yes... You can utilize the playlist feature of the player.
check this out
Can i do a site like this
www.tastyfood.tv
Cheers
Yes you can... but be
Yes you can... but be prepared for a LOT of customization. I am actually involved in a recipe type website right now, so I know for a fact that this can be done.
Works great!!! except for one thing...
So I got it all setup and it works great on the node I enabled for but not the home page. Check out http://www.kayakfishingplanet.com/
The video does not show on the home page but does show up when you look at the page directly.
Are you wanting to see the
Are you wanting to see the thumbnail in the teaser?
If so, then you will need to create a teaser view using the Content Template module and add [teaser] instead of [video] in that teaser node.
Hope this helps,
Travis.
I get a PHP (type) error
Table 'db4196_uploadhd.files' doesn't exist query: select * from files where nid = '1' in /includes/database.mysql.inc on line 121.
Preroll
Hi Travis,
thank you very much for this great module. is it possible to upload one additional video which then will be used as advertisment (preroll)?
BR
Thanks for your reply. I
Thanks for your reply. I noticed this feature. But what I need is the ability to upload an individual preroll video for each content video.
It would be nice if you could upload some preroll videos in a separated section and select which to use when creating your content (with video in it).
Yes, You can use the Intro
Yes, You can use the Intro video in the FlashVideo Settings to do this... Although, I would wait to get the latest version of FlashVideo this weekend before making this change. Thanks, Travis.
No Need for Conversion of FLV ... What's the process
Hello,
I don't really need the use FFMPEG because I will already have the .flv files.
Since that's the case, what are the appropriate settings for FlashVideo..I am only getting Video Not Available, and I'm not really sure what's wrong.
Any help would be greatly appreciated!
Michael
To get this to work, all you
To get this to work, all you do is enable the FlashVideo module for your node type, and then upload your FLV file, place the [video] tag in the body, and then you still need to run the cron-job. I use the cron job to set the status of the video so that it will show up. Let me know if you need some more assistance. Thanks, Travis.
Various errors and their corrections
Thanks Travis for programming this:
Some of the errors mentioned here:
Javascript popup dialog box and error: increase POST size in php.ini and of course the general file upload limit.
ffmpeg needs to be installed with LAME (stupid name ;) ) otherwise the audio fails. The debian normal apt-get doesn't have it. The multimedia-deb doesn't work for me (which supposedly has lame in it) so you need to compile it.
Increase the memory limit for cron jobs and possibly the execution time in php.ini
Non SEO type urls don't work with the script (since Google fights SEO these days you might want to leave drupal unoptimised to optimise ;) ). Solution: reprogram flashvideo_objects.inc.
Hope that helps some further in their quest for getting videos..
http://www.zoologie.de/grzimek/?q=node/241 Got it working here.
drkoesters, This is some
drkoesters,
This is some great stuff! Thanks for that! I am sure many people will find what you have posted VERY helpful. I do have one question. Is there anything that the FlashVideo module can provide to make this process a little easier? Most of the struggles you have mentioned are with using your own server, am I correct? The reason I haven't ran into those is simply because they are taken care of by my hosting service, CirtexHosting...
Thanks again,
Travis.
You had me at Create Content
Great work Travis.
UPDATE: http://drupal.org/node/134749
But now the video does not play, have to drag slider then play and no sound (checked volume etc)
___see update for fix to this error___
Do not know what to do with this error. Please adivse.
* warning: dl() [function.dl]: Unable to load dynamic library './ffmpeg.so' - ./ffmpeg.so: cannot open shared object file: No such file or directory in /home/.sabriel/eloco/domainname.com/modules/flashvideo/flashvideo.module on line 674.
* This content has been modified by another user, changes cannot be saved.
--
ffmpeg installed at "/usr/bin/ffmpeg"
flashvideo_playlist.php at root with index.php
FlashVideo enabled for Page node
Video file size tested (.mov 2mb)
Mac, FF 2.0.0.3
error on upload
Travis this module looks like it should be great but i can't get uploading to work. i've followed all the directions but every time i try uploading a file, i get this weird javascript popup dialog box that says "An Error was encountered:" and then a long string of escaped html code.... my browser won't let me cut and paste it or else i would include it here. do you have any clues?
here's a screenshot:
http://www.panleft.net/cms/node/6
thanx,
steev
actually
I've noticed that this error doesn't happen with Safari (I'm on a Mac) but it does on Firefox, so maybe it's just some weird javascript strangeness.
BUT, now i'm having a problem that video files are not being encoded properly (I'm using ffmpeg on my own dedicated server), apparently - the cron job creates thumbnails fine, but flv files are 0 in size. looking in the the ffmpeg_data table I saw that encoding is failing, so i tried duplicating the command from the command line and it says "unsupported audio codec" (mp3)... then i try it without audio at all just for kicks and the file seems to be unplayable with the flashplayer (the loading icons just twirls forever and ever).... so... stuff is really messed up...
it really sucks that this is so hard to make work right, since I totally agree with your idea that video files should just be files that can be attached to any nodes, not a special kind of node.... sadly it looks like i'll have to go with the video module instead since i just can't seem to get flashvideo to work...
steev
I am having problems as well with this stuff
I have used both firefox and safari, and I don't even get errors. After I click attach the striped bar indicates uploading, but then it just silently dies. I have tried uploading .m4v, and .mov files, maybe I should be using a different format? I did alter php.ini to allow larger uploads (the smallest m4v file is 122MB).
Database error when i run cron
"warning: exec() has been disabled for security reasons in /home/magazim/public_html/flash/sites/all/modules/flashvideo/flashvideo.module on line 537."
what could be going wrong
Well, It sounds like your
Well,
It sounds like your hosting service has disable the exec() command. There is really nothing you can do here except gripe at them... or switch hosting service providers. hint... hint... ;)
No convertion to flv
In this URL:
http://drupal.sukialogic.com/?q=en/node/11
We are trying and playing with your tutorial, but the flv convertion doesnt work.
1. We installed sites/all/modules/flashvideo
2. flashvideo_playlist.php is the document_root
3. For each node the output directory is /some_path/files
4. flvplayer.swf is in the /some_path/files
5. I upload a video to a story http://drupal.sukialogic.com/?q=en/node/11
6. I run cron manually but the convertion not work
7. we have installed /usr/local/bin/ffmpeg
Thanks in advanced.
Did you look in your files
Did you look in your files directory? Can you see any evidence that a conversion was at least started? Did it create a thumbnail?
Thanks,
Travis.
Thanks!
I really appreciate this tut! Thank you a bunch for taking the time to write this informative howto. If every module producer would do so, how beautiful would this world be!
Where is the donations button?
cheers
digitalknowledgeworker
http://www.travistidwell.com/
http://www.travistidwell.com/node/9
:) Thanks!!!