-
CONVERT PROBLEM :(
Hi!
I've really done everything , i googled everywhere but i am unable to solve this problem: I try to convert and it can't convert to flv! However with command in SSH i could manage to convert but not through php!
What the problem could be?Thumbnail creattion is ok, and flv videos plays nicely, just this convertion... only in ssh.. but why??? Please help me.
Here is what i got :
STARTING VIDEO CONVERSION (process_queue.id = 506)
File: /var/www/vhosts/domain.com/httpdocs/video/video.avi
################################################## ##
SELECT * FROM `video` WHERE `VID`=506
################################################## ##
Video id: 506
Find video duration - START
Duration (ffmpeg-php): 241
DURATION: 04:01
Create Thumbnail - START
Create Thumbnail with ffmpeg-php - END
CONVERT COMMAND: /usr/bin/mencoder '/var/www/vhosts/domain.com/httpdocs/video/video.avi' -o /var/www/vhosts/domain.com/httpdocs/flvideo/1221510242302480554.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -ofps 24 -vf harddup
################################################## ##
Array
(
)
################################################## ##
Return value:
Running flvtool2: /usr/bin/flvtool2 -U /var/www/vhosts/domain.com/httpdocs/flvideo/1221510242302480554.flv
Back
-
Re: CONVERT PROBLEM :(
Check your path to mencoder and make sure that mencoder is installed correctly. The fact that the Array is empty is telling me that either mencoder is not installed on your host or you are pointing to the wrong location for mencoder.
-
Re: CONVERT PROBLEM :(
My mencoder is inthe right place, and i installed mencoder, cause i can convert videos through SSH ...
[img=http://img151.imageshack.us/img151/6008/21417334ti4.th.jpg]
-
Re: CONVERT PROBLEM :(
So if you type in the command:
Code:
/usr/bin/mencoder '/var/www/vhosts/domain.com/httpdocs/video/video.avi' -o /var/www/vhosts/domain.com/httpdocs/flvideo/1221510242302480554.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -ofps 24 -vf harddup
Which is from your convert command in an shell, this works? But when your script executes this, it does not? If that is the case, what user are you logged in with when you are executing that command above? Are you logged in as root, or as the user who is the owner of your domain directory?
-
Re: CONVERT PROBLEM :(
-
Re: CONVERT PROBLEM :(
Run the same command from the domain owner's account and see if you get any permission errors. If your domain owner does not have its own account, then run the command from your Apache user account (usually www or wwwrun). You would do this by logging into your server as root then then typing in
or
Then type in the command.
-
Re: CONVERT PROBLEM :(
i logged in as root a typed, su - (domainusername) and then the command , and it is running !
IF it helps, here is my video_conversion.php:(i use this code, cause other won't work neither in SSH)
<?php
$cmd_ffmpeg = "$config[ffmpeg] -i '$video_src' -acodec libmp3lame -ar 22050 -ab 32 -f flv $video_flv";
# For old version of mplayer
# $cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es";
# For latest version of mplayer
$cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es";
$cmd_all = $cmd_mencoder;
$convert_3gp = $cmd_all;
$convert_mp4 = $cmd_all;
$convert_mov = $cmd_all;
$convert_asf = $cmd_all;
$convert_mpg = $cmd_all;
$convert_avi = $cmd_all;
$convert_mpeg = $cmd_all;
$convert_wmv = $cmd_all;
$convert_rm = $cmd_all;
$convert_dat = $cmd_all;
-
Re: CONVERT PROBLEM :(
This one is going to be really weird. Unless I am just missing something, I cannot see why this doesn't work. If the other commands execute fine, then so should this. Before you changed the code, were you getting an error in the "array" section? Or was it blank like it is here?
-
Re: CONVERT PROBLEM :(
Everything is the same, no matter what... :S
Same Array ( ) stuff
Which files are effected in this process? only the video_conversion.php ?
IT must be something to do with privileges..
-
Re: CONVERT PROBLEM :(
Well, that file gets read by the convert.php file. It is the one that does all of the work. The problem, though, is that the convert.php file is encrypted and cannot be modified.
Two things:
1. What version of Zend do you have on your server?
2. What version of PHP is installed?
You can find out all of this really quickly by creating a a new file called test.php. In this file, put the following line in it:
Code:
<?php phpinfo(); ?>
Then, point your browser to the file. It will output your PHP information including the version and what version of Zend is installed.