2

I am using FFmpeg version 3.2.2 and LAME 3.99.5 on macOS Sierra (10.12.2) and I have this command that pipes FFmpeg output (from a FLAC file) to LAME for encoding into an MP3:

ffmpeg -y -v quiet -nostdin -i test.flac -b:a 320k -ac 2 -ar 44100 -f s16le -acodec pcm_s16le - | \
  lame --quiet -r -m s --lowpass 19.7 -V 3 --vbr-new -q 0 -b 96 --scale 0.99 --athaa-sensitivity 1 - test.mp3;

It works fine and I am happy with the results, but when I remove the -v quiet setting from the FFmpeg part of the pipe—so I can actually see what’s happening—I notice the following in the output:

Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> pcm_s16le (native))
size=   81858kB time=00:07:55.18 bitrate=1411.2kbits/s speed=41.2x  

Note the bitrate is being shown as 1411.2kbits during the conversion process and not the set bitrate of 320k from the -b:a 320k option being set.

Is this expected behavior? Is that whole chunk of audio parameters (-b:a 320k -ac 2 -ar 44100) superfluous when piping output via RAW output using -f s16le -acodec pcm_s16le since that bitrate setting is being ignored?

5

Is this expected behavior?

Yes, bitrate (-b:a) is ignored when outputting an uncompressed format. The resulting bitrate is:

sample rate * bits per sample * number of channels = bitrate

So in the case of yours:

44100 * 16 * 2 = 1411200 bits/s or 1411.2 kilobits/s

Is that whole chunk of audio parameters (-b:a 320k -ac 2 -ar 44100) superfluous when piping output via RAW

The bitrate is superfluous. If you want to change the number of channels or the sample rate for whatever reason you can keep -ac and -ar (but you'll likely never need to).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.