Help - Search - Members - Calendar
Full Version: How to encode wav into multiple flac tracks
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
fifth
Hi all, I got a single wav and its cue file, what I want is to encode this wav into flac format, track by track, how could I do it with flac.exe?

I know foobar2000 could have done that, however I'm trying to figure out what command-line options I need.

Thx in advance.
Nick.C
Starting with this.wav and this.cue, firstly embed the cue file in the flac file made from the WAV file
CODE
flac this.wav --cuesheet=this.cue
resulting in this.flac

Then selectively strip out the tracks:
CODE
flac -d this.flac --cue=1.1-2.1
to strip out track 1. This is the first half of the second command line.

The second half deals with creating a flac file from that decoded output:
CODE
flac - -o"Track 1.flac"


So the full second command line might look like:
CODE
flac -d this.flac --cue=1.1-1.2 --silent --stdout|flac - -o"Track 1.flac"
for track 1.

This does not deal with tags at all.
fifth
thanks for quick reply.

I've just taken a try, perfectly worked.
So I have to build a bat if I have to strip out all tracks, read info from cuesheet to figure out how many tracks there are... etc.
Synthetic Soul
If you want to use the command line you may do better to use something like ACDIR, shntool or CueProc.

http://wiki.hydrogenaudio.org/index.php?ti...sheet#Splitting

I have used ACDIR, and I know you can easily specify what tracks to process.

Edit: One of the main benefits is that (certainly ACDIR, and I suspect the others) you can set tags from meta data from the cue sheet (artist, album, track name, etc.).

I wrote a guide a long while back which has some example command lines for ACDIR, and help with the tokens, etc. It uses a Monkey Audio image file to convert to MP3 tracks, but the idea is the same.

http://www.neilpopham.pwp.blueyonder.co.uk...transcode-acdir
fifth
QUOTE (Synthetic Soul @ Oct 2 2009, 10:25) *
If you want to use the command line you may do better to use something like ACDIR, shntool or CueProc.

http://wiki.hydrogenaudio.org/index.php?ti...sheet#Splitting

I have used ACDIR, and I know you can easily specify what tracks to process.

Edit: One of the main benefits is that (certainly ACDIR, and I suspect the others) you can set tags from meta data from the cue sheet (artist, album, track name, etc.).

I wrote a guide a long while back which has some example command lines for ACDIR, and help with the tokens, etc. It uses a Monkey Audio image file to convert to MP3 tracks, but the idea is the same.

http://www.neilpopham.pwp.blueyonder.co.uk...transcode-acdir


With tags support would be better and have good naming for resulting tracks.
Thanks, I'll check out ACDIR soon.

Actually I'm looking for a small tool to simply do,
1. encode wav to single or multi-tracks flac;
2. automatically generate a new correct cuesheet, like, cdimage.flac.cue, then leave original cue intact.
3. batch mode support;

I didn't get such a tool so I'm considering to write my own one.

Do you know is there any?
Synthetic Soul
Nothing existing springs to mind.

FLAC.EXE is fine to convert WAV image to FLAC image.
ACDIR (etc.) is fine to convert WAV image to FLAC tracks.
If converting to FLAC image you could copy the cue sheet (COPY command) and update the FILE reference using SED in a batch file. If you need to convert an image cue sheet to a single file cue sheet I can only think of CUETools, and I don't know if that can be executed on the command line.

I guess you could do all the above using a batch file (excluding CUETools), and get the batch file to process either a single WAV file or a folder of WAVs.
fifth
Thanks Synthetic Soul.

I'll test more, and the resulting program will be a batch file or a standalone tool, I don't know yet.

Anyway, you inspired me a lot.
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.