This tutorial will guide you through the M3U file format specifications required for WiiM devices with an USB port, such as WiiM Amp, WiiM Amp Pro, and WiiM Ultra.
Overview of M3U Files
An M3U file is a playlist format that contains information about each music track, including the track name, playback duration, and the path to the music track file. However, to ensure compatibility with WiiM devices, the M3U file must adhere to specific format requirements to generate a playlist in USB Media Library.
M3U File Requirements for WiiM Devices
Use UTF-8 Encoding Format
M3U files must be saved using the UTF-8 encoding format.
Additionally, ensure that the filenames of your music tracks use UTF-8-compatible characters. Avoid using special or non-standard characters.
Use Relative Paths
Each music file path specified in the M3U file should be a relative path, not an absolute path. Relative paths refer to the locations of the music files in relation to where the M3U file is stored on the USB drive.
This ensures that WiiM devices can locate and play the music correctly from the USB drive.
Where to Store M3U Files on USB Drive
You can store the M3U file anywhere on your USB drive. WiiM devices will recognize it as long as the file is saved in UTF-8 format and the referenced music files use valid relative paths.
Example of an M3U File Compatible with WiiM Devices
For example, if the USB drive directory structure is organized as follows:
USB Disk Directory
├── sample.m3u
├── song1.mp3
├── Album1
└── song2.mp3
Then, the corresponding M3U file (sample.m3u) should specify the relative paths of the music files like this:
#EXTM3U
#EXTINF:123,Artist 1 - Song 1
song1.mp3
#EXTINF:145,Artist 2 - Song 2
Album1/song2.mp3
Each #EXTINF entry in the M3U file provides information about a music track. In this example, the #EXTINF:123,Artist 1 - Song 1 entry includes the following details:
- 123: This number represents the playback duration of the music track in seconds (in this case, 123 seconds).
- Artist 1 - Song 1: This text gives the artist's name (Artist 1) and the song title (Song 1).
How to Verify UTF-8 Encoding of an Existing M3U File
If you already have an M3U file, you can use a text editor to check whether it's encoded in UTF-8.
For example, on Windows:
- Open your M3U file using Notepad.
- Click File > Save As.
- Check the encoding format at the bottom of the dialog box.
- If it’s not set to UTF-8, select UTF-8 from the dropdown and click Save to convert it.
For other operating systems (e.g., macOS or Linux), you can use similar text editor to verify or convert the file to UTF-8 encoding.