-
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.
-
Re: CONVERT PROBLEM :(
i have latest Zend: 3.3.3
and php 5.1.6
must be privileges problem...
-
Re: CONVERT PROBLEM :(
-
Re: CONVERT PROBLEM :(
-
Re: CONVERT PROBLEM :(
Posting over and over isn't going to help you. You will just need to wait until someone who is familiar with your particular problem reads the post and is able to help.
-
Re: CONVERT PROBLEM :(
Problem solved , strange but i tell you what the problem was and how to solve it.
If you have Centos5 and apache, and if you install ffmpeg with ( yum install "something" ) option then you should experience a badly installed mencoder , as it can't convert through php, only in shell.
All you have to do is install the latest mplayer.
There is another problem, that's why i couldn't solve it first. The best is to install ffmpeg one by one and not using yum, but on 8th September 2008 a new API ffmpeg came out, and ffmpeg-php is not supporting it. I couldn't get an older ffmpeg, that's why i used yum install, but then it lead to the problem mentioned above.But all solved now with installing the latest mplayer.But be sure NOT to install latest ffmpeg, as it does not go with latest ffmpeg-php which is: ffmpeg-php-0.5.3.1 . So those who want to install latest api, have to wait for a newer ffmpeg-php to come out , or install older ffmpeg.Hope it helps others!
-
Re: CONVERT PROBLEM :(
That's weird because I, too, am using CentOS and installed all of my software (with the exception of ffmpeg-php) using YUM. In fact, I did an update a few days ago and am not experiencing any problems at all. But, all in all, glad you got yours working.
-
Re: CONVERT PROBLEM :(
Well then i would suggest trying to do it with yum and if it isn't working, you just have to compile ONLY mplayer... But of course many different people with different hosts, and different problems :roll: