Differences between revisions 3 and 4
Revision 3 as of 2011-07-03 00:26:12
Size: 1782
Editor: SamatJain
Comment: Splitting monolithic FLAC files with CUE sheets
Revision 4 as of 2011-08-24 22:34:25
Size: 2195
Editor: SamatJain
Comment: Add dir2ogg conversion
Deletions are marked like this. Additions are marked like this.
Line 50: Line 50:

== Conversion ==

[[http://jak-linux.org/projects/dir2ogg/|dir2ogg]] finds all MP3s/FLACs/etc in a directory and converts them to Ogg Vorbis, preservings tags & metadata.

Copy/hard link your media into a new folder, and run the following in that folder to convert to Ogg Vorbis (q=8):

{{{#!highlight sh numbers=off
dir2ogg -rf -q 8 --delete-input .
}}}

Make sure to copy! The above deletes files.

Consistency checking

FLAC

FLAC files already contain MD5 sums of stream data, so changes to other metadata (artist, track title, etc) will not perturb this checksum. flac can be used to check FLAC files:

flac -ts *.flac

Some FLAC files cannot be checked, with the self-explaining warning:

WARNING, cannot check MD5 signature since it was unset in the STREAMINFO

The best thing to do is decode and recompress the FLAC files to contain an MD5 header. In the process, decoding is an effective check for frame damage. To rencode such files in-place:

flac --best -f *flac

MP3

Checkmate MP3 checker is a simple and fast tool for checking MP3 files, particularly checking for bad frames. Invocation:

mpck -qrB .

Splitting

FLAC with .CUE files

Sometimes, a FLAC file is distributed as a monolithic FLAC file with a .CUE sheet describing when tracks start/end. To split the monolithic file into smaller ones:

sudo aptitude install cuetools shntool

cuebreakpoints monolithic.cue | shnsplit -o flac monolithic.flac
cuetag monolithic.cue split-track*.flac

Sometimes, the .CUE sheet is included with the FLAC. To get it:

# If .CUE sheet is in cuesheet block
metaflac --export-cuesheet-to=monolithic.cue monolithic.flac
# If .CUE sheet is in tag
metaflac --show-tag=CUESHEET monolithic.flac | grep -v ^CUESHEET > monolithic.cue

Source: Split lossless audio in Ubuntu

Conversion

dir2ogg finds all MP3s/FLACs/etc in a directory and converts them to Ogg Vorbis, preservings tags & metadata.

Copy/hard link your media into a new folder, and run the following in that folder to convert to Ogg Vorbis (q=8):

dir2ogg -rf -q 8 --delete-input .

Make sure to copy! The above deletes files.


CategoryCheatSheet

SamatsWiki: CheatSheet/Audio (last edited 2020-05-07 18:16:12 by SamatJain)