Hi, soory but I'm a ***
why using ffmpeg withthe AAC audio encoder, the resultant bitrate is alwais Variable Bit Rate ?Code:-c:a aac
I need to encode using AAC and absolutly CBR, not VBR. How is possible that? thanks
+ Reply to Thread
Results 1 to 14 of 14
Why use a low quality aac encoder when you can use a high quality one?
Use Apple's, the best one available.
Download iTunes and extract with this script (it comes with MeGUI)
@echo off setlocal disabledelayedexpansion for /F "tokens=1,2*" %%i in ('reg query HKLM\Software\7-Zip /v Path') do ( set "PATH=%%k;%PATH%" ) 7z >NUL if not %errorlevel% == 0 ( echo 7z.exe is required goto end ) if not "%~1" == "" ( set "installer=%~1" ) else if exist iTunes6464Setup.exe ( set installer=iTunes6464Setup.exe ) else if exist iTunes64Setup.exe ( set installer=iTunes64Setup.exe ) else if exist iTunesSetup.exe ( set installer=iTunesSetup.exe ) else if exist QuickTimeInstaller.exe ( set installer=QuickTimeInstaller.exe ) else ( echo installer executable not found goto end ) 7z e -y "%installer%" AppleApplicationSupport.msi 7z e -y "%installer%" AppleApplicationSupport64.msi if exist AppleApplicationSupport.msi ( call :extract QTfiles AppleApplicationSupport.msi ) else ( echo cannot extract AppleApplicationSupport.msi from installer goto end ) if exist AppleApplicationSupport64.msi ( call :extract QTfiles64 AppleApplicationSupport64.msi ) goto end :extract mkdir %1 7z l -i!CoreAudioToolbox.* %2 | findstr CoreAudioToolbox if errorlevel 1 ( 7z e -y -o%1 ^ -i!*AppleApplicationSupport_ASL.dll ^ -i!*AppleApplicationSupport_CoreAudioToolbox.dll ^ -i!*AppleApplicationSupport_CoreFoundation.dll ^ -i!*AppleApplicationSupport_icudt*.dll ^ -i!*AppleApplicationSupport_libdispatch.dll ^ -i!*AppleApplicationSupport_libicu*.dll ^ -i!*AppleApplicationSupport_objc.dll ^ -i!F_CENTRAL_msvc?100* ^ %2 pushd %1 for %%f in (AppleApplicationSupport_*.dll) do ( for /F "tokens=1* delims=_ " %%t in ("%%f") do move /Y %%f %%u ) for %%f in (x64_AppleApplicationSupport_*.dll) do ( for /F "tokens=2* delims=_ " %%t in ("%%f") do move /Y %%f %%u ) for %%f in (F_CENTRAL_msvcr100*) do move /Y %%f msvcr100.dll for %%f in (F_CENTRAL_msvcp100*) do move /Y %%f msvcp100.dll popd ) else ( 7z e -y -o%1 ^ -i!ASL.dll ^ -i!CoreAudioToolbox.dll ^ -i!CoreFoundation.dll ^ -i!*icu*.dll ^ -i!libdispatch.dll ^ -i!objc.dll ^ -i!pthreadVC2.dll ^ %2 mkdir %1\Microsoft.VC80.CRT 7z e -y -oQTfiles\Microsoft.VC80.CRT ^ -i!msvcp80.dll.* ^ -i!msvcr80.dll.* ^ -i!manifest.* ^ AppleApplicationSupport.msi pushd %1\Microsoft.VC80.CRT rem strip assembly version number from filenames of msvc runtime dlls for %%f in (msvcr80.dll.*) do move /Y %%f msvcr80.dll for %%f in (msvcp80.dll.*) do move /Y %%f msvcp80.dll rem find needless one out of the two manifests and remove it for /F "delims=:" %%t in ('findstr win32-policy manifest.*') do del %%t rem rename manifest for %%f in (manifest.*) do move /Y %%f Microsoft.VC80.CRT.manifest popd ) exit /b :end if exist AppleApplicationSupport.msi del AppleApplicationSupport.msi if exist AppleApplicationSupport64.msi del AppleApplicationSupport64.msi endlocal
General Complete name : E:\Media\FF\WeaveSample_aac.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/mp41) File size : 748 KiB Duration : 46 s 998 ms Overall bit rate mode : Constant Overall bit rate : 130 kb/s Writing application : Lavf58.22.100 Audio ID : 1 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 46 s 998 ms Bit rate mode : Constant Bit rate : 129 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 738 KiB (99%) Language : English Default : Yes Alternate group : 1
[Attachment 47307 - Click to enlarge]
libfdk_aac seem also produce variable bitrate... perhaps this may be related to aac profile or something else...
Last edited by pandy; 25th Nov 2018 at 19:30.
If you check this: https://hydrogenaud.io/index.php/topic,82865.0.html then answer is quite explicit:
MPEG-2 nbc (aka aac) does not make a specification of packet sizes, but instead specifies an Average bitrate that should be achieved (ABR).
I guess I got that the wrong way around. I'm sure it works differently for mp3 encoding, where if you don't specify a bitrate you get VBR, specifying a bitrate on it's own gives you CBR, and specific a bitrate with -abr gives you an average bitrate encode.
Anyway, I tried four different AAC encoders in CBR mode (ffmpeg, QAAC, FDKAAC and NeroAAC) and they all resulted in bitrates that varied a little, so I guess there's no such thing as truly CBR AAC.
To add to the fun through, QAAC and FDK AAC both added CBR to the written encoder information, and (coincidentally?) MediaInfo declared them both to be variable bitrate.
Writing application : fdkaac 0.6.3, libfdk-aac 3.4.22, CBR 128kbps Audio ID : 1 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 3 min 56 s Bit rate mode : Variable Bit rate : 128 kb/s Maximum bit rate : 163 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 3.61 MiB (99%) Encoded date : UTC 2018-12-02 03:50:36 Tagged date : UTC 2018-12-02 03:50:36Code:
Writing application : qaac 2.67, CoreAudioToolbox 18.104.22.168, AAC-LC Encoder, CBR 128kbps, Quality 96 Encoding Params : (Binary) Audio ID : 1 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 3 min 56 s Bit rate mode : Variable Bit rate : 128 kb/s Maximum bit rate : 136 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 3.61 MiB (99%) Encoded date : UTC 2018-12-02 00:43:48 Tagged date : UTC 2018-12-02 00:43:54
Are you determining if it's "VBR" or "CBR" with "mediainfo" ? How accurate is that ?
I'd put more weight in the results from a plot like the one in pandy's post. At least it looks a bit more authentic. But mediainfo said it was CBR there too....
A long time ago, there was CT-AAC , and it was known for CBR AAC . I don't know if it's true, and I don't know of a good way to measure an audio bitrate plot
Yeah, with MediaInfo.
I only mentioned it as I thought it was a little funny there were two encoders that included CBR along with their writing application details, and they were the two MediaInfo show as being VBR.
I assume they're all a little VBR. Probably due to the bit reservoir system, and I remember there being a "fill" element for AAC encoders to use to keep the bitrate somewhat constant.
I opened an encode from each encoder with MP3DirectCut and it sees them all as ABR, and I have foobar2000 configured to display the bitrate in real time, and for all four encoders it changes a little as the audio plays. No doubt they all confirm to the AAC specification in respect to CBR, but obviously it's not absolutely constant.
For CBR MP3 it always jumps to something a tad higher than the constant bitrate when it begins playing the MP3, but it goes straight back to the MP3's constant bitrate and never changes after that. It shows CBR for AC3. I'm not sure I've met any VBR AC3 audio. I guess I could make one....
For MP3 there could be more information to work with, which might help. There's info in the Xing header I'm not sure how to interpret yet, although it would appear there's bitrate information written to every MP3 frame. For a 128k CBR MP3 it's always 128. For VBR MP3 it varies.
There's even less I understand about what MediaInfo shows for AAC, but once you drill down past the tag and element info, what it displays seems to relate to bitrate. The second two screenshots are the info MediaInfo displays close to the end of two NeroAAC encodes for a track that faded to silence. The first encode was 128k CBR. The second was encoded with Nero's default VBR setting, which resulted in a higher average bitrate, but towards the end of the track you can see the difference. If the byte values relate directly to bitrate then CBR AAC isn't always constant.
1. MP3 128k CBR frame.
2. AAC 128k CBR
3. AAC VBR
Last edited by hello_hello; 2nd Dec 2018 at 13:56.
To mention the elephant in the room, what I'd like to know is why you think you MUST have cbr?
Is there a service you are attempting to provide to that is expecting that? If so, do they really mean that it must, or is that just what they say to get people to encode properly? Or are you just assuming that's what they need?
Or is it an app that is rejecting your vbr/abr encodes? I find that very unlikely.
Last edited by Cornucopia; 11th Sep 2020 at 20:21.