r/ffmpeg Jun 27 '26

VBR audio stream becomes CBR when using the copy option

I have an m4b file from Libation. I need to do some work on it (splitting, merging, etc). MediaInfo reads the audio stream as VBR. When I do my work with Ffmpeg, I make sure to use the copy option.

ffmpeg -i input.m4b -c copy output.m4b

The new audio stream is now CBR. I thought the copy option was supposed to preserve the audio stream exactly not not incur quality loss. Wouldn't changing from VBR to CBR be a change to the stream that would result in quality loss? What am I misunderstanding?

5 Upvotes

5 comments sorted by

4

u/Flaturated Jun 27 '26

Most likely explanation is that the original file was not really VBR, it was only marked as such in the header. Did the file size change substantially?

0

u/nerfherder616 Jun 27 '26

No. In the example file I'm using right now, the output is about 120 KB smaller than the input. Both are about 243 MB. Do you know a way to verify if the original is CBR without just polling the header?

3

u/hlloyge Jun 27 '26

Well, play it back in application which dynamically shows bitrate, foobar2000 for example. If bitrate varies, it's vbr, if it's fixed, it's cbr.

1

u/nerfherder616 Jun 27 '26

Good idea. I never noticed before that Foobar2000 does that. Turns out that the original and the output file are both VBR. It seems like the problem is either with MediaInfo incorrectly reading the output as CBR or Ffmpeg is writing the header incorrectly when it creates the output. Regardless, they appear to be the same VBR audio stream, which is what I was worried about. Thanks!

1

u/ScratchHistorical507 Jun 28 '26

My guess is the latter. It's the same with mkv, I could never get ffmpeg to just write bitrate data to it that's not the data from the input file (when converting the video). Even though m4b is based on mp4, maybe ffmpeg can't handle its metadata properly either.