Missing documentation on Automatic video conversion
koenvi - February 11, 2007 - 20:13
| Project: | Video |
| Version: | HEAD |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I've tried to use this module for a new website, but I can't seem to get the automatic video conversion to work. I believe FFMPEG is correctly installed on my server, because the thumbnail creation works perfectly.
In the Note of the Auto Conversion it says: "IMPORTANT: you will need the video_render.php correctly configured and run by cron. See README.txt for more informations". The README.txt file is empty, so I don't know how to configure the video_render and have it run by cron.
Could someone help me to get this working?
Thanks!

#1
I will provide documentation to those new features as soon as possible.
Meanwhile follow this brief instructions:
1 - Activate the video_ffmpeg_helper module
2 - Setup it's advanced options to meet your needs
3 - Move video_render.php and video_scheduler.php into your Drupal root
4 - Edit the first line of those files to meet your needs
5 - Check permissions of the files and folders
6 - Schedule the execution of video_scheduler.php using unix cron
Your videos should now be converted by the system.
If you have success in the process it would be really useful if you could contribute
some more detailed documentation.
Thanks,
Fabio
#2
Thanks a lot for the quick reaction.
I have tried doing what you said and have some further questions/remarks.
When the page is executed (by the scheduled task) I get the message from the PHP page: "This script is only executable from the command line."
exec("php video_render.php $job->nid $job->vid > /dev/null &");".I know now that there is nothing wrong with my installation or ffmpeg, but I'm looking forward to a clear manual to fully automate this procedure.
Maybe a small hint: why not use a similar way of auto-converting as the FlashVideo module? This way you can manually execute the cron page to have your videos converted, or you can wait the default Drupal cron-task.
Thanks!!!
#3
I'm also having issues with this as well.
My crontab looks like this:
*/5 * * * * /usr/bin/php -q /var/www/html/video_scheduler.phpAnd I get the following error when cron tries to execute.
PHP Warning: include_once(./includes/bootstrap.inc): failed to open stream: No such file or directory in /var/www/html/video_scheduler.php on line 39PHP Warning: include_once(): Failed opening './includes/bootstrap.inc' for inclusion
+(include_path='.:/php/includes:/var/www/html:/var/www/html/includes') in /var/www/html/video_scheduler.php on line 39
PHP Fatal error: Call to undefined function drupal_bootstrap() in /var/www/html/video_scheduler.php on line 43
Oddly enough I don't get any error when it's run from the command line. It executes perfectly.
Anyone have any ideas?
#4
I get this error:
/home/domain/public_html/video_scheduler.php: line 1: ?php: No such file or directory
/home/domain/public_html/video_scheduler.php: line 2: //: is a directory
/home/domain/public_html/video_scheduler.php: line 4: /bin: is a directory
/home/domain/public_html/video_scheduler.php: line 5: etc: command not found
/home/domain/public_html/video_scheduler.php: line 6: etc: command not found
/home/domain/public_html/video_scheduler.php: line 7: etc: command not found
/home/domain/public_html/video_scheduler.php: line 8: syntax error near unexpected token `newline'
/home/domain/public_html/video_scheduler.php: line 8: ` * @author Fabio Varesano '
#5
@spooky69
Looks like you are executing the php file directly instead of passing it to php
@fusion94
Check permissions and ownership on files and folders. Some times cron jobs are executed by user different than the one who own the files
#6
Oops... thanks fax8.
So, now I have sorted that out it seems that it is still not quite there... it gives errors in the log file saying that /home/accountName is not writeable and also that /home/accountName/public_html is not writeable. I would have thought that it should be ok as long as the image / video related folders are writeable. Any ideas?
#7
Further to the above, the log says no video conversion jobs scheduled but shows the following location:
http:///?/home/accountName/public_html/video_scheduler.php
That isn't quite right, is it....
#8
adjust the values contained in the first lines of the video_render and video_scheduler scripts.
#9
Is there a newer version I should be using? The first line of scheduler.php that I have is
// $Id: video_scheduler.php,v 1.3 2007/01/14 14:59:06 fax8 Exp $
nothing below this relates to paths and I have obviously not adjusted anything below where it states not to change anything. Either I need to be using a newer release from somewhere or...?? Nothing in the code comments indicates anything that should be changed for paths as far as I can see...
Nervous about installing what may or may not be a newer cvs version as the one I have works for uploading and playing of videos, along with thumbnailing - don't want to try and fix something that isn't broken but would like the conversion facility to be working. Using 5.1 by the way.
Any specific advice would be appreciated.
#10
There is still nothing new on video_scheduler.php .
Sorry for my incorrect hint above.
You should check that the user who execute the video_scheduler.php actually have permissions
to write were your system store videos. Also check traversing permissions in the traversed folders.
Hope this helps,
Fabio
#11
Hi fax8 - I am pretty sure that is all ok. I don't quite get the log showing that http:///?/home/accountName/public_html/video_scheduler.php bit - it is showing the local file path as is given in the cron job with the addition of that question mark, instead of the web path that I would have expected to see. Something very odd going on and I would appreciate any pointers you can give.
The cron job is current set up as
/usr/bin/php /home/accountName/public_html/video_scheduler.php
#12
Further to the above, should the video_render database table automatically have an entry when a new video is uploaded or does this get created by video_scheduler.php, as nothing is created in video_render when a new video is uploaded.
#13
Ok, re-installed, checked permissions. This seems to have corrected itself... however, zero file size flv created... will open another issue for this. Cheers for the assistance above.
#14
video_render is filled by video_scheduler.php and video_render.php
so.. your problem were permissions?
#15
Not entirely sure what the problem was. Deleted the test video, re-installed same module files, then it worked... except for the other issue I posted where the flv of zero size was created. File permissions looked fine to me - had it all chmod 777.
#16
Here is something that could become the next README.txt.
#17
Under Debian, I had to install proprietary codecs in order to decode properly some alien videos. The main symptom was soundless videos. I fixed this by adding:
deb http://www.debian-multimedia.org etch main... and running:
aptitude updateaptitude install w32codecs ffmpeg sox toolame vorbis-tools lame lame-extras faad
Maybe this could also be added to the README.txt.
#18
Included the README.txt info in my rewrite. Going to publish it soon.
I would like to provide an handbook page for ffmpeg installation guide.
That could help adding users comments etc.. then more helpful.
Fabio
#19
#20
Hi,
I am also having a problem with this, Im not too sure if the cron is even working as the videos do not appear when uploaded.
My cron looks like this:
15 * * * * /usr/bin/php -O - -q http://www.mysite.com/video_scheduler.phpnot too sure what the problem could be, my host tells me that I need to run it every 15 minutes as I'm on shared and every minute is not allowed.