0
So, I have a bunch of .mp4 files and I need to change the video and audio codecs in order to be able to play them on my device.
The video codec is currently h264 and I need mpeg4. The audio codec is aac and I need mp3.
I'm trying to convert them via this ffmpeg command:
ffmpeg -y -i input -s:v 800x480 -c:v mpeg4 -c:a mp3 output
It works fine, except for the quality because ffmpeg is using a very low bitrate.
My question now is if I need to specify a quality/bitrate or if it is possible to tell ffmpeg to use the original bitrate somehow.
-vcodec copy
is not an option because the video codec stays the same.
Keeping the bitrate would only make sense of you were using the same codec. Instead, you must use a higher bitrate, because mpeg4 is less efficient. – Daniel B – 2017-07-27T13:30:10.437
Default bitrate is 200 kbps. Instead of specifying a bitrate, set a quality factor:
-q:v 5
– Gyan – 2017-07-27T13:33:18.257Thanks. I thought I could save processing power if I somehow kept the bitrate. – GreenSmurf – 2017-07-27T13:50:22.603
No, absolutely not. The video stream will be first decompressed (using H264) and then compressed (using MPEG4 or whatever) again. These processes run completely independent from each other. – Daniel B – 2017-07-27T18:57:59.307