Transcoding Failure due to missing 'time' shell feature
aexl_konzepto.net - October 25, 2009 - 10:53
| Project: | Blue Droplet Video |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jbrown |
| Status: | closed |
Jump to:
Description
got transcoding failure.
debugging with cron.php output (see #613742 ) said "sh: time: unknown command".

#1
so what might have happened?
bd_video inserts 'time' before the ffmpeg call to output timing info.
but, afaik 'time' is a bash reserved word, and my exec uses another shell!
solution: use time feature only if available.
in bd_video.module line 401.. change (patch to follow)
function _bd_video_exec($command, &$output, &$result, $mode = 0) {
if($mode & BD_VIDEO_EXEC_MODE_TIME)
array_unshift($command, 'time');
to
function _bd_video_exec($command, &$output, &$result, $mode = 0) {
exec('time', $nooutput, $timecommanderror);
if($mode & BD_VIDEO_EXEC_MODE_TIME & !$timecommanderror)
array_unshift($command, 'time');
#2
same issue. You'd think there would be a way to specify which shell to use in php.ini. If there is, I can't find any documentation on it...
#3
I thought the 'time' command was available on any unix system, but it this has proven to be incorrect.
I've ripped out the use of the 'time'.
Might reimplement with microtime() and push timing info out into the watchdog.
http://drupal.org/cvs?commit=282756
#4
Automatically closed -- issue fixed for 2 weeks with no activity.