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!

CommentFileSizeAuthor
#16 README_16.txt1.03 KBanarcat

Comments

fax8’s picture

Title: Automatic video conversion » Missing documentation on Automatic video conversion

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

koenvi’s picture

Thanks a lot for the quick reaction.

I have tried doing what you said and have some further questions/remarks.

  1. I copied the video_scheduler.php and video_render.php to the drupal root and scheduled the execution of video_scheduler.php. Since I am working on a Windows machine I did this via the Scheduled tasks.
    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."
  2. To work around this problem I (temporarily) took out this condition from the php code and then the page executes correctly, except that I have the impression that the execution of video_render.php doesn't work: exec("php video_render.php $job->nid $job->vid > /dev/null &");".
  3. With some adaptations to the video_render page (took out the condition which blocks execution in browser and allow the parameters vid and pid to be passed via URL) I got the system to work and convert my videofile successfully.
  4. 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!!!

fusion94’s picture

I'm also having issues with this as well.

My crontab looks like this:

*/5 * * * * /usr/bin/php -q /var/www/html/video_scheduler.php

And 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 39  
PHP 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?

spooky69’s picture

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 '

fax8’s picture

@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

spooky69’s picture

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?

spooky69’s picture

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....

fax8’s picture

adjust the values contained in the first lines of the video_render and video_scheduler scripts.

spooky69’s picture

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.

fax8’s picture

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

spooky69’s picture

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

spooky69’s picture

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.

spooky69’s picture

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.

fax8’s picture

video_render is filled by video_scheduler.php and video_render.php

so.. your problem were permissions?

spooky69’s picture

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.

anarcat’s picture

Category: support » feature
Status: Active » Needs review
StatusFileSize
new1.03 KB

Here is something that could become the next README.txt.

anarcat’s picture

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 update
aptitude install w32codecs  ffmpeg sox toolame vorbis-tools lame lame-extras faad

Maybe this could also be added to the README.txt.

fax8’s picture

Status: Needs review » Fixed

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

Anonymous’s picture

Status: Fixed » Closed (fixed)
Num85@drupal.org’s picture

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.php

not 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.

imDhaval’s picture

i need some plz..
help me.

Move video_render.php and video_scheduler.php into your Drupal root
>>> ok i did it.

Edit the first line of those files to meet your needs
>>> i don't know how to edit it(need help)

Schedule the execution of video_scheduler.php using unix cron
>>> i m using windows 7, how can i Schedule video_scheduler.php?

so that is my problem
plz....

hypertext200’s picture

Hmm, in windows I'm not sure how to do that, I'm using my Ubuntu machine for developments.

verta’s picture

Edit the first line of those files to meet your needs
>>> i don't know how to edit it(need help)

This has yet to make it to the documentation in any form that contains specific instructions. What do you have to do to get this to work?

verta’s picture

Would this module help?

http://drupal.org/project/job_queue

hypertext200’s picture

please see the documentation page at the video.heidisoft.com website.

verta’s picture

There is no documentation on how to get cron to run the video scheduler to work in Windows. The doc on the site is all about crontab, and I'm sure it's accurate, detailed, and complete. But there is no crontab on Windows. You set up a scheduled job to "get" cron.php over HTTP or install a module like poormanscron which I have not used.

There are references in other closed issues about editing cron.php (something of a a core hack, and something I have NEVER had to do for any other module I've ever installed) and moving video_scheduler.php to the site root, and making changes to it - which is not great if you then update the module since I have to redo that edit every time.

But there are no specifics about WHAT to put in cron.php.