#54 expand LAME MP3 options

closed
Robert Kausch
None
1
2014-02-24
2013-05-29
Anonymous
No

Hi,

I really like your fre:ac software and I would like to make a feature request for it.

When encoding audio to MP3 via LAME, the current options that can be set for it are:

  • Auto
  • Mono
  • Stereo
  • Joint Stereo

But LAME has some more features, including a mode called 'dual channels' encoding. Even though what LAME does so well is variations of joint stereo encoding, the 'dual channels' mode may be useful in certain applications. I think it may come in handy when encoding binaural beat MP3's, as one would want a strict separation of left and right channels. I read about some LAME features (http://mirror.atrpms.net/ccrma/man/man1/lame.1.html) and it lists the following:

(s)tereo
(j)oint stereo
(f)orced joint stereo
(d)ual channels
(mo)no

When I look at the dropdown of dBpoweramp, it does have all modes listed. It looks like this:

  • [auto]
  • 1 'mono'
  • 2 'stereo [auto]' (CD)
  • 2 'joint stereo' (CD)
  • 2 'forced joint stereo' (CD)
  • 2 'dual channels' (CD)
  • 2 'forced stereo' (CD)

Even though at 'dual channels' mode the encoding may be somewhat less optimized (from what I understand) a .mp3 file converted at 320kbps CBR is still 2.5 times smaller than a .flac rip (level 5).

Please consider. Thank you :)

Discussion

  • Robert Kausch
    Robert Kausch
    2014-01-16

    Hi,

    The LAME header file used to export the libmp3lame API states that dual channel encoding is not currently supported by LAME:

    lame.h line 64:

    /* MPEG modes */
    typedef enum MPEG_mode_e {
      STEREO = 0,
      JOINT_STEREO,
      DUAL_CHANNEL, /* LAME doesn't supports this! */
      MONO,
      NOT_SET,
      MAX_INDICATOR /* Don't use this! It's used for sanity checks. */
    } MPEG_mode;
    

    And further down in line 267:

    /*
      mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono
      default: lame picks based on compression ration and input channels
    */
    int CDECL lame_set_mode(lame_global_flags *, MPEG_mode);
    MPEG_mode CDECL lame_get_mode(const lame_global_flags *);
    

    That's why dual channel mode is not offered in fre:ac's configuration dialog for LAME.

    Also, even though dbPoweramp offers a 'forced stereo' mode, something like that does not seem to actually exist in LAME. I suspect it either is the same as 'stereo' or maybe 'stereo' is the same as 'auto' while 'forced stereo' actually corresponds to LAME's 'stereo' mode.

    Only joint stereo can be enforced using the lame_set_force_ms API function.

    Maybe there will be an officially supported dual channel mode in a future version of LAME. I will then consider adding it to fre:ac. However, dual channel is not meant to be used for binaural audio at all. It's designed for different content in each channel (e.g. bilingual audio) and a compliant decoder will offer to choose the channel to be played instead of playing both channels simultaneously.

    I will set this ticket to pending now and close it after two weeks.

     


Anonymous


Cancel   Add attachments