M3U Playlist Director
The M3U Playlist Director generates extended M3U playlists from a given directory for many media players.
The playlists are printed to files encoded in UTF-8 or to STDOUT.
The path references to the media files in the playlists are relative to the playlists' directories. Therefore, the playlists and the media files cannot be stored on different drives in DOS and Windows OS systems.
Extended M3U files contain additional information like length of the song and information from ID3 tags, for instance.
If you provide a '-' instead of an <audio-dir> directory, the script will read the audio files' directories from STDIN.
The playlists' directory (i.e. option m3udir) and the audio-dir(s) provided via the command line do not support non-ANSI encoded characters on DOS and Windows OS systems because of Perl's limitations on these operating systems.
For running this script you'll need the following Perl modules:
Audio::Scan for many media files (MP3, MP4, Ogg Vorbis, FLAC, ASF, WAV, AIFF, Musepack, Monkey's Audio, and WavPack)
Audio::FLAC::Header for FLAC files
MP3::Info for MP3 files
Ogg::Vorbis::Header::PurePerl for OGG Vorbis files
The script autodetects the installed modules. If a module is not installed, the corresponding file type is ignored.
Audio::Scan is the preferred module because it supports many media file types.
m3upd.pl [-b] [-a] [-d] [-h] [-i] [-m=<directory>] [-r] [-t] <audio-dir[s]>
- Create playlists for albums that may have more than one artist.
This option can only be used in combination with the options 'all' and 'disc'. All albums' audio files must be stored in the same directory. Audio files from different albums may be stored in the same directory.
- Create playlists for all audio files of all discs for each album. An album may have one or more discs. An album's and all its discs' audio files must be stored in the same directory.
- Create a playlist per disc for albums with more than one disc.
An album's and all its discs' audio files must be stored in the same directory.
- Shows a help page.
- The options and directories are set by interaction with the user. The options provided via the command line are used as default values.
- All M3U playlists are stored in this given directory. Otherwise, the playlists are stored in the same directories like their referenced audio files.
- Randomize playlist order if the output is printed to STDOUT.
This option is ignored if the options 'all' or 'disc' are used.
- Strange relative paths for the Twonky (tm) Server, like "/artist - album/artist - album (CD 1) - 01 title.flac" for a playlist stored in "/home/user/Music/artist - album".
- Search this directory recursivly for audio files.
- Version 2
- When using the module Audio::Scan a bug in the calculation of a song's length in seconds fixed.
- Version 1
- First public release.
The M3U Playlist Director is based on extm3u.pl by Andreas Gohr.
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.