Introduction:
The problem with the current Video module is that is was not designed for a User-generated video website. It was only created to allow a web developer the ability to easily upload a video, and display that video. This web develpoer is able to do this by creating a Video node and provide what seems like a thousand different parameters to embed that video in his site. This is where I see the problem... First of all, I don't beleive that a video should be considered a "node". A video is simply a file, and should be treated as such. And Drupal already has a fantastic module that allows a user to easily upload files to any node in the system, the Upload module. What is even more cool about this module is that the user is given the ability to upload as many files to their node as they wish. This got me thinking... This should also apply to video; Why shouldn't I be able to upload as many videos to my node as I wish? If a video is not considered a node, but rather a file, then this would be possible using the Upload module. In fact, it would be stupid easy for anybody creating content. So stupid easy, that in fact, anybody (not just a web developer) can do it. You see where I am going here, don't you. By using this video content philosophy... You would, in fact, have a brand new video module built for the user-generated websites, and as far as I am concerned, the websites that WILL be and ARE the future of the web. I would like to introduce to you, the brand new FlashVideo module which I wrote to do just this... Take a look for yourself! (oh, and I'm not an animal hater... I just thought these videos were heeeelarious!)
In this tutorial, I will walk you through step by step on how to create your very own Web 2.0 website with integrated Flash Video. I will teach you how to use this new module that I have written, FlashVideo, and personally show you how easy it SHOULD BE to add Flash video to your Drupal 5 website. So sit back, pop them fingers, and get ready for Web 2.0.




Restrict single file upload
How to restrict user to upload just 1 video per content ? Beside that I would like just videos to be uploaded by users not everything.
Thanks
Hi Travis i have separate
Hi Travis
i have separate video_import directory
output directory is different from video_import directory for sure
i have tested many times with different values
i have changed input dir, output dir, video import dir
but all the same:
successful video conversion - but after second or third cron run - the flv files are deleting!
nodes are creating ok, videos is playing ok too - but after cron run - FLV files are deleting
My only suggestion is to
My only suggestion is to have me look into it for you. If you are willing to pay for my services, I can get in there and figure it out pretty quickly. I am not convinced this is a FlashVideo issue since nobody else seems to be having this problem. Contact me through the contact form if you are interested.
cron delete flv
the same pb form me
FlashVideo 6.x-1.3
I upload already encoded flv it's ok but the
files are deleted after the cron run
so i can't publish my website ...
can't figure out how to get a workaround. I tried to set another export directory but when i manually upload, the file are generated in the goor directory but the path is wrong (the default one to file)
any clue
thanx
Does this support 3GP mobile phone video format now?
I would like to use Flash video to let people upload the 3GP video standard for mobile (cell phones). What's the situation with this?
Thanks.
marcusp
Travis - where are you ???
Hi!
Travis please advise, the cron deleting FLV files problem is still unresolved :(
i have commented file_deletion functions in flashvideo.module, but somehow files are deleting :(
another question - how to extract the FLV video filename in the node ?
i want to extract video duration from the video and i need the file name in node
if i Enable ffmpeg-php in flashvideo settings - the flashvideo module not extracting information using ffmpeg
so i decided to extract it myself but i can't get the file name in the node
please advise!
Thanks !
:) I have been very busy,
:) I have been very busy, and I am afraid FlashVideo has taken the rear seat for a little while. Don't worry, though, I will be back on it shortly. If files are deleting in FlashVideo even when you comment out file deletion funcitons, then that would indicate to me that there is another module that is not playing nicely with FlashVideo. What other modules do you have installed?
And about your other question... I am not sure what you mean "extract the FLV video filename in the node"...? Do you mean just the filename? I am not sure that was ever even a feature with FlashVideo, and all FFMPEG-PHP does is get the size of the video to show the video player correctly.
I hope this helped. Sorry I have not been around, but I have a lot of irons in the fire right now.
Thanks,
Travis.
Is this bug ?
Hey!
i have noticed one more bug or something
if you import already FLV files using flashvideo video_import feature
then for some reason new nodes are not in PUBLISHED status..
could you please check this ?
and one more thing - please, if it possible to add feature to allow flashvideo created nodes to add "promote to frontpage" feature
thanks again and waiting
Huray! You're online :)
hi!
about file deletions:
then i upload files via drupals ADD CONTENT - then no files deleting
but then i add them using video_import directory
then FLV files deleting. i even installed drupal + flashvideo module without any additional modules - the same effect.
i want to display the duration of movie on my pages
i need the filename and the path there is the movie, like /sites/default/files/movie.flv
then i create new ffmpeg-php object and extract the duration
the problem is i don't know how to get the movie name and the path inside the node
UPDATE: i have tested again all this stuff with deletion
and figured out what ONLY if i import videos already in FLV format, then only this files deleting
avi, wmv converting from video_import directory to FLV format and they are not deleting, only FLV imported files
UPDATE #2: Travis, please advise - my mind will blow if i don't figure out why the files are deleting :((((
I have tested again all this stuff, i have commented out file_dele functions in flashvideo-module
also i have commented all module_invoke functions in your modula - but the files are deleting again :(
please help!
thanks
I think I might know what is
I think I might know what is going on.... What are the exact values that you have for the video import directory and the video output directory?.... They absolutely cannot be the same. In fact, the video_import directory should not be used for anything other than importing videos. If you set it to the same as your files directory then you will see some really strange things happen. If it is the same as the output directory, then you will probably see that it keeps creating nodes all the time. I am wondering if you have the video_import directory set to be the same as the files directory... this would cause this issue I think (but I have never tested it).
Let me know.
Cron deleting flv files
Travis -
I am also having the same issue as the previous poster. When I attach the videos, everything seems ok, but at some point the cron job comes through and whacks the files.
My files are already in FLV format if that makes any difference at all.
Please advise.
John Walker
Another problem with flashvideo module
Travist, please advise!
After successfully importing flv files, flashvideo module deleting FLV files after 2 or 3rd cron run..
why ??
please help!
Got a problem here then importing flv files
Hi!
thank you for your plugin!
i have a strange problem here
then i copy flv files into inport_dir and run cron, the system creates thumbnails writes them to output directory
and then MOVE the flv files from import directory to output
pretty good...
BUT
but in the node your plugin generates a code with sites/defaul/files path!
he thinks the flv videos is there, in drupal's sites/default/files directory but it must be the output directory
then i manualy upload avi files, it's works great, but not then i import flv files from import directory.
The same thing happens then i upload FLV files vie web form
flashvideo module creates thumbnail and MOVE the uploaded file to OUTPUT directory
in the node flashvideo module generates code with /sites/default/files dir but shoud be /sites/default/files/OUTPUTDIR
if i upload other files. avi for example - the system runs ok
converts files, copy the flv to output dir and the flashplayer displaying videos
please, please advise. Thanks
save your trouble
I think if you want to save all your troubles
you can always go to CrayonHost
they already got things in place an have great support
look at my website for sample site
Anton Soeharyo
path problem
Hi Travis
thanks a lot for all your time.
I have a clearly defined problem but no clue how to solve it.
exactly did all you explained
when I upload the movie there is a problem with the path:
++++++++++
warning: rename(/var/www/drupal-5.0//var/www/drupal-5.0/files/wwwBI_T29_T31.avi,/var/www/drupal-5.0//var/www/drupal-5.0/files/94_wwwBI_T29_T31.avi) [function.rename]: No such file or directory in /var/www/drupal-5.0/modules/flashvideo/flashvideo.module on line 1464.
++++++++++
as you see the "/var/www/drupal-5.0/" is for some reasons doubled :-(
this of course messes up the whole thing of conversion etc etc
I would appreciate any help...
thanks
selim
As always is happens...
As always is happens... after my last post, 5 min. later, I got the solution.
changing the
"File system path" solves the problem
cheers
install issue
Travis - again, great module.
One issue in the install file, though, is that mysql (v. 5.0.45) keeps dying on the "CREATE TABLE ffmpeg_data ..." statement, saying "#1101 - BLOB/TEXT column 'input_file' can't have a default value".
You may want to remove the default values for text fields from that statement.
Hope that's helpful...
Flashvideo flv file is not playing
Hi All,
I have install flash video module, ffmpeg program. Everything is working fine like converting to flv and creating thumbnail. While submitting the node the video file is converting into the flv format and plays the only once after submitting. But if I go again that node after clicking the thumbnail(created by ffmpeg) it shows the blank page. I dont know whats the reason. Any help would be appreciate.
Flashvideo_views.module improvement
Hi, I added the possibility to sort videos on play_counter in views. Here are the code of the flashvideo_views.module (based on 5x-2.6-beta version. Feel free to try it.
/**
* Implementation of hook_help()
*/
function flashvideo_views_help($section = 'admin/help#flashvideo_views')
{
switch ($section) {
case 'admin/help#flashvideo_views':
$output = 'The FlashVideo Views module provides a new Field in
the Views module that allows you to see the Video or Video Thumbnail.';
return $output;
case 'admin/settings/modules#description': return t('Provides a plugin to allow Views functionality to the
FlashVideo Module.');
}
}
/**
* The views plugin for the FlashVideo module is developed and maintained
by * user mikesmullin at http://drupal.org/user/108440
*
*
* This include file implements views functionality on behalf of the
* flashvideo.module. */
function flashvideo_views_views_tables() {
$tables['flashvideo'] = array(
'name' => 'flashvideo',
'join' => array(
'left' => array(
'table' => 'node',
'field' => 'nid'
),
'right' => array(
'field' => 'nid'
),
),
'fields' => array(
'nid' => array(
'name' => t('FlashVideo: Video'),
'handler' => 'flashvideo_views_handler_video',
'option' => array(
'#type' => 'select',
'#options' => 'flashvideo_views_option_video',
),
'notafield' => true,
'sortable' => true,
),
),
'sorts' => array(
'play_counter' => array('name' => t('Flashvideo: Played
Counter'))
),
);
return($tables);
}
/**
* Views handler for displaying the video.
*/
function flashvideo_views_handler_video($fieldinfo, $fielddata, $value,
$data) {
$node = node_load($data->nid);
switch ($fielddata['options']) {
case 0: // Flash Video Player
return flashvideo_get_video($node, array());
case 1: // Thumbnail Image
case 2: // play_counter
return $node->play_counter;
default:
return flashvideo_get_thumbnail($node, array());
}
}
/**
* Views - Generate a list of options for the */
function flashvideo_views_option_video($op) {
return array(
t('Flash Video Player'),
t('Thumbnail Image'),
t('Played Counter')
);
//return $a;
}
Suggestion and a Bug
Hi, flashvideo is a great module. Thanks for developing !
I have a suggestion for the automatic import via video_import directory.
I think the import should not set the videos automatically to "published" after rendering the video, since the author may want to, change the title, edit the node text before publishing the video. It would be great if the module would grab the default settings (Publish settings, Comment settings) of the node type settings.
I think i also found a bug. Selecting the node type for the automatic import seems to only work correctly when you enable flashvideo support for at least 2 node types. Otherwise it does not save video with the correct node type and falls back to the default node type specified in the module source code.
Modifying the source
Hello there,
I love the FlashVideo project because of it's automation and simplicity.
However, as I have my video blog on my own home server, I have a pretty bad upload speed. What I'd want to know is that would it be possible to do this: After converting the video file to flv, it gets uploaded to a specified ftp site (external) and then it gets linked to the post.
This would make the videos buffer/load way faster, but I could still have it on my own server. I have access to hosted ftp, but I'm simply wondering if there's an easy way to accomplish this, or if I need to dig into the code?
Thank you!
- Dids
Its awesome
I know!
its so awesome the way the Video loads so much faster than the original ones
FFMPEG hosting News
Not at all... The video
Not at all... The video import directory was put into place to solve this and should just work with the latest version of the FlashVideo module.... First, just create a directory in your files directory called "video_import". Make sure the permissions allow for reading. Then FTP any video that you want to add to your site into that directory, run cron, and yiola! You should then be able to go to your content section and see that some new nodes were created with those videos you uploaded via FTP. You can then change the node type in the Global FlashVideo Settings.
Enjoy!
Actually, the problem here
Actually, the problem here is that I am using two different servers. One that I maintain at home, which is where the videos get uploaded and converted, but then I have a domain at GoDaddy, but it has no ssh and no ffmpeg.
What I'd like to do is simply store the FLV files on the GoDaddy domain, and fetch them via the drupal on my home server (where the original videos get converted).
This way the buffering would be smooth, even if the site (home server) was under heavy traffic. Basically GoDaddy would only serve as a file storage for the already converted flv's.
The biggest problem with the video_import module was that it was also used to convert the videos, but as my current GoDaddy plan can't handle that, I have to let my home server do it.
Thank you!
- Dids
Hello
Hello
First of all, thanks for your walkthough! I am an absolute newbie (hosting on Dreamhost.com) and have little knowledge in terms of server administration. Anyway, I did everything, and yet it keeps saying "no video availble" even if I manually run the cronjob.
have a look yourself:
http://www.tiervideos.net/?q=tracker
If anybody could help I'd be sooo glad. Feel free to register and try it out yourself (cronjobs run every 10 minutes). I'm a bit annoyed with the whole situation as I can't continue to work on my site (which is pretty poor at the moment ;-) without the flash player working.
Have you actually looked at
Have you actually looked at the output directory and see if it is actually converting the videos? If not, then I would first focus my attention on why the video is not being converted instead of why it isn't showing up in your node. Here are some reasons why the ffmpeg would fail.
Tracking User views
My client wants to track video plays by user. I think it could be done with Google analytics: http://www.google.com/support/googleanalytics/bin/answer.py?answer=55520...
but this looks like it would involve hacking the player.
Can you think of a easier way to do this?
That, or you can add a new
That, or you can add a new parameter to the Users table called video_views and then just copy and paste all code that you see about the play_counter incrementing (in the flashvideo_nodeapi function) in the flashvideo.module but instead make it for just the logged in user.... like the code below
function flashvideo_nodeapi(&$node, $op, $teaser) {
.
.
.
case 'alter':
// Here we will do a search and replace for anyone who is using the video and thumbnail tags.
if(!$teaser) {
global $user;
db_query("UPDATE {users} SET video_views = video_views + 1 WHERE uid = %d", $user->uid);
db_query("UPDATE {flashvideo} SET play_counter = play_counter + 1 WHERE nid = %d", $node->nid);
}
.
.
.
Help!
I've downloaded your flashvideo 4.7.x-1.0 at drupal.org. I bypasseed your step 1 because I dont have FFMPEG and I only inted to upload .flv files.
The problem is I can't get it to run on a page content. Do you have any guide in installing it in drupal 4.7?
Thanks
FlashVideo Thumbnails
Hi Travis,
Great work on this module btw. Love it! I have a question, maybe you can help.
I've uploaded 10 movies to my site, successfully. Thumbnails worked and all display beautifully. Here's the rub. I've decided I don't like the 2 second thumbnail clipping, so I extended it to 20 seconds. Now, I'm stuck. How do I get the module to re-thumbnail the videos? Please don't tell me I have to re-upload them.
If there is an easy way to do this, I would love to know how.
Peace!
Do you SSH access to your
Do you have SSH access to your account? If so, then you can just use a program like Putty to do it manually by typing in the ffmpeg commands in your shell prompt. OR... Do you know PHP? If so, then just write a manual script that goes and re-creates these thumbnails. Thats what I would do... OR... You could just re-upload them... :)
The long awaited thank you...
I figured as much... I think I was hoping there might be a built-in feature or a few functions I could call from php.
Thank you for the suggestions. I'll avoid the re-upload! :-)
Flash videos dont display
Your tutorial is great, i joined cirtex as per your recomendation on your site following your link. I downloaded flash video module and install it and enable it for content type page.
The settings are as follows;
ffmpeg settings;
ffmpeg command: -i @input -f flv -acodec mp3 -ar 22050 -ab 64 -ac 1 @output
ffmpeg path: /usr/bin/ffmpeg
out put directory : /files
flash player settings:
player name: flvplayer.swf (i renamed it from player.swf cuz the flash player which resides in the files directory is called flvplayer.swf so i didnt chaneg that)
The location of flashvideo_playlist.php is the main directory where the 'sites' and 'file' directories are.
Now when i a create a new page and attach a video to it and upload it, and run the cron job, it apperas in the file directory with .flv extension, which means that the conversion is ok. But the converted size is actually larger than the original. The other problem is that when i check out the page, the page is there but the video doesnt appear.
Any help with this will be greately appreciated.
Which version of FlashVideo
Which version of FlashVideo are you using?
If it is version 1.7, then your output directory shouldn't be /files. I changed this so that it will go off of the system files directory (which defaults to files). If you are using version 1.7, then change this to videos, or in your case, just leave it blank.
Also, try this....
Actually go to the following URL and tell me what it tells you... http://www.yoursite.com/flashvideo_playlist.php where you would replace http://www.yoursite.com with whatever your website url is.
Thanks,
Travis.
your really throwing some people and me double standards
The output directory is where your files go... it should default to files, but you can change it in the FlashVideo Settings to be any subdirctory of this folder.
this one of your post now you make another statement calling yet some new dir now maybe you can understand why I am so heated with this application. As to what version ? 1.7 how many versions is their and where the hell are they. why not REMOVE all the old stuff and not clobber up the net with useless information that gets people like me upset after hours of reading.
Travis I really mean you do disrespect but the topic on this module is by far the worst I have ever seen as to what is really the subject matter and what really applies and where and when. Given the fact that I have had so much trouble with this my first reaction is the trash drupal and find another product based on a what would seem to be a simple module installation.
Now if my harsh words has offended you that is NOT the intent I am just sick and tired of spending an entire day chasing my tail.
spike
All the urls are displayed
It displays all the urls of the videos that i have in files,,,
Its some thing like- http://mysite.com/files/4_simpson.flv on a blank browser page.
Ok, good.... That's what it
Ok, good.... That's what it is supposed to do.
Now look in your files directory and make sure those files are there.... Also verify that your FlashPlayer.swf is in that same directory.
Thanks,
Travis.
extra files folder
mysite.org/files/files/9_Default.flv
my flashvideo_playlist.php page shows an extra files folder in my playlist. The 9_Default.flv is in the files directory of my Drupal root. flvplayer.swf is in the files dir also. I assume my video isn't playing because the playlist thinks these two files are in files/files/?
I am sure this is a quick fix, I just don't know where to fix. Thanks...
Make sure that the output
Make sure that the output directory in the FlashVideo settings does not include the "files" directory. This should be done in the system configurations. The FlashVideo settings output directory is just supposed to specify a directory within the files directory. For your case, it should be blank.
Thanks,
Travis.
What an idiot
How silly, I forgot to set the name of my flash player...
Ok, my FlashVideo settings did have a blank for the output dir. My problem was that I still had the default Player.swf instead of flvplayer.swf in my player settings. Even though my playlist still shows /files/files/myvideo.flv...
My only problem now is that in the headline it shows the [video] tag but no thumbnail. When I go to the actual node page the full video plays as anyone would want it to... perfectly. How do I get the thumbnail to show in the headline part.
Great product by the way... I will be making the donation if I can ever find a place to send my thanks. Do you do paypal?
I just added a Donate Tab at
I just added a Donate Tab at the very top of the screen. Thanks for your support! Please let me know if you have any other problems.
Thanks,
Travis.
Yes travis, they are there.
All the files that appeared on the browser page, when i entered http://mysite.com/flashvideo_playlist.php are there (in the files directroy), and the flvplayer is also there......Dont know whats wrong here?
One more thing, when i type video in the body area, its ok but when [video], is typed, i receive the following error message;
warning: strpos() [function.strpos]: Offset not contained in string. in /home/kalelcom/public_html/modules/flashvideo/flashvideo.module on line 808.
And upon checking, the line 808 of flashvideo.module looks like the following;
while(_flashvideo_parse_param($body, $pos, $params)); // Parse all the parameters.
I hope this can clarify the issue a bit.
Thanks.
How to install the Flash Video Module
Sorry for sounding really thick here. My first day using Drupal and have to get the flash Video Module up and running.
You state to install the flash Video module but do you have any documentation on this ( as I can't seem to find any)?
Thanks a million
not to worry I think I have got it
You install the module by
You install the module by just copying the contents of the tarball that you download from the website, and then just placing the directory called flashvideo in your modules directory. Then you can go to Administer >> Site Building >> Modules. You should see the FlashVideo module in that big long list. Check the checkbox next to it and then hit Save Configuration at the bottom.
Thanks,
Travis.
Thanks Travis
This stuff is amazing, however been thrown in feet first But having a ball with it :@)
Great modules!
upgrading to 1.7 worked well and it is a really great module. I will wait for a release to be fixed thumbnail feature. thanks.
Thumbnail feature should be
Thumbnail feature should be fixed....
The only anomaly has to do with CCK's weight is higher than that of the FlashVideo's weight which will ignore the tags [thumbnail] and [video].
However, you can fix this fairly easily by just changing the weight of the FlashVideo module (in the system table of your database) back to 10.
Thanks,
Travis.
Different behaviour (avi vs flv)
just upgraded to v1.7
upload dir: files
output dir: files
uploaded foo.flv and foo.avi
both displayed ok
changed settings
upload dir: files
output dir: files/flashvideo
uploaded foo.avi , run cron ... displays ok
uploaded foo.flv , run cron ... no output is created in output dir, no entry in ffmpeg_data
on a side note: would it be possible to have the uploaded video
deleted upon successful ffmpeg conversion?
Thank you for implementing the flashvideo module!!!
With version 1.7, I changed
With version 1.7, I changed the way the output directories work. When you specify "files" as the output directory, you are really saying http://yoursite.com/files/files/ as the path. The reason that I did this is because I needed to stay consistent with the system files path directory. If the person changes the system files directory to, let's say, myfiles, then I would need to also incorporate this change.
Have you tried leaving the output directory blank, or in your case just putting flashvideo as the output directory? This way, the real path would be http://yoursite.com/files/flashvideo (that is assuming you left the output files directory as the default "files")
Thanks,
Travis.
just tried your suggestion
just tried your suggestion (setting output dir to "flashvideo", system upload dir is "files")
and managed to create and view two pages: foo1.avi source and foo2.flv source.
Still I am somewhat puzzled, as after running cron I see 3 files only:
files/foo1.avi
files/foo2.flv
files/flashvideo/foo1.flv
I guess I cannot keep all the converted videos within output dir (and remove files/foo*)
thank you, and have a nice week end...