Avconv option -c:a copy

audiolibav

I am converting a bunch of videos from FLV to MP4 (for iphone compatibility) and using AAC codec it kept throwing out "invalid audio bitrate" or similar errors. I tried -c:a copy option and it works, but I am wondering if that tells avconv to use the original MP3 codec or just the original audio bitrates/frequencies?

avconv -i input.flv -s 640x480 -b 1248k -vcodec libx264 -acodec aac \
-strict experimental -c:a copy output.mp4

Best Answer

-c:a copy means that the input audio will be copied as is, without any transcoding. So if your input has mp3 audio, the output will also be mp3, an exact copy of the input.

The reason it complains about invalid bitrate is most probably -b 1248k. That option written like this means 'set the bitrate of all output streams to this value'. What you probably want is -b:v, which only sets the bitrate for video. Similarly, -b:a would set the bitrate for all audio streams.

Related Question