[FFmpeg-user] MP4s (and M4As) for music

Mark Filipak markfilipak.imdb at gmail.com
Sun Jun 8 19:59:56 EEST 2025


On 08/06/2025 04.47, Ferdi Scholten wrote:
> On 08-06-2025 04:21, Mark Filipak wrote:
>> The script above provoked this: "Too many bits 15269.442177 > 12288 per frame requested, clamping 
>> to max". Of course, I have no idea what that's about. Do you? "Too many bits"?
> Simple, the fixed bitrate you specified is very much too high for the audio you provide. ...

It is? I'm providing 657.6 k-bits/second/channel (i.e. pcm_s16le) and I'm specifying '-b:a 657.6k' 
It seems right to me.

(41.1 k-samples/sec/channel)*(16 bits/sample)=657.6 k-bits/second/channel

If that's not correct, then what bit rate does the encoder want? and why would it want anything 
other than pcm_s16le? And if pcm_s16le at 657.6 k-bits/second/channel is too fast, do I need to 
resample from 41.1 k-samples/sec/channel to something lower? What do you suggest and why?

I'm truly not happy with FFmpeg's lack of support for pcm-in-mp4.

>... The encoder is complaining about that. Either specify a lower bitrate or use variable bitrate instead.

Thanks, Ferdi. Can you be more specific? Can you provide numbers, bounds (i.e. upper and lower 
limits on the numbers), and units (i.e. dimensions of the numbers)?

The documentation is just too sparse and too illogical.

b    Set bit rate   ...of what? the encoder's input? the encoder's output?
  in bits/s   ...total bits/s? bits/s/channel?
  Setting this automatically activates constant bit rate (CBR) mode   ...fine, that's what I want
  If this option is unspecified it is set to 128kbps   ...huh? if it's unspecified, it's not cbr, is 
it? or is this telling me it's always cbr?

q    Set quality   ...what are the units?
  for variable bit rate (VBR) mode   ...how do you specify vbr?
  This option is valid only using the ffmpeg command-line tool. For library interface users, use 
global_quality   ...huh?

There's not enough documentation there to know anything.



More information about the ffmpeg-user mailing list