-
Convert Error
Hello,
When I try to upload a file to the script, it goes into /video/ but doesn't convert. I get convert error in the admin panel.
Now I have all of the requirements and have done a lot of trouble shooting with this.
debug.txt
Code:
2007-09-27 15:57:44 Upload Finished
2007-09-27 15:57:44 Video (13) Conversion starting...
2007-09-27 15:57:44 File: /home/vid/vidsend.net/video/64753-9361.wmv
2007-09-27 15:57:44 -------------------------------------------------------------
2007-09-27 15:57:44 INSERT INTO video SET
UID='2',
title='work',
description='work',
keyword='work',
channel='0|1|0',
space = '4',
addtime='1190933864',
adddate='2007-09-27',
vkey='1142904038',
type='public',
active='0',
approve='1'
2007-09-27 15:57:44 -------------------------------------------------------------
2007-09-27 15:57:44 Video id: 8
2007-09-27 15:57:44 Calling ffmpeg-php -> ffmpeg_movie()
2007-09-27 15:57:44 Get video duration - START
2007-09-27 15:57:44 Get video duration - END
2007-09-27 15:57:44 DURATION: 51.999
2007-09-27 15:57:44 Create Thumbnail - START
2007-09-27 15:57:51 Create Thumbnail - END
2007-09-27 15:57:51 CONVERT COMMAND:
/home/vid/bin/mencoder '/home/vid/vidsend.net/video/64753-9361_1.wmv' -o /home/vid/vidsend.net/flvideo/11909346411688122007.flv -of lavf -vc ffwmv3 -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames
2007-09-27 15:57:51 -------------------------------------------------------------
2007-09-27 15:57:51
2007-09-27 15:57:51 -------------------------------------------------------------
2007-09-27 15:57:51 Return value:
2007-09-27 15:57:51 Calling process_video[13,0]
I have tried it with -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es and without -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es and still no luck.
Paths:
Code:
$config['ffmpeg'] = "/home/vid/bin/ffmpeg";
$config['mplayer'] = "/home/vid/bin/mplayer";
$config['mencoder'] = "/home/vid/bin/mencoder";
$config['flvtool'] = "/home/vid/bin/flvtool2";
$config['basedir'] = "/home/vid/vidsend.net";
$config['baseurl'] = "http://vidsend.net";
Also, it is set to automatically convert, not batch or anything like that.
Those are the correct paths. I can convert to if I run it in shell, but not when the script does it. Please, some help would be greatly appreciated.
-
Re: Convert Error
Your server not allowing php script to execute convert command.
Read
viewtopic.php?t=351
You need to put the convert command in that PHP script, upload it to your server.
Then ask your server admin why it is not executing the command. Your server admin need to fix the problem. It is some server security setting blocking php script from running system commands.
-
Re: Convert Error
I did that, but I don't see any error being displayed, just a black screen.
I am using Dream Host, also.
-
Re: Convert Error
if error is not displayed, chances are you have used wrong path to mencoder or open_base_dir or some security setting is server is blocking you from executing convert command.
-
Re: Convert Error
Hello,
open_base_dir is disabled in my php.ini:
Code:
; open_basedir, if set, limits all file operations to the defined directory
;open_basedir =
Also, I am using the correct path to mencoder.
Please let me know what else I can do.
-
Re: Convert Error
Fixed. I had to force shell commands using env.
-
Re: Convert Error
Can you tell what change you made in env ?
-
Re: Convert Error
In convert.php
I changed the php to:
Code:
<?php
error_reporting(E_ALL);
$convert_command = "env LD_PRELOAD=/home/vid/lib/libmp3lame.so.0 /home/vid/bin/mencoder /home/vid/vidsend.net/video/64753-9361_1.wmv -o /home/vid/vidsend.net/video/topu.flv -of lavf -vc ffwmv3 -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames";
$var = exec($convert_command,$exec_result);
echo "<pre>";
for($i=0;$i<count($exec_result);$i++){
echo $exec_result[$i] . "
";
}
?>