New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The slider setting value for AAC/MP4 export is not honored by Audacity - and the slider cannot make precise settings #1818
Comments
This was reported today on the Forum: It looks to be the same issue as this one logged in Bugzilla, which I shall close in favor of this GitHub issue |
This of course may change with an updated FFmpeg version ... |
Well whoever knew that? Is is documented or just an easter-egg ? |
Looks like an easter-egg to me: |
I don't think this is a documented feature. |
It's not a documented feature - I looked earlier this morning, that's why I said it's an easter-egg ;-) Apart from that one has to ask the question: just why us the slider so small in width anyway? There is plenty of additional screen real-estate in the M4A(AAC) export dialog to widen it and make it easier to use. |
OK so now for the upcoming 3.1.0 I have revealed this Easter-Egg in a tip div: See: https://alphamanual.audacityteam.org/man/AAC_Export_Options#Format_Options |
Are there any updates on this? I'm still getting the same problem in version 3.1.3 of Windows 10 64-bit. |
@crsib Dmitry does this need updated FFmpeg in order to fix this ? |
Perhaps "b)" should be split off into a separate issue, as the more serious issue is (a) that the exported file does not have the bit-rate specified by the user, and there is no good workaround for this issue. |
And of course the user usually has no idea at all that the bit-rate is not the one they specified and that is why this is important to get fixed ... BTW there is a good workaround:
This is the method I always used when converting my vinyl and tapes for use on my iPods. This tutorial in the Manual has long recommended this approach: And this Workflow in the Manual (linked to from the above tutorial) explicitly uses this method: |
I don't think it's particularly "good" for a software development company if they have to say "use a different app" to do something that their app is supposed to be able to do. Perhaps a better workaround is to use Audacity's command line encoder, for example: |
As it looks likely that this bug may not get fixed any time soon I have updated this page in the manual with Advice divs about this bug to warn the user: And also on other related pages: |
BUMP - and yesterday/today is yet another Forum user complaining about this issue: @LWinterberg @dozzzzer @Tantacrul @crsib |
The other thing I note about Audacity's M4A?AAC export dialog is that there is no option to choose between CBR and VBR. This is not the case with MP3 export where the user can choose. And note that the poor old user is left in the dark with M4A/AAC export as to which is being used. I tend to infer from the dialog GUI that it may be CBR - but who knows ... UpdateCareful reading of the Manual shows that actually "a form of VBR" is used" - but we know how few readers bother to RTFM (and its hidden at the bottom of the page) If an option for CBR is not to be provided, then it would make makes sense to change the wording in the dialog to say: and that, surely, cannot be difficult to do at all. |
We should fix the docs about how to get FFmpeg as well or send Buanzo the new builds as well @LWinterberg |
Unless I'm mistaken, this really seems like a separate issue. I agree, it should be an exposed parameter for sure. |
@Tantacrul the recent Forum post is complaining about the issue as stated "The slider setting value for AAC/MP4 export is not honored by Audacity - and the slider cannot make precise settings" I added a related thing for VBR/CBR in this thread - is that what you are saying is a separate issue? If so do you want me to raise a new issue for it? |
Probably let's just update this issue title and description. We need to investigate first the possible inputs for ABR/VBR/CBR anyway |
I can say for sure, that VBR expects the quality from 1 to 5, not the bitrate ===== And turns out that depends on the encoder. "Native" encoder expects a float between [0.1,2]. Fraunhofer integer from 1 to 5 |
Bump @LWinterberg @dozzzzer @crsib This is a long-standing bug that really should be fixed (we get lots of user complaints about this). Any chance it can get fixed for 3.2.0 please? |
As you can see it got added to the 3.2 milestone yesterday |
Still the case on 3.2.0 Beta on W10 See this recent Forum post with yet another user complaining about this: |
Testing @ksoze95 's Kit's latest branch build on W10: https://github.com/audacity/audacity/actions/runs/3068870464 Testing the STR - i.e requesting a 320 kbps AAC file I get much closer now with 317 kbps. I have not had time today to test other settings (I may be able to do that over the weekend) |
Further testing with @ksoze95 latest branch on W10 and macOS 12.5/1 - https://github.com/audacity/audacity/actions/runs/3068870464 I get vastly different results on both platforms - test file id track 1 fro Sergeant Pepper's Lonely Hearts Club Band. W10requestedrate actual rate SizeMB So close but not accurate for rates of 192 kbps and above - and plain wrong for rates below 192 kbps Also note that for any selected rate below 98kbps the "remembered rate" on the next visit to File Export as AAC is always 98kbps macOS 12.5.1No matter what I select for the requested rate the rate of the output file I get is always 196kbps and the file size is always 3.1MB Also on Mac the last-used rate is never "remembered" and re-offered on the next visit to File Export as AAC - instead Audacity always offers the default rate of 160kbps |
The W10 behavior looks roughly intended: q = wxClip( q, 98 * mChannels, 160 * mChannels );
// Set bit rate to between 98 kbps and 320 kbps (if two channels) which is the restriction the old slider had; it goes no lower than 98 kbit/s for mono and 196 kbit/s for stereo, and no higher than 160 for mono and 320 for stereo. What I don't know is how necessary this exact range is. The Wikipedia article on AAC has the unhelpful line
Hydrogenaudio and the Fraunhofer AAC encoder apparently recommend a range of 8kbit/s-288 kbit/s per channel for AAC-LC, with the built-in VBR modes supporting 20-112 kbit/s per channel: no idea what the problem is for mac. |
Flagging @Tantacrul as this is a GUI design/UX issue
1) iTunes created AAC filesIn contrast iTunes allows one to go down as low as 64kbps Stereo (or 32kbps mono): And when one examines the file in iTunes it says that it's 64 kbps, 256 kbps - bot some number that's close as Audacity is doing, 2) Audacity 3.1.3In Audacity 3.1.3 the restriction is made clear as we had the slider to indicate (and indeed restrict ) the allowable range: 3) @ksoze95 Kit's branchIn this branch build the limit(s) are not made clear to the user via the GUI Really if the user types an out of range number in that field a warning should be issued and the correction made immediately. Or perhaps we should be restoring the slider that we had previously 4) Continuous range of values or discrete valuesIn contrast with iTunes AAC conversion and also Audacity's MP3 conversion where a pick-list range of discrete values is offered - Audacity's AAC conversion offers a continuous range 98-320 (this has always been the case with Audacity's Audacity conversion). Maybe it would be better (and more consistent) if we followed that Audacity MP3 model: |
AAC is very complex codec with different implementations doing compression differently. We can only rely on the "native" FFmpeg encoder, there is no way to guarantee the Fraunhofer encoder is present. Default encoder from Apple is definitely not usable now. What makes everything even more complex - Fraunhofer and FFmpeg "native" encoders are configured quite differently.
I'm not sure what you mean. Setup for M4A file format was never done right. There is a possibility, that FFmpeg changed the meaning of
AAC and MP3 handle bitrate differently. We can extend the input range, though. It is quite hard to tell, when native ffmpeg encoder will fail. |
@crsib Dmitry, boy oh boy - this makes me real glad that I always exported as WAV and then used iTunes to make the AAC (and MP3) conversions that I needed for my iPods |
I was working on the text entry validation, but unfortunately did not manage to get it working before I took my annual leave. A later PR will address this issue. |
So I'm guessing this will not make 3.2.0 release then ? |
@ksoze95 @petersampsonaudacity |
Generally FFmpeg does not really allow to set the precise value. You can play with Optionally you can change the codec to |
Describe the bug
a) The slider setting value for AAC/MP4 export is not honored by Audacity.
b) Plus it is very hard (perhaps impossble) to set precise values - I found it impossible to set it to the "standard" rates of 192kbps and 256kbps
To Reproduce
Steps to reproduce the behavior:
Expected behavior
a) Audacity should export at the rate the user selects
b) The slider should allow for more precise setting (making it wider may help_
c) the user should be able to set a precise kbps value by typing it in (cf. MP3 export and mic/speaker sliders)
Screenshots
None
Additional information (please complete the following information):
Additional context
Note that I am using the "recommended" FFmpeg the 64-bit Win downloaded from Buanzo's site
This of course may change with an updated FFmpeg version ...
This does not happen with MP3 export in Audacity - the precise value is used for the exported file
Note that MP3 export uses a picking list and not a slider for the kbps setting - so we have an inconsistency issue here
The AACs that I have were made in iTunes,
4.1) I export fro m Audacity as 16-bit WAV files
4.2) I import those WAV files into iTunes
4.3) I use iTunes to convert these WAVS to AAC files choosing 256kbps
4.4) I observe that iTunes converts these to 256kbps AAC files:
The text was updated successfully, but these errors were encountered: