M3UtoXSPF is a Java based command line utility that converts M3U files to XSPF files. M3U and XSPF are playlist formats. Skip forward to the download section for instructions on downloading M3UtoXSPF if you'd rather not read this.
Additional documentation can be found in the README file found here and in the JAR file.
This certainly isn't the only utility that manipulates XSPF and or produces XSPF files. A list can be found here. Some highlights include:
It's the author's hope that M3UtoXSPF will be useful by being simple, standalone and by populating both the location elements as well as other elements from user definable external tools.
The latest JAR file may be downloaded by clicking here. The source code is included in the JAR file.
Copy the downloaded JAR file to wherever you like to keep JAR files. Optionally rename the file to simply m3utoxspf.jar. Also, optionally make the JAR executable if your system supports executable JAR files. Finally, optionally make sure the executable JAR file is in your path.
m3utoxspf.jar typically takes a list of M3U files that it then converts to XSPF files, but it can also be used as a pipe. Ideally the system should have executable JAR files in which case m3utoxspf.jar can simple be invoked as shown in the examples. If not m3utoxspf.jar should be replaced with java -jar m3utoxspf.jar. The usage, which can be seen by running m3utoxspf.jar without any arguments, is:
Usage: m3utoxspf.jar [options] m3u1 [m3u2 [...]] Options: -- The remaining arguments are non-option arguments. -f Fast mode - don't run external information commands. -h Help (this usage statement) -v Verbose -o xspf Output XSPF filename -t title Title to use. Default is the M3U basename. -x external_icmd Add or override an external information command. Format: <type>,<command>[,<separator>] Current external information commands (note trailing spaces): ogg,ogginfo,= mp3,eyeD3 --no-color,:
The README file should be consulted for various examples. However, here is what the simplest possible example looks like:
Here is a more complicated example:
find . -name '*.mp3' -o -name '*.ogg' > example.m3u m3utoxspf.jar -x mp3,mp3show,^ -x ogg,oggshow,^ -t example-songs -v example.m3u */example.m3u
This utility is covered by the GPL license version 2 or later. A copy of the license is included in m3utoxspf.jar file. The GPL version 2 license can also be found at http://www.gnu.org/licenses/gpl-2.0.txt
Feedback may be given by posting comments here. The latest version of this code should always be here.