title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Dynamic CLI for MP3HD (MP3 Lossless, not a recommended format!)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lynx_TWO
    dBpoweramp Enthusiast
    • Aug 2009
    • 81

    Dynamic CLI for MP3HD (MP3 Lossless, not a recommended format!)

    I created this due to someone on the forum asking about the format. You can download the encoder and decoder for MP3HD here:
    HTML Code:
    http://mp3hd-toolkit.soft32.com/
    Known bugs:

    When telling dBpoweramp to write ID3 tags to the file, only the lossy portion of the MP3 is saved. Even with the
    Code:
    -nodbtag
    switch and writing tags using the
    Code:
    -id3in
    switch it still stripts out the lossless portion stored in the tag.

    I wouldn't recommend anyone using this encoder as the correction data is in the ID3 tag, because mp3 doesn't allow frame sizes large enough. Therefore, your lossless collection could too easily be lost with a basic mass-tagging operation.

    The lossless part of the codec is stored in ID3v2 tags.

    The size of ID3v2 tags is limited to 256MB by specifications; as a result, the lossless part of an mp3hd file may not be over 256MB.

    You have been warned!

    On the flipside, you apparently get a true Fraunhofer MP3 encoder for normal MP3 if you tag files, so there’s that…

    If you want to only encode to lossless, just use the cli encoder, uncheck Write Tags, place .mp3 only in the encoder.txt file, and the switches
    Code:
    -if [infile] -of "[outfile]"
    .

    Dynamic CLI below:

    Code:
    [codec]
    .mp3
    mp3hdEncoder.exe
    
    [msgifnoencoder]
    Before using this encoder MP3HDEncoder.exe must first be downloaded (Google "Thomson mp3HD software Toolkit", or go here: http://mp3hd-toolkit.soft32.com/ ).
    
    [label]
    4
    0
    Mode
    
    [radio&slider]
    4
    36
    292
    1
    26
    0
    VBR + Correction
    
    13
    VBR5 ~114 kbps (0.3%>FLAC)
    -mode 5
    VBR4 ~137 kbps (2.0%>FLAC)
    -mode 4
    VBR3 ~147 kbps (2.2%>FLAC)
    -mode 3
    VBR2 ~188 kbps (2.0%>FLAC)
    -mode 2
    VBR1 ~216 kbps (5.1%>FLAC)
    -mode 1
    [/sliderend]
    99
    0
    CBR (common CBR)
    
    8
    96 kbps (min)
    -br 96000 
    112 kbps
    -br 112000 
    128 kbps
    -br 128000 
    144 kbps
    -br 144000 
    160 kbps
    -br 160000 
    176 kbps
    -br 176000 
    192 kbps
    -br 192000 
    224 kbps
    -br 224000 
    256 kbps
    -br 256000 
    320 kbps
    -br 320000 
    [/sliderend]
    180
    0
    CBR (Fine) + Correction
    
    8
    96 kbps (min)
    -br 96000 
    97 kbps
    -br 97000 
    98 kbps
    -br 98000 
    99 kbps
    -br 99000 
    100 kbps
    -br 100000 
    101 kbps
    -br 101000 
    102 kbps
    -br 102000 
    103 kbps
    -br 103000 
    104 kbps
    -br 104000 
    105 kbps
    -br 105000 
    106 kbps
    -br 106000 
    107 kbps
    -br 107000 
    108 kbps
    -br 108000 
    109 kbps
    -br 109000 
    110 kbps
    -br 110000 
    111 kbps
    -br 111000 
    112 kbps
    -br 112000 
    113 kbps
    -br 113000 
    114 kbps
    -br 114000 
    115 kbps
    -br 115000 
    116 kbps
    -br 116000 
    117 kbps
    -br 117000 
    118 kbps
    -br 118000 
    119 kbps
    -br 119000 
    120 kbps
    -br 120000 
    121 kbps
    -br 121000 
    122 kbps
    -br 122000 
    123 kbps
    -br 123000 
    124 kbps
    -br 124000 
    125 kbps
    -br 125000 
    126 kbps
    -br 126000 
    127 kbps
    -br 127000 
    128 kbps
    -br 128000 
    129 kbps
    -br 129000 
    130 kbps
    -br 130000 
    131 kbps
    -br 131000 
    132 kbps
    -br 132000 
    133 kbps
    -br 133000 
    134 kbps
    -br 134000 
    135 kbps
    -br 135000 
    136 kbps
    -br 136000 
    137 kbps
    -br 137000 
    138 kbps
    -br 138000 
    139 kbps
    -br 139000 
    140 kbps
    -br 140000 
    141 kbps
    -br 141000 
    142 kbps
    -br 142000 
    143 kbps
    -br 143000 
    144 kbps
    -br 144000 
    145 kbps
    -br 145000 
    146 kbps
    -br 146000 
    147 kbps
    -br 147000 
    148 kbps
    -br 148000 
    149 kbps
    -br 149000 
    150 kbps
    -br 150000 
    151 kbps
    -br 151000 
    152 kbps
    -br 152000 
    153 kbps
    -br 153000 
    154 kbps
    -br 154000 
    155 kbps
    -br 155000 
    156 kbps
    -br 156000 
    157 kbps
    -br 157000 
    158 kbps
    -br 158000 
    159 kbps
    -br 159000 
    160 kbps
    -br 160000 
    161 kbps
    -br 161000 
    162 kbps
    -br 162000 
    163 kbps
    -br 163000 
    164 kbps
    -br 164000 
    165 kbps
    -br 165000 
    166 kbps
    -br 166000 
    167 kbps
    -br 167000 
    168 kbps
    -br 168000 
    169 kbps
    -br 169000 
    170 kbps
    -br 170000 
    171 kbps
    -br 171000 
    172 kbps
    -br 172000 
    173 kbps
    -br 173000 
    174 kbps
    -br 174000 
    175 kbps
    -br 175000 
    176 kbps
    -br 176000 
    177 kbps
    -br 177000 
    178 kbps
    -br 178000 
    179 kbps
    -br 179000 
    180 kbps
    -br 180000 
    181 kbps
    -br 181000 
    182 kbps
    -br 182000 
    183 kbps
    -br 183000 
    184 kbps
    -br 184000 
    185 kbps
    -br 185000 
    186 kbps
    -br 186000 
    187 kbps
    -br 187000 
    188 kbps
    -br 188000 
    189 kbps
    -br 189000 
    190 kbps
    -br 190000 
    191 kbps
    -br 191000 
    192 kbps
    -br 192000 
    193 kbps
    -br 193000 
    194 kbps
    -br 194000 
    195 kbps
    -br 195000 
    196 kbps
    -br 196000 
    197 kbps
    -br 197000 
    198 kbps
    -br 198000 
    199 kbps
    -br 199000 
    200 kbps
    -br 200000 
    201 kbps
    -br 201000 
    202 kbps
    -br 202000 
    203 kbps
    -br 203000 
    204 kbps
    -br 204000 
    205 kbps
    -br 205000 
    206 kbps
    -br 206000 
    207 kbps
    -br 207000 
    208 kbps
    -br 208000 
    209 kbps
    -br 209000 
    210 kbps
    -br 210000 
    211 kbps
    -br 211000 
    212 kbps
    -br 212000 
    213 kbps
    -br 213000 
    214 kbps
    -br 214000 
    215 kbps
    -br 215000 
    216 kbps
    -br 216000 
    217 kbps
    -br 217000 
    218 kbps
    -br 218000 
    219 kbps
    -br 219000 
    220 kbps
    -br 220000 
    221 kbps
    -br 221000 
    222 kbps
    -br 222000 
    223 kbps
    -br 223000 
    224 kbps
    -br 224000 
    225 kbps
    -br 225000 
    226 kbps
    -br 226000 
    227 kbps
    -br 227000 
    228 kbps
    -br 228000 
    229 kbps
    -br 229000 
    230 kbps
    -br 230000 
    231 kbps
    -br 231000 
    232 kbps
    -br 232000 
    233 kbps
    -br 233000 
    234 kbps
    -br 234000 
    235 kbps
    -br 235000 
    236 kbps
    -br 236000 
    237 kbps
    -br 237000 
    238 kbps
    -br 238000 
    239 kbps
    -br 239000 
    240 kbps
    -br 240000 
    241 kbps
    -br 241000 
    242 kbps
    -br 242000 
    243 kbps
    -br 243000 
    244 kbps
    -br 244000 
    245 kbps
    -br 245000 
    246 kbps
    -br 246000 
    247 kbps
    -br 247000 
    248 kbps
    -br 248000 
    249 kbps
    -br 249000 
    250 kbps
    -br 250000 
    251 kbps
    -br 251000 
    252 kbps
    -br 252000 
    253 kbps
    -br 253000 
    254 kbps
    -br 254000 
    255 kbps
    -br 255000 
    256 kbps
    -br 256000 
    257 kbps
    -br 257000 
    258 kbps
    -br 258000 
    259 kbps
    -br 259000 
    260 kbps
    -br 260000 
    261 kbps
    -br 261000 
    262 kbps
    -br 262000 
    263 kbps
    -br 263000 
    264 kbps
    -br 264000 
    265 kbps
    -br 265000 
    266 kbps
    -br 266000 
    267 kbps
    -br 267000 
    268 kbps
    -br 268000 
    269 kbps
    -br 269000 
    270 kbps
    -br 270000 
    271 kbps
    -br 271000 
    272 kbps
    -br 272000 
    273 kbps
    -br 273000 
    274 kbps
    -br 274000 
    275 kbps
    -br 275000 
    276 kbps
    -br 276000 
    277 kbps
    -br 277000 
    278 kbps
    -br 278000 
    279 kbps
    -br 279000 
    280 kbps
    -br 280000 
    281 kbps
    -br 281000 
    282 kbps
    -br 282000 
    283 kbps
    -br 283000 
    284 kbps
    -br 284000 
    285 kbps
    -br 285000 
    286 kbps
    -br 286000 
    287 kbps
    -br 287000 
    288 kbps
    -br 288000 
    289 kbps
    -br 289000 
    290 kbps
    -br 290000 
    291 kbps
    -br 291000 
    292 kbps
    -br 292000 
    293 kbps
    -br 293000 
    294 kbps
    -br 294000 
    295 kbps
    -br 295000 
    296 kbps
    -br 296000 
    297 kbps
    -br 297000 
    298 kbps
    -br 298000 
    299 kbps
    -br 299000 
    300 kbps
    -br 300000 
    301 kbps
    -br 301000 
    302 kbps
    -br 302000 
    303 kbps
    -br 303000 
    304 kbps
    -br 304000 
    305 kbps
    -br 305000 
    306 kbps
    -br 306000 
    307 kbps
    -br 307000 
    308 kbps
    -br 308000 
    309 kbps
    -br 309000 
    310 kbps
    -br 310000 
    311 kbps
    -br 311000 
    312 kbps
    -br 312000 
    313 kbps
    -br 313000 
    314 kbps
    -br 314000 
    315 kbps
    -br 315000 
    316 kbps
    -br 316000 
    317 kbps
    -br 317000 
    318 kbps
    -br 318000 
    319 kbps
    -br 319000 
    320 kbps (max)
    -br 320000 
    [/sliderend]
    85 - out of gas
    
    [checkbox]
    30
    14
    0
     No ID3 v1 Tags
     -noid3v1 
    
    
    [label]
    10
    55
    <Lossy Quality
    808080
    
    [label]
    235
    55
    Lossy Quality>
    808080
    
    
    [clistring]
     -nodbtag -if [infile] -of "[outfile]" -id3in -Title "[title]" -Artist "[artist]" -Album "[album]" -Track [track]
    
    [noallowfloat]
    
    [maxchannels]
    2
    
    [estimatesize]
    VBR5 ~114 kbps (0.3%>FLAC)
    114000
    VBR4 ~137 kbps (2.0%>FLAC)
    137000
    VBR3 ~147 kbps (2.2%>FLAC)
    147000
    VBR2 ~188 kbps (2.0%>FLAC)
    188000
    VBR1 ~216 kbps (5.1%>FLAC)
    216000
    MP3HD help file with switches:

    PHP Code:
    *****************************************************************************
    *                                                                           *
    *                                mp3HD Codec V1.5.0                            *
    *                               (Evaluation Version)                           *
    *                                                                              *
    *                           (c) 2007 - 2010 Technicolor S.A.                   *
    *                          (c) 1996 - 2010 Fraunhofer IIS                      *
    *                               All rights reserved.                           *
    *                                                                           *
    *       This software and/or program is protected by copyright law and      *
    *        international treaties. Any reproduction or distribution of        *
    *       this software and/or program, or any portion of it, may result      *
    *       in severe civil and criminal penalties, and will be prosecuted      *
    *                 to the maximum extent possible under law.                 *
    *                                                                           *
    *****************************************************************************
    
    -----------------------------------------------------------------------------
    Origin
    -----------------------------------------------------------------------------
    
    Website: http://www.all4mp3.com
    Contact: info@all4mp3.com
    
    -----------------------------------------------------------------------------
    Software package
    -----------------------------------------------------------------------------
    
    This package contains the following software:
    
    - mp3HD Command-Line Encoder:   mp3hdEncoder.exe
    - mp3HD Command-Line Decoder:   mp3hdDecoder.exe
    - Winamp Decoder Plug-Ins:
      Winamp 5.5 and above:         in_mp3hd.dll
    
    -----------------------------------------------------------------------------
    System requirements
    -----------------------------------------------------------------------------
    
    Minimum requirements for the use of the software are:
    
    - Windows 2000/Windows XP
    - At least Pentium III 1 Ghz or higher
    - At least 128 MB memory
    - At least 30MB of available hard-disk space
    - Winamp V5.5 or higher plus stereo soundcard for playback
    
    -----------------------------------------------------------------------------
    The mp3HD Format (Some Terminology)
    -----------------------------------------------------------------------------
    
    mp3HD is a new scalable format for high-quality lossless compression
    of audio signals.  It guarantees bit-exact reproduction of the
    original PCM samples at state-of-the-art compression ratios.  As for
    all lossless compression formats, the compression ratio and resulting
    data rate depends on the compressed content.  As a rule of thumb, the
    mp3HD codec can compress WAV files to about 30% to 60% of their
    original size for typical audio content.  Typically, smaller data
    rates are needed to encode classical music or audio books, while Rock
    and Pop music requires larger data rates.
    
    mp3HD has been designed with the explicit target to be as compatible
    as possible to the ubiquitous MP3 format.  As a consequence, the mp3HD
    format uses advanced compression algorithms and a special bit stream
    format in order to be compatible to most of the available MP3 players.
    Therefore mp3HD is both a lossless format for the reproduction of the
    original PCM samples and a standard MP3 file that play's on your MP3
    player.
    
    The mp3HD Format supports tagging the files with meta data according
    to ID3 Version 1.0, 1.1, 2.3 and 2.4. That is, you can use many
    existing tools to add ID3 tags to your mp3HD content, and to manage
    and organize your audio collection.
    
    -----------------------------------------------------------------------------
    mp3HD Command-Line Encoder
    -----------------------------------------------------------------------------
    
    This program encodes WAV audio files to mp3HD files.  The WAV audio
    files have to contain plain PCM samples in mono or stereo with a
    resolution of 16 bit per sample.  The sample rate is restricted to one
    out of 32 kHz, 44.1 kHz, or 48 kHz.
    
    It is in the nature of lossless audio compression that the resulting
    bit rate is inherently defined by the audio content.  Consequently,
    the bit rate of the mp3HD file cannot be specified.  However, the
    target bit rate for the backwards-compatible MP3 bit stream already
    has to be specified at the time of encoding the mp3HD file.  You can
    select both variable bit rate (VBR) mode at several qualities or
    constant bit rate (CBR) mode for the resulting MP3 via the
    command-line argument "-mode".
    
    For CBR mode you can further define the data rate for the resulting
    MP3 file.  The range of possible bit rates is constrained as follows:
    
      Stereo signals:
       - sample rate of 32   kHz:  80000 - 320000 bit/s
       - sample rate of 44.1 kHz:  96000 - 320000 bit/s
       - sample rate of 48   kHz: 112000 - 320000 bit/s
    
      Mono signals:
       - sample rate of 32   kHz:  40000 - 320000 bit/s
       - sample rate of 44.1 kHz:  56000 - 320000 bit/s
       - sample rate of 48   kHz:  56000 - 320000 bit/s
    
    To add existing ID3 meta data to the mp3HD file use the command-line 
    arguments "-id3in" to pass an existing ID3 (Ver. 2.3 or 2.4) meta data 
    file to the mp3HD encoder. For example, the file can be an existing mp3
    file that includes the desired ID3 tag information. 
    
    Alternatively, you can use the following command-line arguments to set
    the ID3 meta data directly:
    
       -Title "[title string]" 
       -Artist "[artist string]"  
       -Album "[album string]"
       -Track "[track number]" 
       -Length "[length in ms]"   
       -Year "[year string]"
       -Genre "[content type]" 
       -Encoder "[encoded by ..]"
       -Encoder_Settings "[encoder name and settings]"
       -pic "[jpegFile]"
    
    The "-id3in" command-line argument can't be used in combination 
    with the other ID3 command-line arguments.       
    
    To call the mp3HD command-line encoder simply open a command prompt
    and enter "mp3hdEncoder".  If called without arguments, the encoder
    outputs a list of possible command-line arguments and encoding
    options.
    
    -----------------------------------------------------------------------------
    mp3HD Command-Line Decoder
    -----------------------------------------------------------------------------
    
    This program decodes mp3 and mp3HD files to WAV audio files.  The output 
    files contain bit-exactly the same PCM samples as the originally encoded 
    WAV files.
    
    Note that the mp3HD decoder cannot reconstruct any side information,
    i.e. additional chunks besides the actual audio data, that may have
    been contained in the original WAV file.  Therefore, you may observe
    differences if you compare the decoded WAV file with the original WAV
    file on the file level.
    
    To call the command-line decoder simply open a command prompt and
    enter "mp3hdDecoder".  If called without arguments, the decoder
    outputs a list of possible command-line arguments and decoding
    options.
    
    -----------------------------------------------------------------------------
    mp3HD Winamp Decoder
    -----------------------------------------------------------------------------
    
    If you have a Winamp player installed, the mp3HD format can be added
    to the audio formats supported by the player.  By default, the mp3HD
    Winamp Decoder plugin decodes mp3HD files in mp3HD quality, i.e. the
    high-quality original PCM samples are played.
    
    You may configure the plugin to play mp3 quality instead of mp3HD quality
    by default.  In addition, you can activate in the settings dialog to
    display a window in which you can switch between mp3 quality and mp3HD
    quality in real time while decoding an mp3HD file. 
    
    We recommend to use Winamp version 5.5 or above. The new version of 
    the Winamp player can be downloaded at http://www.winamp.com. 
    
    To install the Winamp decoder plug-in copy the "in_mp3hd.dll" file to
    your local Winamp plug-in folder. Typically, the directory of the Winamp 
    plug-in folder is "C:\Program Files\Winamp\plugin".
    
    -----------------------------------------------------------------------------
    FAQ
    -----------------------------------------------------------------------------
    
    ** What are PCM samples?
    
       The acronym PCM stands for pulse code modulation.  In most digital
       workflows, PCM samples describe the raw digital audio signals
       either right after conversion from the analog domain or before
       conversion to the analog domain.
    
       PCM samples are not compressed like e.g. MP3 files.  Therefore,
       they offer in principle the best possible sound quality for a given
       sample rate and resolution.  As an example, a CD stores audio as
       PCM samples with a rate of 44100 samples per second (and channel)
       and a resolution of 16 bit per sample.  This gives a bit rate of
       1411.2 kbit/s.
    
    ** Can I use the mp3HD Codec to rip my audio CDs?
    
       To rip mp3HD files from your audio CDs you need an audio CD 
       grabber tool with external Encoder support. For example you can use
       the Exact Audio Copy CD grabber. The current version of Exact Audio 
       Copy can be downloaded at 
       http://www.exactaudiocopy.de/en/index.php/resources/download/. 
       
       You can include the mp3HD encoder into the Exact Audio Copy grabber 
       by performing the following steps:
             
             - Open the "Compression options" from the "EAC" menu 
             - Go to the "External Compression" tab
             - Enable the "Use external program for compression" option
             - Set "Parameter passing scheme" to "User Defined Encoder"
             - Write ".mp3" into the "Use file extension" field
             - Type the link to your mp3hdEncoder.exe file into the
               "Program, including Path, used for compression" field 
             - Insert the following text into the Additional command-line option field:
                -if %s -of %d -br %r000 -Artist "%a" -Album "%g" -Title "%t" -Year "%y" 
                -Track "%n" -Genre "%m" 
             - Select the desired bit rate in the "Bit rate" field.
             - Uncheck the "Add ID3 tag" option
       
    -----------------------------------------------------------------------------
    Version History & Release Notes
    -----------------------------------------------------------------------------
    
    V1.4.0  First public release of the mp3HD Codec
    V1.4.1  First public release for Mac OS
            Bug Fix: Winamp pause button didn't work for standard mp3 files
    V1.4.2  Command-line argument changes in the mp3hdEncoder
            Minor bug fixes
    V1.5.0  Faster En- and Decoding
                    Decoding of plain mp3 files
                    Original File Length support for plain mp3 files
                    Some minor bug fixes
                    Encoding of very short input signals
                    Automatic resynchronization to the mp3HD stream on errors
                    Redesign of the mp3HD Winamp quality switch
                    Changed the default ID3 tag version of the mp3HD Encoder to 2.4
                    Automatically adds ID3v1 tags to the end of the file
    
    ******************************************************************************
    *                                                                            *
    *                      mp3HD Commandline Encoder v1.5.0                      *
    *                         using mp3HD library v1.1.7                         *
    *                            (Evaluation Version)                            *
    *                                                                            *
    *                               Revision 487                                 *
    *                              Build Feb  2 2010                             *
    *                                                                            *
    *                        (c) 2007 - 2010 Technicolor S.A.                    *
    *                       (c) 1996 - 2010 Fraunhofer IIS                       *
    *                            All rights reserved.                            *
    *                                                                            *
    *       This software and/or program is protected by copyright law and       *
    *         international treaties. Any reproduction or distribution of        *
    *        this software and/or program, or any portion of it, may result      *
    *       in severe civil and criminal penalties, and will be prosecuted       *
    *                 to the maximum extent possible under law.                  *
    *                                                                            *
    ******************************************************************************
    
    Usage: mp3hdEncoder.exe [-if infile] [-of outfile] [-br Birate] [options]
    
    -if infile:
            A 1 channel or 2 channel wave input file.
    -of outfile:
            The destination mp3HD bitstream file.
    
    [options]:
    -br Bitrate
            The MP3 bitrate in bits/sec <default: 128 Kbit/s>
    -mode <0-5>
            Encoder mode (0 = CBR, 1 = VBR highest quality, 5 = VBR lowest
            bit rate) <default: CBR>
            VBR mode 5 is disabled for infiles with 48 kHz samplerate.
    -id3in id3File
            The id3File can contain an ID3V1.x and an ID3V2.3 or an ID3V2.4 tag.
            The ID3 tags are copied into the mp3HD file.
            The ID3V2.X tag has to be at the beginning of the file.
            The ID3V1.x tag has to be at the end of the file.
    Add ID3 tags directly:
      (Ignored in combination with the "-id3in" option)
            -Title "[title string]"
            -Artist "[artist string]"
            -Album "[album string]"
            -Track "[track number]"
            -Length "[length in ms]"
            -Year "[year string]"
            -Genre "[content type]"
            -Encoder "[encoded by ..]"
            -Encoder_Settings "[encoder name and settings]"
            -pic jpegFile
                 The jpegFile must contain an jpeg picture.
                 The picture is copied into the mp3HD file.
    -noid3v1
            The noid3v1 flag disables the writing of ID3v1 tags.
    -com "[Text]"
            Adds a comment text into the mp3HD info frame.
    -quiet
            Standard output of only one line
    
    Example:   mp3hdEncoder.exe -br 128000 -if test.wav -of test.mp3 
    
Working...

]]>