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 4518 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #25
18 is out of spec so must be freeformat. I remember years ago there was this fhg encoder that did 144cbr etc and it was a playable cbr file not freeformat. Maybe that is what cs6 is doing @ 18..20

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #26
144kbps is inside of specs. Anyway, how can i get ~12kbps that works with Flash Player?

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #27
lame --freeformat -b12 -mm --resample 11

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #28
Which LAME version is recommended? (I didn't like LAME's sound color in my tries. I used Shotcut.)

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #29
Which LAME version is recommended? (I didn't like LAME's sound color in my tries. I used Shotcut.)
3.100.1 ,  BTW you add -q6 or -q7 to see if sounds better.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #30
lame --freeformat -b12 -mm --resample 11

Why do you keep pushing that devilish freeformat? Do you know many players that can decode it? MPV that utilizes mpg123 — yes. 1by1, AIMP, FFPlay, Foobar2000, MPH-HC, Resonic, Winamp, XMPlay, you name it, let alone web-browsers — no. It's an optional part of the spec, an experiment that has not received recognition if you will.

Which LAME version is recommended? (I didn't like LAME's sound color in my tries. I used Shotcut.)



Shotcut is a video editor, not an audio encoder. In case of exporting your project to MP3, it can utilize either LAME (libmp3lame) or MediaFoundation (mp3_mf) encoders of the bundled FFMPEG. By the way, they use the outdated version 5.1.2-9, whereas the current one is 7.0. It seems you tried its non-optimal options (e.g. they don't offer 24 kHz sample rate, but offer a pointless 1 Mbps bitrate), and then decided to puzzle us with the question what to do next. And I've already answered you by listing encoders that work well with low bitrates. Why don't you try them?
• 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 #31
@Kraeved How can i run GXLame or Helix? Double clicking did not do anything and i don't know how to specify filenames etc.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #32
@Klymins There is no substitute for hours of practice if you are going to create a convincing reproduction of any famous painting. The same applies to audio conversion. There are many free and commercial apps (Xrecode, dBpoweramp, Foobar2000 to name a few) with tons of options. But there is not a single app with a single “Do it” button that could solve your specific task of creating a good-sounding copy with a minimum size in MP3 format. Such apps exist only for the most common tasks, for example, to convert FLAC into high quality MP3. This means that one way or another you will have to work hard, step by step figuring out the purpose of each option, gradually building a chain of commands that will lead you to the long-awaited result. At this stage, it seems you are faced with the fact that you do not know how to use command line apps (such as audio encoders GXLame and Helix) that do not have their own window. But the thing is, all audio encoders are inherently windowless, so you have to learn that first.

Eventually, you'll end up with a more or less similar chain of commands that I used here to convert bee.FLAC 96000 Hz 24 bit stereo into bee.WAV 11025 Hz 16 bit mono, and then to bee.MP3 using GXLame 5.3 with options --abr 16 -h. The 16.6 kbps result sounds clear enough and it is hardly possible to do better. As a bonus, I attach a 15.5 kbps fragment from the Gladiator soundtrack.

• 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 #33
@Kraeved How can i run GXLame or Helix? Double clicking did not do anything and i don't know how to specify filenames etc.
Run them in a command terminal at a command prompt, not from a GUI.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #34
Which command line commands will run these functions? I think they must be different for each encoder, right?

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #35
Which command line commands will run these functions? I think they must be different for each encoder, right?
The commands for encoders and the sound they produce are here and there.
You have no other choice but to read more carefully, because everything you need to know has already been said above.
• 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 #36
I missed, thanks. I will try in soon.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #37
@Kraeved Now i tried GXLame and Helix but they did not give ~12kbps. GXLame gave ~16kbps and helix gave ~20kbps + helix gave 22050Hz. MP3ENC looks like not free and looks like it's payment system is down. What can i do?

Commands:
hmp3.exe -V12 hmp3.wav hmp3.v12.mp3
gxlame-t5.3.exe -b 12 -h gxl.wav gxl.mp3

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #38
Now i tried GXLame and Helix but they did not give ~12kbps.

gxlame.exe --abr 12 -h in.wav out.mp3

Code: [Select]
GXLame-t5
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band:  5379 Hz -  5513 Hz
Encoding history.wav to history.mp3
Encoding as 11.025 kHz single-ch MPEG-2.5 Layer III (14.7x) average 12 kbps qval=0
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
   324/324   (100%)|    0:00/    0:00|    0:00/    0:00|   56.994x|    0:00
  8 [169] *********************************************************************
 16 [138] *********************************************************
 24 [ 13] ******
 32 [  4] **
 40 [  0]
 48 [  0]
 56 [  0]
 64 [  0]
-------------------------------------------------------------------------------
   kbps       mono %     long switch short %
   12.3      100.0        90.1   5.6   4.3
Writing LAME Tag...done
ReplayGain: -0.2dB
• 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 #39
@Kraeved Much thanks. So, is manually setting the cutoff frequency possible with this? I wrote "--lowpass 3500" but this also changed the sampling rate to 8000Hz. It must be 11025Hz otherwise i can't import this file to Flash. Also, can this tool make 12kbps CBR (18kbps and 20kbps files were CBR)?

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #40
RTFM #1

Quote
MPEG-1 Audio Layer III: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 kbps
MPEG-2 Audio Layer III: 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 kbps
MPEG-2.5 Audio Layer III: 8, 16, 24, 32, 40, 48, 56 kbps

These are the bitrates for MP3 CBR mode. There is no 12 kbps among them. Thus, to get 12 kbps file, which can be played back on a wide range of audio equipment, you have no choice but to use VBR mode (or ABR as a variation of it) so that some of the data is compressed at a lower bitrate and some of the data is compressed at a higher bitrate, producing the output that is as close as possible to the bitrate you specified.

RTFM #2

Quote
If not specified, LAME may sometimes resample automatically when faced with extreme compression conditions (like encoding a 44.1 kHz input file at 32 kbps).  To disable this automatic resampling, you have to use --resample to set the output samplerate equal to the input samplerate.  In that case, LAME will not perform any extra computations.

gxlame.exe --abr 12 -h --lowpass 3500 --resample 11025 in.wav out.mp3

Code: [Select]
GXLame-t5
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band:  3423 Hz -  3556 Hz
Encoding history.wav to history.mp3
Encoding as 11.025 kHz single-ch MPEG-2.5 Layer III (14.7x) average 12 kbps qval=0
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
   324/324   (100%)|    0:00/    0:00|    0:00/    0:00|   60.240x|    0:00
  8 [170] *********************************************************************
 16 [137] ********************************************************
 24 [ 15] *******
 32 [  2] *
 40 [  0]
 48 [  0]
 56 [  0]
 64 [  0]
-------------------------------------------------------------------------------
   kbps       mono %     long switch short %
   12.3      100.0        90.1   5.6   4.3
Writing LAME Tag...done
ReplayGain: -0.2dB
• 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 #42
Hello,

Your example file has an even number of 16kbps and 24kbps frames, averaging to 20kbps.

    AiZ

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #43
@AiZ How can i get this with ~12kbps (ABR does not do that)? And, which program is shown in this screenshot? Addition: By "ABR does not do that", i mean: Let 8kbps frames be letter A and 16kbps ones B. ABR does something like "ABABBAABBABAABABBA" but i want "BABABABABABABABA".

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #44
So, how 18kbps and 20kbps files are CBR and they are working with Flash Player? I'm uploading a 20kbps file example...

What makes you think it's 20 kbps CBR? Because some player told you so? Have you ever thought of double-checking this value via others apps? Especially via apps that are designed to analyze media files? It is not a CBR file, but a VBR (or ABR) file without a proper header, which data is encoded using 16 kbps and 24 kbps, so it gives an average of 20 kbps, since (16×9+24×9)/18=20.

Code: [Select]
$ mediainfo.exe google.mp3

Audio
Format                                   : MPEG Audio
Format version                           : Version 2.5
Format profile                           : Layer 3
Bit rate mode                            : Variable
Channel(s)                               : 1 channel
Sampling rate                            : 11.025 kHz
Compression mode                         : Lossy
Stream size                              : 2.29 KiB (100%)

$ mp3val.exe google.mp3

WARNING: VBR detected, but no VBR header is present. Seeking may not work properly.
WARNING: No supported tags in the file
INFO: 18 MPEG frames (MPEG 2.5 Layer III), no tags, no VBR header

$ mp3packer.exe -i google.mp3

INFO:
 MPEG2.5 layer 3
 18 frames
 11025 Hz
 Bitrate distribution:
   16: 9,0
   24: 9,0

$ mp3guessenc.exe -f google.mp3

Frame histogram
  16 kbps :  9 (50.0%), size distr: [ 9 x 104 B]
  24 kbps :  9 (50.0%), size distr: [ 9 x 156 B]
• 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 #45
@Kraeved I can't say this is VBR or ABR because frame bitrates are selected automatically, not via an algorithm that looks at the contents of this file. I think more than a variable bit rate is required to say it is VBR or ABR. As i said already: Let 8kbps frames be letter A and 16kbps ones B. ABR does something like "ABABBAABBABAABABBA" but i want "BABABABABABABABA". And, my 12kbps files must be marked as CBR even if they are VBR actually. Addition: I also want the additional 4kbps in 16kbps frames to go to the 8kbps frames in a normal sequence via bit reservoir, so it can be really 12kbps.

Addition: I was already sure there is some interesting stuff as foobar2000 says it's 24kbps and it's shorter than actually it is, and i was thinked it is 24kbps at first, but these are still not a reason for me to say it's VBR or ABR per above.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #46


@Klymins You came to the audiophile forum for advice on how to solve the problem of audio compression. This means that you do not have enough personal knowledge to solve it. People who know how to solve such problems spent a lot of time and came to the conclusion that there were very few solutions, then they offered the optimal one.

This command creates an audio file that meets the specifications, users can listen to it even in the browser and it can be used with Flash. Instead of being satisfied with it, you continue to bend your will and demand attention to increasingly bizarre requirements, trying to achieve what is impossible with MP3.

After all, if you're looking for a way to be smarter than established audio encoders and reshape their audio output to your whims, you need a hacker forum. And here your persistence has already grown into annoying stubbornness.

Finally, it makes sense to try the latest version of LAME (today it is 3.101 beta 3) and compare the sound.
• 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 #47
Okay, sorry for my stubbornness, anyway, thanks for recommending GXLame, it is useful.

Re: Low bitrate MP3 (+ unsupported bitrates)

Reply #48
Quote
Starting with Flash Player 9.0.115.0 and AIR 1.0, the runtime can play AAC files (AAC Main, AAC LC, and SBR). A simple optimization can be made by using AAC files instead of MP3 files. The AAC format offers better quality and smaller file size than the MP3 format at an equivalent bitrate. Reducing file size saves bandwidth, which is an important factor on mobile devices that don’t offer high-speed Internet connections. (Adobe Flash manual)

If your Flash app allows you to import AAC encoded audio files, then you may consider using them as well — you can get better sound quality at a size comparable to MP3. There are several encoders and encoding modes, of which in this case I prefer FDKAAC in LC and LC SBR modes. Also, if you feel uncomfortable using the full version of Fraunhofer's MP3 encoder, there is a demo version that allows you to encode up to 30 seconds, which is enough for, say, sound effects.

Source: history.wav (16 seconds, 11025 Hz, 16 bit, mono)

Code: [Select]
rem Commands to encode
gxlame.exe --abr 12 -h history.wav out.gxlame.mp3
mp3enc.exe -br 12000 -esr 11025 -bw 11025 -if history.wav -of out.frau.mp3
fdkaac.exe -b 12 history.wav -o out.fdk.lc.m4a

rem AAC LC with SBR is not happy about 11025 Hz, because it needs some headroom to work magic, so we have to upsample
ffmpeg.exe -i history.wav -af aresample=32000:resampler=soxr:precision=28:cutoff=0.95 -bitexact history.32khz.wav
fdkaac.exe -p 5 -b 12 history.32khz.wav -o out.fdk.lc-sbr.m4a

rem We can shave a few bytes here and cover up the metadata
mp4box.exe -time 0 -mtime 0 -keep-utc -tight -no-iod -add out.fdk.lc.m4a -new out.fdk.lc.v2.m4a
mp4box.exe -time 0 -mtime 0 -keep-utc -tight -no-iod -add out.fdk.lc-sbr.m4a -new out.fdk.lc-sbr.v2.m4a

  Bytes    Kbps   Filename           
 -------- ------ --------------------
  25 548   12.0   out.frau.mp3       
  26 208   12.3   out.gxlame.mp3     
  26 923   12.7   out.fdk.lc.m4a     
  27 386   12.9   out.fdk.lc-sbr.m4a
• 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 #49
Thanks, but i can't import AAC files. Also, i think that must be limited to web because SWF SPEC 19 says only these codecs are supported: Uncompressed native endian, ADPCM, MP3, Uncompressed little endian, NellyMoser Asao, NellyMoser Asao 8kHz, NellyMoser Asao 16kHz, and Speex (somehow i also can't import or encode Sppex or NellyMoser Asao 8kHz or 16kHz with Flash).