The wavconvert package

[Tags: bsd3, program]

This program is useful for turning a directory tree of .wav files (presumably created by a CD ripping program) into a tree of .ogg files with proper metadata. It is meant to be run on a directory tree in which the directory structure is organized according to the artist and album names. It runs an .ogg encoder (which is assumed to be installed) and sets the metadata in the resulting .ogg files based on the directory organization. (See the README for examples.) It would be easy to adapt the code to generate .mp3 files instead of .ogg, or to use a different encoder (currently the oggenc program is assumed.)

[Skip to ReadMe]


Versions0.1, 0.1.1
Change logNone available
Dependenciesbase, directory, filepath, process [details]
Copyright(c) Tim Chevalier, 2008
AuthorTim Chevalier
UploadedTue Aug 19 00:29:40 UTC 2008 by TimChevalier
Downloads392 total (8 in last 30 days)
0 []
StatusDocs not available [build log]
Last success reported on 2015-11-14 [all 5 reports]


Maintainers' corner

For package maintainers and hackage trustees

Readme for wavconvert-0.1.1

This program batch-converts .wav files to .ogg format while filling in the ID3
tags for the resulting .ogg files using directory structure information. 

=== Installation ===

$ runhaskell Setup.lhs configure
$ runhaskell Setup.lhs build
$ runhaskell Setup.lhs install

Tested with GHC 6.8.2.

You will need the "oggenc" program (part of the vorbis-tools package) to run
wavconvert. It would be easy to change the source code so that the program 
name to use (and appropriate flags) are specified on the command line or
(preferably) through a configure option. Send me a patch if you do!

=== Usage ===

./wavconvert [OPTION...] root-directory

(where options are described below).

wavconvert assumes that files in the root directory are named with the following

root-directory/ArtistName/AlbumName/TrackNum - SongTitle.wav

For example, if root-directory is "/home/tjc/Music", an example is:

/home/tjc/Music/Morrissey/Vauxhall and I/10 - The Lazy Sunbathers.wav

It looks for .wav files underneath the root directory and encodes any such files
it finds in .ogg, relying on the naming conventions described above. The output
file name is determined by substituting the ".wav" extension in the original 
filename with ".ogg".

It does not delete the original .wav file unless you specify the --remove-files

If the .ogg file that would have been created already exists, it skips that file
and prints a warning.

==== Command-line options ====

-v / --verbose prints out external commands as they are executed.
-d / --dry-run prints out commands without executing them.
-r / --remove-files removes .WAV files after all files are encoded.

=== To do ===

* Take the name of the program and relevant flags as configure or command-line
options, rather than hard-wiring in oggenc or its flags.
* Don't assume a particular file naming convention, but rather take a format
string as an argument and interpret the directory structure based on that string.

Feel free to send me patches if you decide to implement these changes or
anything else!

   -- Tim Chevalier <>
      August 2008