Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Low bitrate MP3 (+ unsupported bitrates) (Read 4268 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Low bitrate MP3 (+ unsupported bitrates)

Hello. MP3 does not support 18kbps and 20kbps but Adobe Flash CS6 can encode 20kbps, and Adobe Media Encoder CS6 can encode 18kbps and 20kbps. How this is possible? And, is encoding 12kbps (and maybe 10kbps and 14kbps) possible with this way while it's not supported? If yes, which encoder can export (preferably good quality) sound with 8-10-12-14kbps range? (16kbps sounds very good if it's encoded with Adobe Flash CS6 but 8kbps does not sound very good.) My target sampling rate is 11025Hz and i'm targeting CBR Mono.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #1
Those Adobe tools aren't limited to MP3. They support newer AAC audio format. The HE-AAC format they support is meant for low bitrate use and beats MP3 hands down.
There are multiple HE-AAC audio encoders. And there is newer option, xHE-AAC. And you could try open Opus format too.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #2
Thanks Case, but i want to use MP3 in most cases. Plus, these codecs are not supported for most tasks including Adobe Flash. Plus, MP3 is very flexible: supports mono and stereo in one file, can be edited with notepad (you can combine two MP3's with notepad and they will play), very strong (stays playable even after being distruptively edited by notepad) and more.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #3
Now i'm tried opus and it sounds horrible for 16kbps and 8kbps compared to MP3. Also it does not support 11025Hz, 22050Hz, and 44100Hz while these are my target sampling rates.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #4
Now i'm tried opus and it sounds horrible for 16kbps and 8kbps compared to MP3. Also it does not support 11025Hz, 22050Hz, and 44100Hz while these are my target sampling rates.

That's very unexpected. Opus should do *much* better than MP3 at such exceedingly low bitrates. Do you have an example file to toy around with?

Edit: If you happen to encode with ffmpeg: Don't use the interal Opus encoder, use libopus.

Edit2: One can encode non-standard bitrates in MP3 in "free format" mode. For instance "lame -b 18 --freeformat music.wav freeformat.mp3". This is, however, non-standard and needs a supporting decoder. This throws away most of the compatibility benefit MP3 has.

Edit3: Also, of course, one can do ABR-encoding with a bitrate target of 18 or 20 kbps.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #5
Now i'm tried with libopus and it is still terrifying. MP3 is bad for 8kbps too, but looks like opus is worse for music. I guess it can be better for voice. AAC, on the other hand, sounds like a bit better than MP3. I'm going to upload a first few seconds of my test files.


Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #7
By the way, these 20kbps MP3 files are marked as 24kbps and Flash Player plays them without a problem. 18kbps files are marked as 16kbps.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #8
@Klymins, when people ask about extremely uncommon things without giving a use case where such things would seem appropriate, there is a temptation to assume that the person is solving an XY problem, e.g. how to hammer nails with a microscope. Could you explain why a specific bitrate, CBR mode and mono sound are important to you?

Take, for example, the point-n-click adventure game Broken Sword (1996), where the audio is mostly stored as 11025 Hz 16 bit mono. I'm going to compress a fragment, which contains speech and music, using Fraunhofer 3.1 (CBR), GXLame 5.3 (CBR & VBR), Helix 5.2.3 (VBR with forced resampling to 22.05 kHz), and Vorbis Aotuv 6.03 (VBR).



Code: [Select]
$ mp3enc.exe -br 24000 -esr 11025 -if history.wav -of history.frau.11khz.cbr.br24000.mp3
$ gxlame.exe -b 24 -h history.wav history.gxlame.11khz.cbr.b24h.mp3
$ gxlame.exe -V# -h history.wav history.gxlame.11khz.vbr.v#h.mp3 (# = 24, 32, 40)
$ hmp3.exe -V24 history.wav history.helix.22khz.vbr.V24.mp3
$ oggenc2.exe history.wav -q # -o history.aotuv.11khz.vbr.q#.ogg (# = -1, 0, 1)

  Bytes    Kbps   Filename                      
 -------- ------ -------------------------------
  34 913   17     history.aotuv.vbr.q-1.ogg     
  37 599   18     history.gxlame.vbr.v24h.mp3   
  41 814   20     history.gxlame.vbr.v32h.mp3   
  47 330   22     history.gxlame.vbr.v40h.mp3   
  50 173   24     history.aotuv.vbr.q0.ogg      
  50 648   24     history.gxlame.cbr.b24h.mp3   
  51 095   24     history.frau.cbr.br24000.mp3 
  51 584   25     history.helix.vbr.V24.mp3     
  56 562   27     history.aotuv.vbr.q1.ogg
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #9
Opus encoded by Shotcut libopus.
Doesn't look like libopus:
Code: [Select]
]$ opusinfo lo2.opus
...
Encoded with Lavf58.29.100
User comments section follows...
        encoder=Lavf58.29.100

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #10
I shouldn't have suggested Opus, I didn't remember that it's not meant for such low bitrates. It's indeed horrible at ultra low bitrate, mp3 is muffled but Opus is metallic and glitchy. The Xiph's recommended settings page thinks Opus starts beating MP3 and others at around 64 kbps.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #11
@Kraeved In fact, CBR is not necessary (i want it because it's easier to work with it) but i want mono because i think stereo is not going to be sound good below 20kbps or 16kbps. And, i already can produce a good quality sound with 16kbps, the reason that i want to use below is: can i make a good sound with these bitrates? 20kbps stereo sounds good and 16kbps mono sound better than it, so i thinked lower bitrates must be able to produce good sounds. @danadam You can be right, i selected libopus from shotcut but i don't trust it.

And, i must use MP3 because Flash Player does not support these newer alternatives even if some of them can sound better.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #12
You do realize that Flash is dead and buried?

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #13
@Klymins, Is it a matter of disk space or bandwidth ?   If not then why not :
Create a preset in foobar2k :  source to output = WAV
Add these DSP's:
> re sampler=44.1
> convert mono to stereo

Then in CS6, encode the new WAV's as mp3 cbr 112 or 128

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #14
@Case I realize Flash is not supported anymore but this is not a reason for me to stop using it. @shadowking i can't understand, sorry, can you explain a little more?

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #15
@Case I realize Flash is not supported anymore but this is not a reason for me to stop using it. @shadowking i can't understand, sorry, can you explain a little more?

Scale input to 2ch stereo-16bit-44.1khz. That way you are dealing with stereo 44.1 and encode to 128k etc.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #16
@shadowking What is the advantage of this?


Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #18
@Klymins, it seems to me that you have fallen into the trap of premature optimization and are overzealous in trying to reduce the bitrate while maintaining the quality. Make minimum viable product first, get some feedback, and then decide whether it's worth getting carried away with such a, cough, fine-tuning.

From my table, it should be obvious that the relationship between bitrate and space taken is extremely small at this scale (a few kilobytes), but the difference by ear between 16 and 24 kpbs is quite noticeable (download and listen to “Broken Sword - History” samples if you haven't done so yet). There are reasons why bitrate is usually associated with powers of 2, more common bitrates are much more likely to have psychoacoustic enhancements, etc.

Therefore, I suggest following the KISS principle, i.e. keeping it simple unless you have no choice, and using one of the above-mentioned encoders (three for MP3, one for Vorbis OGG) without lowering the bar below 24 kpbs and giving priority to mono — the mankind has listened to this quality for decades (double the bitrate for stereo), and some still listen to it on smartphones and boomboxes, not to mention it will pair well with a, cough, vintage Flash technology.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #19
@shadowking I don't think it will be more compatible but thank you anyway. @Kraeved No, i don't think i'm overcomplicating it. If i can produce for example 12kbps mono with a good quality, this will not complicate the output SWF file, this will just complicate the production of the file. And, disk space is important for me. My output SWF files must not be bigger than roughly 1 or 2 megabytes. 24kbps is too high for me, 16kbps is already my standard (most flash games used 16kbps sounds and they were sounded very well). I can do the minimum viable product already.  I'm just thinking: can I do better?

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #20
lame -b16 -mm --resample 11 *.wav

Its working here fine. Lame 3.100.1

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #21
@Klymins is the purpose to listen to music for personal enjoyment?
Or is this for some project you're working on to create low bitrate audio that is acceptable for the project?

If it's the former then I cannot understand why you'd want to go so low with the bitrate when the audio is clearly so much worse than the lossless source; i.e. it is not transparent at all and unless one has a hearing issue (maybe you have?), then it seems nonsensical to me.

I have some aac music audio files that were encoded by someone else at ~64kbps and they sound very good for such a low bitrate (the excellence of modern codecs at low bitrates shines). But for personal listening (via my mobile using headphones and also connected in my car) I use Apple aac (qaac) with (T)VBR q64 which aims for 128kbps. But I dare say aiming for 64kbps for me would be acceptable in the car for instance.

Of course, there's no issues in discussing this desire for such low bitrates in an mp3 for example and it's an interesting subject. I'm just confused as to why - if it is indeed for music listening pleasure - you'd want to go so low when you'd almost certainly be able to ABX between it and the source lossless files... and between say even 64kbps mp3s and aacs.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #22
@jaybeee The purpose is putting audio files insisde Flash movies but 16kbps mono 11025Hz MP3 sounds very fine to listen with linear interpolation. It sounds like a junk only with stronger interpolations, and this is not a problam as Flash Player uses linear interpolation.

16kbps MP3 is much easier to listen for me because it's "simplified" by the MP3 algorithm and high frequencies are in relationship with low frequencies as they are just reflections. 11025Hz is a magical sampling rate for me. And, i don't have any hearing issues, my both ears can hear higher than 16kHz.

I can accept a little bit lower quality than 16kbps MP3 by Adobe Flash CS6 and if this quality can be achived with ~12kbps that will be good for me because this means i can use more/longer musics.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #23
In foobar2k, create a preset for lame mp3 with the following command:

lame -b16

Then add dsp in converter preset options:
-resampler(dbpoweramp) = 11.25k
-downmix stereo to mono

This has given me a mono 16k cbr mp3 file tested OK with speech.  8k was too low quality for me.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #24
I prefer Adobe Flash CS6 for 16kbps.