Overview

Wagfile sends files to the server for encoding. As well as specifying individual files you can also specify playlists, each file in the playlist being sent to the server.

Command: wagfile [switches] [file]*

Note that you can abort Wagfile by hitting CTRL-C and then re-run with just wagfile to resume. When resuming you can use any of the switches below to modify the job. If any files are specified, either on the command-line or using the -files switch then any previous job will be wiped and you'll start afresh.

Command-line switches

Name Description
-class name Uses class name if available.
-debug Turns on debug output.
-files filename In addition to the files specified on the command-line, process the files listed in filename. Format of the file should be one filename per line. No quotes should be placed around filenames containing spaces.
-no-edit Do not ask to edit meta-data details if the details are OK.
-reencode yes/no Uses the value supplied as the answer to the "re-encode?" question.
-server-host hostname Sets the host on which wagenc is running. Overrides the value in client.conf.
-server-port number Sets the port on which wagenc is running. Overrides the value in client.conf.
-source-link yes/no If 'yes' is specified, the files selected are not uploaded into the queue directory and instead the encoder reads the file from its current location. This saves a lot of time and disk space if you're queueing a lot of files. However, it does depend on the server being able to access the file in the same location as the machine running Wagfile. Default is 'no'.
-task name Uses task name instead of the default value of 'song'.
-title-guess If the title of the file cannot be retrieved from the file's meta-data, guess a title based on the filename.
-tmp directory Specifies an alternative temporary directory.
-track-guess If the track number of the file cannot be retrieved from the file's meta-data and the filename starts with a number, presume the number is a track number.

In addition to the above switches, the values for certain meta-data fields can also be specified on the command-line. If a field is set in this way the key and value appears in the default section of the details file and that field is removed from any file section where it might normally appear.

Each field name in the default meta-data list can be used as a switch, e.g. wagfile -disc-year 2002 somefile.mp3.

Using Wagfile

  1. Run wagfile, specifying any necessary switches and filenames
  2. Wagfile will form a list of files. For each file Wagfile will attempt to discover existing meta-data. This requires suitable software on the client, e.g. id3lib and id3comtool for mp3 files, metaflac for FLAC files and vorbiscomment for Ogg/Vorbis files
  3. If a class chosen resolves to the same format as an input file you will be asked if you wish to re-encode files which would end up in the same format. If you say 'yes', the file will be decoded and then encoded which will give a needless loss of quality for lossy formats, so say 'no' unless you are encoding to a lower bitrate for size reasons
  4. Wagfile will ask if you want to view/edit the details file
  5. Once you've finished editing, Wagfile will upload the files to the server

Example

The ability of Wagfile to handle playlists means that it is simple to re-encode your entire collection to a new format. So, having ripped all your CDs to a lossless format such as FLAC you can then convert them all to the current best performing lossy compression. In this example Wagfile is used to re-encode all files using the 'stream' task, making them ready for streaming over a network connection. In this case Wagfile was running on the server and so -source-link can be used to speed up the process.

find /media/audio/archive -name playlist.m3u > /tmp/playlists.txt wagfile -task stream -no-edit -source-link yes -files /tmp/playlists.txt