Answer the question
In order to leave comments, you need to log in
What's wrong with ffmpeg conversion?
Faced with the fact that some videos do not pass the conversion.
Here is the team
if($video['rotate'] == '0' || $video['rotate'] == '360' || $video['rotate'] == ''){$vr = '';}
if($video['rotate'] == '90'){$vr = '-vf "transpose=1"';} // 90 градусов по часовой
if($video['rotate'] == '180'){$vr = '-vf "transpose=1,transpose=1"';} // 180 градусов по часовой
if($video['rotate'] == '270'){$vr = '-vf "transpose=2"';} // 270 градусов по часовой
$cmd = 'ffmpeg -y -i '.$catUpl. '/'.$dirDn.'/noconvert_'.$video['realname'].' -map_metadata -1 -map 0:v:0 -map 0:a:0 -vcodec h264 -pix_fmt yuv420p -vsync 1 -async 1 -color_primaries 1 -color_trc 1 -colorspace 1 -vf scale="\'w=if(gt(a,16/9),640,-2):h=if(gt(a,16/9),-2,360)\'" '.$vr.' -crf 20 -preset medium -profile:v baseline -level 3.0 -maxrate 800k -bufsize 1200k -ac 2 -c:a libfdk_aac -b:a 128k -f mp4 -movflags +faststart '.$catUpl. '/'.$dirDn.'/'.$video['realname'].' 2>&1';
exec($cmd,$retRES);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question