Skip to main content
Topic: Workaround for EAC External Compressor Bug (Read 5849 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Workaround for EAC External Compressor Bug

Hi Folks,

EAC at this moment ignores the exit value of external compressor. This means that if your external processor returns with non-zero exit value, which normally indicates some sort of a failure, you will never learn that and EAC will display "no error occurred" message (provided that the ripping itself was successful).

This is discussed at length at http://www.hydrogenaudio.org/show.php/showtopic/14998

In my very paranoid book this is a serious bug. For others it is probably not. I do not know when the EAC developer manage to fix it if he intends to do so at all. Regardless I am in a middle of archiving I do not want to upgrade so I created this wrapper untility which logs if the external compressor returned a non-zero exit code.

This is an example how to set up EAC in the External Compression option dialogue:

Program used for compression:

C:\Progs\eac\eac_wrapper.exe

Additional command line options:

-l C:\Progs\eac\eac_wrapper.log C:\Progs\eac\flac\bin\flac.exe -T "ARTIST=%a" -T "ALBUM=%g" -T "DATE=%y" -T "GENRE=%m" -T "TRACKNUMBER=%n" -T "TITLE=%t" -T "COMMENT=Ripped by EAC 095pb3; Coded by FLAC 1.1.0 with -4 --verify;" -4 --verify -o %d -- %s

This will run

C:\Progs\eac\flac\bin\flac.exe ...

and if it returns non-zero exit value, it will append a entry to
C:\Progs\eac\eac_wrapper.log log file. This entry contains the time,
exit code and the entire offending command line. I hope you've got the drift.
If you run eac_wrapper.exe with -h. It gives you a short help.

As usual, the normal disclaimer applies. You use it at your own risk. I am not responsible for any damage.

However I thought you might find it useful. Especially if you are very paranoid like me.

Workaround for EAC External Compressor Bug

Reply #1
And the source.

I only have practice with UNIX, but I managed to figure out how to do it in Windows. I tested it and I think it works, but if you find alarm bells ringing, let me know ASAP

Workaround for EAC External Compressor Bug

Reply #2
Great work!  I wonder if this can be modified to allow for gapless mp3 encodes (to be used with previous versions of LAME of course, as the latest places duration information into the header)?  I use Ogg Vorbis, so it is not of much importance to me, but it is important to others.
WARNING:  Changing of advanced parameters might degrade sound quality.  Modify them only if you are expirienced in audio compression!

Workaround for EAC External Compressor Bug

Reply #3
Quote
Great work!  I wonder if this can be modified to allow for gapless mp3 encodes (to be used with previous versions of LAME of course, as the latest places duration information into the header)?  I use Ogg Vorbis, so it is not of much importance to me, but it is important to others.

Thanks. I am not familiar with the gapless mp3 encodes, but this wrapper is totally generic. In my example I used FLAC, but it could be anything. What else would be needed for gapless mp3?

Triza

Workaround for EAC External Compressor Bug

Reply #4
All that is needed is for whatever tagging information to be used is logged externally, and have the mp3s all encoded within the same LAME process sequentially with --nogap...Ah, now that I think of it, you WOULD have to wait till the cd was done ripping to begin encoding, but it still seems like this could do something like that.  Problem is, I don't exactly know how one feeds LAME with the tagging data when doing a gapless encode of an album.  I don't even know if THAT is possible.  Also, the original WAVs would have to be deleted at the end.
WARNING:  Changing of advanced parameters might degrade sound quality.  Modify them only if you are expirienced in audio compression!

Workaround for EAC External Compressor Bug

Reply #5
Quote
Hi Folks,

EAC at this moment ignores the exit value of external compressor. This means that if your external processor returns with non-zero exit value, which normally indicates some sort of a failure, you will never learn that and EAC will display "no error occurred" message (provided that the ripping itself was successful).

Did you already post this on the EAC board at www.digital-inn.de ? I think that Andre should know about that ...
The name was Plex The Ripper, not Jack The Ripper

Workaround for EAC External Compressor Bug

Reply #6
Quote
All that is needed is for whatever tagging information to be used is logged externally, and have the mp3s all encoded within the same LAME process sequentially with --nogap...Ah, now that I think of it, you WOULD have to wait till the cd was done ripping to begin encoding, but it still seems like this could do something like that.  Problem is, I don't exactly know how one feeds LAME with the tagging data when doing a gapless encode of an album.  I don't even know if THAT is possible.  Also, the original WAVs would have to be deleted at the end.

Mmortal

I do not think I can help you because EAC calls the external processor after each track and I gathered that you need to have all the tracks ripped before you can feed them into LAME. You need to rip the tracks uncompressed and you need to use a script after that. However I was intrigued because I am going to transcode my flac into mp3 using the recommended LAME and I found a few threads on this. I am new to this, but it seems there are 2 ways to get gapless solution.

1) Using special LAME tags. It seems that LAME 3.90 and later automatically adds these and you only need to specify the track you transcode.

2) Using the --nogap switch, which needs all the tracks (or just the 2 neighbouring?, dunno) . 

This is a quite revealing thread.

http://www.hydrogenaudio.org/forums/index....0&&#entry152898

You might want to choose 1)

Again I am new to this subject, so apologies if I am wrong in this. I'll do my research later on this.

Workaround for EAC External Compressor Bug

Reply #7
Quote
Quote
Hi Folks,

EAC at this moment ignores the exit value of external compressor. This means that if your external processor returns with non-zero exit value, which normally indicates some sort of a failure, you will never learn that and EAC will display "no error occurred" message (provided that the ripping itself was successful).

Did you already post this on the EAC board at www.digital-inn.de ? I think that Andre should know about that ...

Now I've done that on the related thread there.

Workaround for EAC External Compressor Bug

Reply #8
I don't seem to be able to download your file.  Maybe a problem the board update caused.  Please help.

Workaround for EAC External Compressor Bug

Reply #9
Quote
Quote
All that is needed is for whatever tagging information to be used is logged externally, and have the mp3s all encoded within the same LAME process sequentially with --nogap...Ah, now that I think of it, you WOULD have to wait till the cd was done ripping to begin encoding, but it still seems like this could do something like that.  Problem is, I don't exactly know how one feeds LAME with the tagging data when doing a gapless encode of an album.  I don't even know if THAT is possible.  Also, the original WAVs would have to be deleted at the end.

Mmortal

I do not think I can help you because EAC calls the external processor after each track and I gathered that you need to have all the tracks ripped before you can feed them into LAME. You need to rip the tracks uncompressed and you need to use a script after that. However I was intrigued because I am going to transcode my flac into mp3 using the recommended LAME and I found a few threads on this. I am new to this, but it seems there are 2 ways to get gapless solution.

1) Using special LAME tags. It seems that LAME 3.90 and later automatically adds these and you only need to specify the track you transcode.

2) Using the --nogap switch, which needs all the tracks (or just the 2 neighbouring?, dunno) . 

This is a quite revealing thread.

http://www.hydrogenaudio.org/forums/index....0&&#entry152898

You might want to choose 1)

Again I am new to this subject, so apologies if I am wrong in this. I'll do my research later on this.

I am not personally wanting to do this, but yes, that IS where one who WANTS to do this needs to go.
WARNING:  Changing of advanced parameters might degrade sound quality.  Modify them only if you are expirienced in audio compression!

Workaround for EAC External Compressor Bug

Reply #10
Quote
I don't seem to be able to download your file.  Maybe a problem the board update caused.  Please help.

No problem. Here you go:

Workaround for EAC External Compressor Bug

Reply #11
Quote
I don't seem to be able to download your file.  Maybe a problem the board update caused.  Please help.

It seems I cannot upload 2 files at one go, so here is the source. Let me know if you have a problem. It runs on my XP SP1, but I could not test on other windows.

One thing would be nice to add is to capture the stdout and stderr of the external compressor and dump it into the log file. I did not do it because exit code is enough for me.

Triza

Workaround for EAC External Compressor Bug

Reply #12
I’m having some trouble getting this to work.  I slightly modified the string to fit my preferences.  Here is what I have:

Program used for compression:
C:\Program Files\eac\eac_wrapper.exe

Additional command line options:
-l C:\Program Files\eac\eac_wrapper.log C:\WINDOWS\flac\flac.exe -T "ARTIST=%a" -T "ALBUM=%g" -T "DATE=%y" -T "GENRE=%m" -T "TRACKNUMBER=%n" -T "TITLE=%t" -T -8 --verify -o %d -- %s

As far as I can tell, flac.exe is never activated.  The wav files are untouched.  Any advice?

Workaround for EAC External Compressor Bug

Reply #13
Quote
I’m having some trouble getting this to work.  I slightly modified the string to fit my preferences.  Here is what I have:

Program used for compression:
C:\Program Files\eac\eac_wrapper.exe

Additional command line options:
-l C:\Program Files\eac\eac_wrapper.log C:\WINDOWS\flac\flac.exe -T "ARTIST=%a" -T "ALBUM=%g" -T "DATE=%y" -T "GENRE=%m" -T "TRACKNUMBER=%n" -T "TITLE=%t" -T -8 --verify -o %d -- %s

As far as I can tell, flac.exe is never activated.  The wav files are untouched.  Any advice?

I think your problem is that the path of the logfile has a space so you need to quote it like this

-l "C:\Program Files\eac\eac_wrapper.log" ...

otherwise it tries to log into "C:\Program" line and run "Files\eac\eac_wrapper.log"

I also spotted another problem. The last -T has no parameter, or I should say flac will consider -8 as the vorbis comment, which I think is invalid.

Apart from that it looks OK to me.

One more thing if you add -d before -l, it turns on debugging and it will log everything even if flac returns 0 exit code. This is just so that you can see it in action.

Lastly if you still have a problem I suggest that you should experiment with it in a DOS window. 1st use -h for help, then use it with a simple DOS command or something. If you use -d it will log even if it returns 0, so you can see whether it works. A word of warning I use the stock CreateProcess system call to run a subprocess and that one does not search the PATH so the command eac_wrapper.exe calls must be a absolute pathname or relative to your current directory.

I hope this helps.

I've just read that the new forthcoming EAC fixes this problem. Still I am happy with 0.95pb3 (it took me for a while to find a release which works 100% for me). I guess I am not alone so maybe this little app will be of use for you and others.

Triza

 
SimplePortal 1.0.0 RC1 © 2008-2020