I use FFMpeg for hidden videos and it works fine from the command line . I use the following command:
ffmpeg -i input.mpg -vcodec libx264 -b 819200 -s 100x100 -g 15 -bf 3 -b_strategy 1 -coder 1 -qmin 10 -qmax 51 -sc_threshold 40 -flags +loop -cmp +chroma -me_range 16 -me_method hex -subq 5 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -directpred 1 -flags2 +fastpskip -dts_delta_threshold 1 -acodec libfaac -ab 48000 output.m4v
However, when I run the command using PHP exec () , the output video is incorrectly encoded and distorted and cropped . I use the following in PHP:
$output = exec($cmd . ' 2>&1', $output, $return);
Result $ returns the successful code '0'.
Does anyone have any suggestions?
Thanks.
source share