Me again.

The cron job now appears to run but a .flv file of size zero is created in files/videos. The log show the following:

Type video_render
Date Sunday, 18 February, 2007 - 19:23
User Guest
Location http://?video_render.php
Referrer
Message executing: nice -n 19 /usr/bin/ffmpeg -y -i 'files/videos/17092006003_8.mp4' -f flv -ar 22050 -ab 64 -s 400x327.272727273 -b 200 /tmp/video-rendering5A6fb6
Severity notice
Hostname

Any ideas on why this would be happening? So close now (aside from the lack of upload progress image - got an animated gif but it won't show it...).

Comments

fax8’s picture

Status: Active » Fixed

ops... my fault. An error in the resize algorithm.
I already solved this one but forgot to commit the fix.

Get latest video_scheduler.php from DRUPAL-5 branch or
Change the function _video_render_get_size in file video_render.php
on your drupal root to:

/**
 * Calculate the converted video size basing on the width set on administration.
 * Aspect ration is maintained.
*/
function _video_render_get_size(&$job) {
  $def_width = variable_get('video_ffmpeg_helper_auto_converter_width', 400);

  $height = $def_width * ($job->videoy / $job->videox); // do you remember proportions?? :-)

    
  $height = round($height);
  // add one if odd
  if($height % 2) {
    $height++;
  }

  $job->calculatedx = $def_width;
  $job->calculatedy = $height;

  return $def_width . 'x' . $height;
}

Setting this as fixed.
Feel free to reopen.

spooky69’s picture

That did it. Great stuff !!

Anonymous’s picture

Status: Fixed » Closed (fixed)