|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-02 07:08 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 07:00:01 2025 UTC |
Description: ------------ i want to convert a video file of any extension to a flv extension (flash extension) and save it in a specific folder. i used the execute function built in php (exec[command]) to run a command to do that but it didn't work. i don't know why. so please help me to fix this error. Reproduce code: --------------- if($config[vresize] == 1) {$encodecommand="$config[mencoder] $config[vdodir]/$vdoname -o $config[flvdodir]/".$vid."x.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$config[vbitrate]:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop scale=$config[vresize_x]:$config[vresize_y] -srate $config[sbitrate]"; }else { $encodecommand="$config[mencoder] $config[vdodir]/$vdoname -o $config[flvdodir]/".$vid."x.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$config[vbitrate]:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -srate $config[sbitrate]"; } if(exec("$encodecommand")) { //update flv metatags exec("flvtool2 -Uv $config[flvdodir]/".$vid."x.flv $config[flvdodir]/".$vid.".flv"); exec("$config[metainject] -Uv $config[flvdodir]/".$vid."x.flv $config[flvdodir]/".$vid.".flv"); Expected result: ---------------- convert any video file from its extension to .flv extension and move it to a flvdir folder. Actual result: -------------- didn't executed at all.