Help - Search - Members - Calendar
Full Version: Recompile, Recompress Mp3s
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Stefano
How can I recompile or recompress mp3s to lower bit rates, using lame?

Thank you! biggrin.gif
B
Just use the mp3 as input file again.

If youre looking for a frontend you can use razorlame for example.
Razorlame

Remember that transcoding mp3 to mp3 degrades sound quality.
Stefano
I know Im going to degrade the quality of the mp3s but thats the hole point, becuase i want to reduce the size of them.
The problem is that this mp3s are compress using a very high quality 190-320.

I have them on my HD so using them as input is going to be very hard work, I try Razorlame but it dosent work. Any other idea?

Thank you!
ak
What about All2Lame.
Make sure you use another dir for output. smile.gif
Also check if you have your lame.exe in same dir as frontend or in %path%.
MadiZone
If you like space saving, you should Transcode them to OGG Vorbis, which sounds very nice at just 80 kbit.
arman68
QUOTE (Stefano @ Oct 13 2002 - 04:42 PM)
I have them on my HD so using them as input is going to be very hard work, I try Razorlame but it dosent work. Any other idea?

I had the same problems a little while ago and found it very difficult to find anything that would work with multiple folders and preserve the directory structure.

If I remember correctly, you can use Audio Utility from http://www.bofa.ru/audioutility.htm (the one I have tested is v1.0.00 RC1).

I use a batch file which does the job better. Will be posting it soon.
bluewer than blue
QUOTE (Stefano @ Oct 13 2002 - 04:42 PM)
I know Im going to degrade the quality of the mp3s but thats the hole point, becuase i want to reduce the size of them.

Just need to make it clear that when you re-encode you don't degrade the quality just because you choose a lower bitrate, but because the process itself lowers the final quality result as well. So if you go from 320Kbps down to 128Kbps (for instance), you won't have the sound quality of a 128Kbps mp3 that has been encoded from a wav file.
arman68
After cleaning a bit the source code and and adding a syntax statement, here it is: http://www.aoug16.dsl.pipex.com/relame.cmd

With lame in the path, this batch file will let you re-encode a whole directory tree (not in place).

Source code of relame.cmd is below as well:


CODE
@ECHO OFF
::
::___Author:_arman68___Version 14/10/2002___::
::
 IF {%1}=={} GOTO :syntax
 IF {%2}=={} GOTO :syntax
::
 SETLOCAL
   SET source=%1
   SET target=%2
   IF {%3}=={} (
       SET lame_cmd="--alt-preset fast standard -Y -B 256"
   ) ELSE (
       SET lame_cmd=%3
   )
::
   IF NOT EXIST %source% GOTO :no_source
   ECHO.
   ECHO Using lame command line: %lame_cmd%
   ECHO.
   XCOPY %source% %target% /E /T /I
::
::___Recursively re-encode all files___::
::
   CALL :encode %source% %target% %lame_cmd%
::
 ENDLOCAL
GOTO :EOF
::
::_____________________________________________________________________________
:encode
::
 SET source=%1
 SET target=%2
 SET lame_cmd=%3
::
::___Strip quote marks___::
::
 SET source=%source:"=%
 SET target=%target:"=%
 SET lame_cmd=%lame_cmd:"=%
::
::___Re-encode all files in the current directory___::
::
 FOR /F "tokens=*" %%f in ('DIR /B "%source%\*.mp3" 2^>NUL') DO lame --mp3input %lame_cmd% "%source%\%%f" "%target%\%%f"
::
::___Recursive call to walk down the directory tree___::
::
 FOR /F "tokens=*" %%d in ('DIR /AD /B "%source%"') DO CALL :encode "%source%\%%d" "%target%\%%d" "%lame_cmd%"
::    
GOTO :EOF
::
::_____________________________________________________________________________
:no_source
 ECHO.
 ECHO ERROR: The SOURCE directory cannot be found.
 ECHO.
GOTO :EOF
::
::_____________________________________________________________________________
:syntax
 ECHO.
 ECHO Syntax: %0 ^<SOURCE^> ^<TARGET^> [lame command line]
 ECHO.
 ECHO    This batch file will invoke lame (to recusively re-encode all the files
 ECHO    from the ^<SOURCE^> folder and place them into the ^<TARGET^> folder.
 ECHO.
 ECHO    The default lame command line is: --alt-preset fast standard -Y -B 256
 ECHO.
 ECHO    To use arguments with spaces, enclose them in ""
 ECHO.
 ECHO Example: %0 "C:\My Music" C:\TEST "--alt-preset 128"
 ECHO.
GOTO :EOF
::_____________________________________________________________________________
Stefano
Sorry I havent reply earlier, but i have been busy.

Anyway, thankyou arman68, bluewer than blue, MadiZone, ak, Benny.X

I will try all the programs and tell you the results later. OK.

Cheers.
laugh.gif
arman68
Anyone used relame.cmd?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.