Encode/Transcode selected WAV/MP3 files to MP3 using LAME

Sample buttons and complete toolbars.

Encode/Transcode selected WAV/MP3 files to MP3 using LAME

Postby BenjaminW » 06 Jan 2007, 07:16

Use this button definition to easily encode/transcode wave or mp3 files to mp3 using LAME encoder (free). Please change the path to lame.exe according to your installation. Hitting the button will encode all selected files to the destination folder.

Code: Select all
<?xml version="1.0"?>
<button display="both" effect="gray">
   <guid>{9CE8D1E0-DEB3-4709-9212-D79474B8754B}</guid>
   <label>Encode MP3 (to destination) - Quality: VBR 4</label>
   <icon1>12</icon1>
   <function type="batch">
      <instruction>"C:\__CHANGEME__\lame.exe" -V 4 --vbr-new {filepath$} {destpath$}{file$|ext=mp3}</instruction>
      <instruction>pause</instruction>
   </function>
</button>


Hope this is interesting for you. Please give feedback.

LAME can be downloaded from several sources (ask google!). Official site: http://lame.sourceforge.net/index.php
BenjaminW
 
Posts: 17
Joined: 06 Jan 2007, 07:07

Vice versa

Postby BenjaminW » 11 Jan 2007, 09:01

For decoding a MP3 File to WAVE you can use LAME, too:

Code: Select all
<?xml version="1.0"?>
<button display="both" effect="gray">
   <guid>{9CE8D1E0-DEB3-4709-9212-D79474B8754B}</guid>
   <label>MP3 Dekodieren</label>
   <icon1>12</icon1>
   <function type="batch">
      <instruction>"C:\__CHANGEME__\lame.exe" --decode {filepath$} {destpath$}{file$|ext=wav}</instruction>
      <instruction>pause</instruction>
   </function>
</button>


See the documentation of LAME for other command line options (quality, ID3-Tags, etc.).
BenjaminW
 
Posts: 17
Joined: 06 Jan 2007, 07:07

Postby BenjaminW » 08 Jul 2007, 21:01

If you want to transcode a MP3 file to a lower bitrate (i.e. you have a 320 CBR file and you want it to be 128KBit VBR) you can use the first command, too. But LAME will not write the ID3 Tag in the destination file for whatever reasons.

Here's a little extension to the command. Just paste this line after the LAME command:

Code: Select all
"C:\_PATH_TO_id3cp_\id3cp.exe" {filepath$} {destpath$}{file$|ext=mp3}


It will just copy the source file's ID3 Tags to the new encoded file! :-)
The needed program for this is attached to this thread.

Have fun!
Attachments
id3cp.zip
Tool id3cp and id3info compiled from the id3lib Package.
(268.39 KB) Downloaded 427 times
BenjaminW
 
Posts: 17
Joined: 06 Jan 2007, 07:07

Postby leo » 12 Jul 2007, 00:35

I have split the discussion that was in this thread, about variables and DOS windows, into a separate thread here:

http://resource.dopus.com/viewtopic.php?t=5785

Once the discussion results in a finished button please post it here, but let's keep ongoing discussion out of this area so people can easily find buttons, rather than talk about buttons. :-)
User avatar
leo
Admin
 
Posts: 14449
Joined: 07 Nov 2004, 01:30
Location: London, UK
OS: Windows 7 64-bit
Opus: Illuminati

Postby Sasa » 12 Jul 2007, 08:26

Final button:

This will encode files from source to destination. The selected encoding quality will be used for all files!

Code: Select all
<?xml version="1.0"?>
<button display="both" label_pos="right" separate="yes">
   <label>Encode MP3</label>
   <icon1>12</icon1>
   <function type="batch">
      <instruction>@set var = {dlgchoose|Select encoding quality:|VBR ~165 kbps (4 - medium)=-V 4 --vbr-new+VBR ~190 kbps (2 - standard)=-V 2 --vbr-new+VBR ~240 kbps (0 - extreme) =-V 0 --vbr-new+CBR 128 kbps=-b 128+CBR 160 kbps=-b 160+CBR 192 kbps=-b 192+CBR 320 kbps=-b 320}</instruction>
      <instruction>____ENTER_PATH___\lame.exe &quot;{$var}&quot; {filepath$} {destpath$}{file$|ext=mp3}</instruction>
      <instruction>Pause</instruction>
   </function>
</button>
Sasa
 
Posts: 508
Joined: 27 Aug 2006, 09:36
Location: Germany, somewhere between Bonn and Cologne

Postby BenjaminW » 26 Jul 2007, 00:43

Very neat!
That is cleaning up my MP3 encoding menu a lot ;-)
BenjaminW
 
Posts: 17
Joined: 06 Jan 2007, 07:07

Postby Devilder » 29 Jul 2007, 07:12

I like this feature a lot, but just some questions....

Encoding MP3 to WAV will not getter better quality.
Reencoding an MP3 to MP3 using Lame would IIRC lower the quality even more.
:?
Devilder
 
Posts: 258
Joined: 19 May 2007, 06:59
OS: Windows XP 32-bit
Opus: Directory Opus 9.x

Postby Sasa » 29 Jul 2007, 10:37

Devilder wrote:I like this feature a lot, but just some questions....

Encoding MP3 to WAV will not getter better quality.
Reencoding an MP3 to MP3 using Lame would IIRC lower the quality even more.
:?

1. Decoding MP3 back to WAV will NOT bring you back original quality (MP3 is compressed audio and not lossless - you will always get the quality of the MP3 when decoding)

2. You shouldn't re-encode a MP3 (this means loosing more quality as the source-mp3). Except you want to save space on a MP3-Player for example (I always re-encode higher quality MP3 to VBR 160 (LAME Preset 4) for my player).

Also LAME will bring you best results with VBR Preset 2 (~190kbps). At CBR 320kbps you won't hear a difference between MP3 and WAV.
Sasa
 
Posts: 508
Joined: 27 Aug 2006, 09:36
Location: Germany, somewhere between Bonn and Cologne


Return to Buttons & Toolbars