Help - Search - Members - Calendar
Full Version: MAR 1.3 Released! For EAC & CDex
Hydrogenaudio Forums > Hydrogenaudio Forum > Validated News
kwanbis
== [ (M.)ultiple (A.)pplications (R.)unner -- For EAC & CDex -- Copyright © 2003 Kwanbis ] ==

MAR is a (M.)ultiple (A.)pplications (R.)unner for Exact Audio Copy (EAC) and CDex (CDex). It works as a (fake) encoder that in turn runs the real encoders for each track ripped by EAC or CDex, passing them the required paramters such as source and dest file, author, CD, track, etc. It can also be used to call other post-compress and pre-compress programs, like ReplayGain. This is is very usefull for example, if you like to encode all (or some) of your CDs to Ogg Vorbis for archival, and also to MP3 for use with your MP3 player (when would iRiver support Ogg Vorbis?). While you can rip an entire CD with EAC to wav, and then run multplie encoders on them, MAR can do multiple encodes after each track EAC has riped! It is my humble contribution to the great Hydrogenaudio comunity, to whom it is dedicated, and also to the EAC, CDex, Foobar, Ogg Vorbis and LAME developers, and to Borland, for Delphi and Kylix, my beloved programming environments.

Changes:
* its now posible to define a destination path for each diferent encoder.
* @destpath@ and @comments@ are no longer used/supported.
kwanbis
SETUP:

MAR is very easy to set up:

1) Download MAR from MAR Home Page (ony 30 kilobytes!):

OR better, use this direct link to JensRex (many thanks) mirror of it: http://www.jensrex.net/mirror/mar.zip


EAC:

2) Uncompress it under EAC's folder.

3) Set EAC Compression Options (F11) as follows:
_______ 1) Parameter passing scheme: User Defined Encoder
_______ 2) Program, including path, used for compression: (browse for) mar.exe
_______ 3) Add ID3 tag: UNCHECKED
_______ 4) Use file extension: the file extension of the 1st format you are going to encode into
_______ 5) Additional command line options: EAC '%o' '%s' '%d' "%a" "%g" "%t" "%n" "%y" "%m"

NOTE 1: %o, %s and %d are sourrounded with (') and the rest with ("). Don't ask me why, but EAC does something weird with the command line, and this is the way it works.


CDex:

2) Uncompress it under CDex's folder.

3) Set CDex Options -Settings (F4), Encoder as follows:
_______ 1) Encoder: External Encoder
_______ 2) Encoder path: (browse for) mar.exe
_______ 3) File Extension: the file extension of the 1st format you are going to encode into
_______ 4) Parameter string: CDex "Destination_Path\%a - %b - %tn.- %t.xxx" "%1" "%2" "%a" "%b" "%t" "%tn" "%y" "%g"

NOTE: CDex does not haves an option to send the full name of a track, as EACs %o option does, so you have to build it "by hand". In this case "Destination_Path\%a - %b - %tn. %t" means "Destination_Path\artis - cd name - track_number. track_name". A fake extension (for example: .xxx) is required also. Destination_Path is the fully qualified path where you want MAR to put your files (you can later use PathOverride if you need to).

4) Uncomment (remove the ";" from the from of the line) the lines you want to execute (or create your owns wink.gif).



HOW IT WORKS

After EAC/CDex finishes ripping a track, it would run MAR, passing it, on the command line, in this order:

ExecutingProgram ... FinalFileName ... Source_Filename ... Destination_Filename ... CD artist ... CD title ... Track title ... Track number ... Year ... Genre


MAR would then read the mar.ini file that must be located where mar.exe is, and for each ACTION LINE (an Action Line is any line that does not starts with a wink.gif, would replace all the LITERALS (specials strings codes that MAR recongnizes and that start and end with @) with the correct values, and would then execute the encode command.

HERE IS THE LIST OF LITERALS THAT MAR ACTUALLY RECOGNIZES AND THE VALUES THEY REPRESENT :

@program@ =[would be replaced with]=> Parameter Number 1 (should be: EAC or CDex respectivelly)
@finalname@ =[would be replaced with]=> Parameter Number 2 (should be: Encoded file Final File Name)
@source@ =[would be replaced with]=> Parameter Number 3 (should be: Source File Name)
@dest@ =[would be replaced with]=> Parameter Number 4 (should be: Destination File Name)
@artist@ =[would be replaced with]=> Parameter Number 5 (should be: CD Artist)
@cdname@ =[would be replaced with]=> Parameter Number 6 (should be: CD Title)
@songname@ =[would be replaced with]=> Parameter Number 7 (should be: Track Title)
@track@ =[would be replaced with]=> Parameter Number 8 (should be: Track number)
@year@ =[would be replaced with]=> Parameter Number 9 (should be: Year)
@genre@ =[would be replaced with]=> Parameter Number 10 (should be: Music Genre)

@11@ =[would be replaced with command line paramenter number]=> 11
..
@xx@ =[would be replaced with command line paramenter number]=> xx

@ownpath@ =[would be replaced with ]=> the full path to MAR, WITHOUT the the *ending* backslash (\) *
@fullname@ =[would be replaced with ]=> the full temporal name WITH the new extension
@pathonly@ =[would be replaced with ]=> the full temporal path, WITHOUT the *ending* backslash (\)
@nameonly@ =[would be replaced with ]=> the new temporal name, WITHOUT any extension
@extonly@ =[would be replaced with ]=> the new extension WITHOUT the dot

NOTE: It is not required to use @ownpath@, a fully qualified path name can be used instead.


As i said, the "ACTION LINES" are the actual commands MAR would run (after replacing all the LITERALS as described above). An Action Line must contain:

ExtensionOfTheEncodedFile TextBetweenFinallEncodedNameAndExtension OverridePathName CommandToRunWithParameters

- ExtensionOfTheEncodedFile:
the string that identifies the encoded files. For example, the encoder produces ogg files, this should be ogg.

- TextBetweenFinallEncodedNameAndExtension:
this string is used to add some text to the final name of the enconded file name, and file extension, for example. It is used if you want to encode with the same encode, but with diferent qualities. For example, suppose you want to encode with LAME, in Extreme and Insane qualities, the file "mana_song1.wav". EAC and MAR would try to generate two "mana_song1.MP3" files, which is not posible, so, if we define the text_between_finall_encoded_name_and_.extension of the second Action Line to be _extreme, MAR would rename this file to "mana_song1_extreme.MP3"! VERY IMPORTANT: if you don't want to add text between the file name and the file extension, put NONE, but you must include anything.

- OverridePathName:
here you can set a diferent path where MAR would put the encoded file of the specific encoder. It must be a fully qualified Path Name. Also, instead of spaces, use the _.

- CommandToRunWithParameters:
this is the real command that MAR would execute, after replacing all the LITERALS with the correspongin values.



A REAL USE EXAMPLE:

Suppose that our INI file contains this 2 Action Lines:
mp3 NONE NONE "@ownpath@\lame.exe" --alt-preset standard -Z @source@ @dest@
ogg NONE C:\Portable_Player @ownpath@\oggenc.exe --quality 5 @source@ --output=f"@dest@"

and that we are ripping the song: Emma Shapplin - Etterna - 12 - La Notte Etterna.wav


MAR would take the 1st Action Line:

mp3 NONE NONE "@ownpath@\lame.exe" --alt-preset standard -Z @source@ @dest@

convert it to:

"c:\watever\lame.exe" --alt-preset standard -Z c:\xxx\abreviated_song_name.wav c:\xxx\abreviated_song_name.mp3
and then execute it.


Then, it would take the Action Line:

ogg NONE C:\Portable_Player @ownpath@\oggenc.exe --quality 5 @source@ --output=f"@dest@"

convert it to:

"c:\watever\oggenc.exe" --quality 5 c:\xxx\abreviated_song_name.wav --output=f"c:\xxx\abreviated_song_name.ogg"


At this point, he would rename the file:

c:\xxx\abreviated_song_name.ogg

to
C:\Portable Player\Emma Shapplin - Etterna - 12 - La Notte Etterna.OGG.

Note how MAR used the "C:\Portable_Player" string on the Action Line to override the original destination Path.


MAR would then terminate, and pass control back to EAC/CDex, who, in turn, would rename c:\xxx\abreviated_song_name.mp3 to Emma Shapplin - Etterna - 12 - La Notte Etterna.MP3.



INI FILE:

On the INI file, i have put settings for Ogg Vorbis, LAME MP3 and MPC for practicall and exemplary use.



TESTING:

MAR has been developed and tested under Windows 2000. I would really appretiate confirmation that it runs on XP, NT, 95, 98, ME.


MAR Home Page
LCtheDJ
I've been testing out MAR v1.3 and got it to work with Audiograbber most of the time. I got it to run the wav through WaveGain.exe, then MAC.exe, then OggEnc.exe. The product is ReplayGain (--radio) adjusted wavs, apes, and oggs.

The trouble comes whenever the path-and-filename length of the @source@ file exceeds 119 characters; when it gets to 120, the unadjusted wav is saved but MAR will not process the wav into the other file formats.

I like to put a lot of information into my filenames and have not had any trouble with other frontends being able to process these same long named wav files.

Is there anything that can be done to get MAR to handle longer filenames?

I'm running Windows 2000 Pro, sp3 on a 2.4 GHz Pentium4.

Thanks for the additional features in 1.3 and for the direct link for downloading.

P.S.
I'm not interested in discussion about my choice of ripper or encoder settings, but if anyone is interested, here are my Audiograbber and mar.ini settings that work with Audiograbber; the files all go into the folder selected by Audiograbber's Settings:

AG's mp3 user defined arguments: AG %s %s %s "5" "6" "7" "8" "9" "10"
Must use "Rip as much as possible to RAM", to pass the filenames correctly.


mar.ini:

wav NONE NONE "@ownpath@\WaveGain.exe" --radio --apply "@source@"

ape NONE NONE "@ownpath@\mac.exe" "@source@" "@fullname@" -c3000 -v

ogg NONE NONE "@ownpath@\oggenc.exe" -q 1 --advanced-encode-option lowpass_frequency=19 "@source@" --output="@dest@"
atici
QUOTE(LCtheDJ @ May 13 2003 - 09:37 PM)
I've been testing out MAR v1.3 and got it to work with Audiograbber most of the time.  I got it to run the wav through WaveGain.exe, then MAC.exe, then OggEnc.exe.  The product is ReplayGain (--radio) adjusted wavs, apes, and oggs.

MAR won't work for replaygaining unfortunately (unless you can do it after you encode whole album). Check this thread.
LCtheDJ
Yes, I was aware that you can't do 'album' replay gain effects. I only use 'radio' type of adjustment, and using WaveGain on the wav file makes the effect permanent on all files made from the wav. That's fine with me; just the way I like it! Using the tracks as a DJ, not an album listener, I prefer that all the tracks have the same apparent loudness.
kwanbis
QUOTE(LCtheDJ @ May 14 2003 - 02:37 AM)
I've been testing out MAR v1.3 and got it to work with Audiograbber most of the time.  I got it to run the wav through WaveGain.exe, then MAC.exe, then OggEnc.exe.  The product is ReplayGain (--radio) adjusted wavs, apes, and oggs.

The trouble comes whenever the path-and-filename length of the @source@ file exceeds 119 characters; when it gets to 120, the unadjusted wav is saved but MAR will not process the wav into the other file formats.

Thanks. Well, actually, MAR should work with most of the rippers now ... i don't have Audiograbber, how are the @source@ strings? can you send me 2 or 3 copies that have this problems? Thanks for the INI examples also smile.gif
neilk
i can't seem to make the override path work. my encoded files always end up in the same directory as the rips. anything wrong with this action line?

CODE
 mp3 NONE C:\Music\MP3 "@ownpath@\lame.exe" --alt-preset standard --ta "@artist@" --tl "@cdname@" --tt "@songname@" --tn "@track@" --ty "@year@" --tg "@genre@" "@source@" "@dest@"


if i can just get this bit to work, i'll be all set!
kwanbis
override path works only for the 2nd or more encoded options, the first one is managed by either EAC or CDex, the line looks perfect.
rh factor
Is there a way to use this to encode to FLAC, then normalize the WAV, and then encode to MP3? I think I've got the encode to FLAC and MP3 down but I don't know how I could normalize in the middle there. (I use the --replay-gain option on FLAC encode but that doesn't do much for loading onto my portable player... I want to normalize them so when I have that thing on "all tracks shuffle" I don't have to mess w/the volume.)

One more problem I've been having: when I encode, my MP3s get left in root (C:\) rather than getting moved to the folder I specified for my files in EAC (and my FLACs do end up in the correct folder.) Here's my mar.ini file for diagnostics:

CODE

; -----------------------------------------------------------------
; Flac 'RECOMMENDED'
; -----------------------------------------------------------------
flac NONE NONE "C:\flac\bin\flac.exe" -5 "@source@" -o "@dest@" -T artist="@artist@" -T album="@cdname@" -T title="@songname@" -T tracknumber="@track@" -T date="@year@" -T genre="@genre@" -T comment="EAC 0.95pb3 + FLAC 1.1.0 compression-level-5" --replay-gain
;
; ----------------------------------------------------------------
; MP3 LAME "STANDARD" (180-220 kbps VBR -- usually averages around 192 kbps):
; -----------------------------------------------------------------
mp3 NONE NONE "C:\LAME\lame.exe" --alt-preset standard -Z --id3v2-only --ta "@artist@" --tl "@cdname@" --tt "@songname@" --tn "@track@" --ty "@year@" --tg "@genre@" --tc "EAC 0.95pb3 + LAME 3.90.2 alt-preset standard -Z" "@source@" "@dest@"
LCtheDJ
@ rh factor

Do you have a stand-alone program to do the normalizing? If you do, try adding that in the proper place in your order of operations in the mar.ini file.

Some you might try if you don't have one:
Look for "Wave Gain bundle with WaveGain and Speek's Frontend" and "Volumax - Normalization program" on the Rarewares page:
http://rarewares.hydrogenaudio.org/others.php

As for the mp3s ending up in the wrong folder, I infer from kwanbis's previous post that only the first encoded file's location is controlled by the ripper's setting. Try changing the second NONE in your mp3 action line to the path where you want your mp3s to end up.
rh factor
I tried using volumax but wasn't able to get it to work w/MAR. Further, I could get the MP3s in the right directory but not the right file name, or in C:\ but the right file name. Oh well. If anyone knows what's going on, feel free to post a code snippet.
LCtheDJ
To help others and to advance research on the use of MAR, I submit the following.

These settings work for me with Audiograbber:

AG's mp3 user defined arguments: 1 2 3 %s
Must use "Rip as much as possible to RAM", to pass the filenames correctly. (%s passes 'the_final_filename.wav', %d passes "temp.wav")
file type set to first processed file type, in my case: wav
my path to ripping output: "C:\+Rips"

mar.ini:
wav NONE NONE "@ownpath@\WaveGain.exe" --radio --apply "@dest@"

ape NONE NONE "@ownpath@\mac.exe" "@pathonly@\@nameonly@.wav" "C:\+Rips\+apes\@nameonly@.ape" -c3000 -v

ogg NONE NONE "@ownpath@\oggenc.exe" -q 1 --advanced-encode-option lowpass_frequency=19 "@pathonly@\@nameonly@.wav" --output="C:\+Rips\+oggs\@nameonly@.ogg"

I found that if I tried other combinations, I would get the apes and oggs renamed to 2.ape and 2.ogg and were placed in the root; or the file would be named correctly but placed in the folder with MAR.exe.

*** Also, MAR will delete any apostrophes (') that are in filenames passed to it, thus causing the action to fail. Right now, this is the only thing keeping me from successfully using MAR. ***
kwanbis
i would check out the problems.
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-2008 Invision Power Services, Inc.