-1
with code
$a = exec('"ffmpeg" -y -i "test.mp4" -ab 128k -s 640x480 -vcodec mpeg4 -acodec:a copy "output.mp4" 2>&1 ', $output, $error);
Input file was 82.21mb output file was 13.74mb
Output file is generated but video quality is very low and in mobile device video is not displayed only audio is being played
can anyone please help me with correct ffmpeg command for converting video file , so that output file should be 640*480 resolution, 128Kbps sound ,output file should be mp4 container video codec H.264 Audio codec AAC
Thanks Shilpa
using libx264 got error which says
[52] => Stream mapping:
[53] => Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[54] => Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
[55] => Error while opening decoder for input stream #0:0 : Resource temporarily unavailable
any idea why this error occurs, is it due to ffmpeg not installed properly . this is my settings of ffmpeg which i got from phpinfo()
ffmpeg-php version 0.6.0-svn
ffmpeg-php built on Oct 30 2014 22:27:42
ffmpeg-php gd support enabled
ffmpeg libavcodec version Lavc52.72.2
ffmpeg libavformat version Lavf52.64.2
ffmpeg swscaler version SwS0.11.0
Directive Local Value Master Value
ffmpeg.allow_persistent 0 0
ffmpeg.show_warnings 0 0
I see that both input and output files are mp4 file hence
ffmpeg -i input.mp4 -s 640x480 output.mp4
might be just more than enough – Darius – 2015-06-25T16:40:06.627