Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is it possible to get FLAC to tag on EAC without adding a leading zero (Read 5373 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is it possible to get FLAC to tag on EAC without adding a leading zero

Just almost ripped half of cd collection on EAC / FLAC for lossless archive backup since i will burn the flacs onto dvds after completeing my ripping session. One of my major issues besides finding disc space, I having to use foobar's auto-track command to re-write the track numbers since the FLAC encoder keeps adding a leading zero on the tracknumber i.e 02 or 06, which I find kind annoying and pointless to have a leading zero in tags nowdays. I looked on the net for info and could find anything, just wondering if anyone knows a way to stop the FLAC encoder to add a leading-zero on the tracknumber tag.

My EAC / FLAC command line:

Code: [Select]
-6 -V -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "totaltracks=%x" -T "genre=%m" %s -o %d


The odd thing is totaltracks never has a leading zero, which also makes the tags look odd i.e 03/8 on a mp3 that has transcoded from FLAC based on that commandline.
"I never thought I'd see this much candy in one mission!"

Is it possible to get FLAC to tag on EAC without adding a leading zero

Reply #1
I'm afraid this is EAC's doing.

The funny thing is that I used to take additional steps to address the fact that older versions of EAC didn't include a leading zero.

That said, I'm sure you can do the same thing in reverse with a simple batch script to be used instead of flac.exe as the external compressor.

Is it possible to get FLAC to tag on EAC without adding a leading zero

Reply #2
I'm afraid this is EAC's doing.

The funny thing is that I used to take additional steps to address the fact that older versions of EAC didn't include a leading zero.

That said, I'm sure you can do the same thing in reverse with a simple batch script to be used instead of flac.exe as the external compressor.

It looks like that the tracknumber output vaule on EAC is also used when naming the files. All encoders i tried on EAC always ignored the leading zero on the tracknumber, for some reason FLAC would just put anything onto tags without being picky about it, unlike LAME would. Looks like i will have to rember to use the auto-command on foobar (which is ackward to rember and feels really out-date to do) when I replaygain the rips.
"I never thought I'd see this much candy in one mission!"

Is it possible to get FLAC to tag on EAC without adding a leading zero

Reply #3
You can configure EAC with this batch script. You have all %track%, %lz_track%, %totaltracks% and %lz_totaltracks% available. Save script as EAC-encode.bat in the EAC directory:
Code: [Select]
@echo off
rem Script by Tycho, March 2008.
rem
rem EAC external compression option
rem
rem Parameter passing scheme      : User Defined Encoder
rem Use file extension            : .flac
rem Program used for compression  : C:\WINDOWS\system32\cmd.exe
rem Addtional command line option : /c C:\Progra~1\ExactA~1\EAC-encode.bat %s %d %o "%a" "%g" %n %x "%t" "%y" "%m" "%e"
rem Delete WAV after compression  : [x]

set s=%1
set d=%2
set o=%3

set eacdir=%~dp0
set destdir=%~dp2
set destname=%~n3
set extension=%~x2

shift
shift
shift

set user=%USERNAME%

set artist=%1
set album=%2

set /a track=1%3-100
set totaltracks=%4

rem With leading zero
set lz_track=%3
set /a lz_totaltracks=100+%4
set lz_totaltracks=%lz_totaltracks:~1%

set title=%5
set year=%6
set genre=%7
rem set comment=%8
set comment="Ripped with EAC, %DATE%"

title EAC: %artist% - %album% - %lz_track%/%lz_totaltracks% - %title%
echo Output dir: "%destdir%"
echo.

if "%extension%"==".flac" (
    rem Encode FLAC
    "%eacdir%Flac\flac.exe" -8 -f %s% -o %d% -T artist=%artist% -T album=%album% -T tracknumber=%track% -T totaltracks=%totaltracks% -T title=%title% -T date=%year% -T genre=%genre% -T comment=%comment% -T encoded-by="%user%"
    echo.
)

rem Optional album gain scanning on last track (requires glob.exe and metaflac.exe)
if %track%==%totaltracks% (
    pushd "%destdir%"
    if "%extension%"==".flac" (
        if exist "%eacdir%Flac\glob.exe" "%eacdir%Flac\glob.exe" -v -c "%eacdir%Flac\metaflac.exe" --add-replay-gain *.flac
    )
    popd
)
[/size]