CBR or VBR - how to detect? |
![]() ![]() |
CBR or VBR - how to detect? |
Dec 7 2011, 17:37
Post
#1
|
|
![]() Group: Members Posts: 216 Joined: 9-December 02 From: Croatia Member No.: 4037 |
Hi,
I have an AAC file that is being reported by the "MediaInfo" tool as VBR. How do these tools judge if AAC is CBR or VBR? How is AAC CBR different than AAC VBR, is there a limit in frame size differences accros file? Thanks... |
|
|
|
Dec 17 2011, 11:48
Post
#2
|
|
|
Group: Members Posts: 56 Joined: 19-January 11 Member No.: 87451 |
Hi,
In CBR, constant bit rate mode, each frame is encoded with bits = bit_rate/sampling_rate*frame size. The use of bit reservoir allows a local variation of bits between frames. ie frames which require less bits to encode gives away its bits to encode complex portions of the music, but the bits/ channel cannot be greater than 6144 bits as per the standard. The left over bits are used as fill bits(zero's) in order to maintain the desired rate. In case of CBR mode, we can correctly find out the file size by calculation. But in VBR, variable bit rate ,each frame can be encoded with a max of 6144 bits/channel. Here since we do not know what can be the bits used for encoding each frame, we cannot predict the file size. Also in VBR no fill bits are used. Hope it helps Regards Pratheek |
|
|
|
Feb 3 2012, 10:56
Post
#3
|
|
![]() Group: Members Posts: 216 Joined: 9-December 02 From: Croatia Member No.: 4037 |
Hi, I have an AAC file that is being reported by the "MediaInfo" tool as VBR. How do these tools judge if AAC is CBR or VBR? How is AAC CBR different than AAC VBR, is there a limit in frame size differences accros file? Thanks... Ok, here is a code snippet where MediaInfo decides on the bitrate: CODE void File...() { if (FrameSize_Max>FrameSize_Min*1.02) { Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR"); Fill(Stream_Audio, 0, Audio_BitRate_Minimum, ((float64)FrameSize_Min)/1024*48000*8, 0); Fill(Stream_Audio, 0, Audio_BitRate_Maximum, ((float64)FrameSize_Max)/1024*48000*8, 0); } else if (Config_ParseSpeed>=1.0) { Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR"); } } Seems like they flag stream as VBR if max frame is more than 2% greater than the min frame. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 00:15 |