Two Playlist Formats Sharing One Name
M3U (MPEG-3 URL) is a simple text playlist format from the Winamp era:
#EXTM3U
#EXTINF:120,Artist - Song Title
song1.mp3
#EXTINF:180,Artist - Another Song
song2.mp3
M3U8 is the UTF-8 variant. Same syntax, just UTF-8 encoded (handles non-ASCII characters).
In 2026, M3U8 is dominant for two unrelated uses:
- Music playlists: VLC, foobar2000, music apps
- HLS streaming: Apple's video streaming protocol
The same file extension serves both worlds. Confusing but established.
This post covers the practical use of each. For HLS streaming context, see DASH vs HLS Streaming.
Music Playlist M3U/M3U8
For music playlists:
#EXTM3U
#EXTINF:240,Beatles - Let It Be
/Music/Beatles/Let It Be.mp3
#EXTINF:213,Pink Floyd - Time
/Music/Pink Floyd/Time.flac
#EXTINF:355,Led Zeppelin - Stairway to Heaven
/Music/Led Zeppelin/Stairway to Heaven.mp3
The structure:
#EXTM3U: file header (required)#EXTINF:duration,title: metadata for next track- File paths: absolute or relative paths to media files
This is a simple, text-based playlist. Compatible with VLC, foobar2000, MusicBee, iTunes (sort of), etc.
HLS Streaming M3U8
For HLS streaming, M3U8 plays a different role:
Master playlist (lists multiple variants):
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1280x720
720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=854x480
480p.m3u8
Variant playlist (lists segments):
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.000,
segment_001.ts
#EXTINF:10.000,
segment_002.ts
The HLS M3U8 references multiple bitrate variants. The player picks the right one based on bandwidth.
For HLS context, see DASH vs HLS Streaming.
When Each Is Used
| Use case | Format |
|---|---|
| Personal music library | M3U or M3U8 |
| Internet radio stream | M3U (with stream URL) |
| Spotify playlist export | M3U |
| HLS video streaming | M3U8 |
| Apple TV / iOS streaming | M3U8 |
| Live broadcast | M3U8 (HLS) |
For music: M3U/M3U8 are simple text references. For video streaming: M3U8 is part of HLS protocol.
Music Playlist Workflow
For creating music playlists:
VLC:
- Open VLC
- Add files to playlist
- Media > Save Playlist to File
- Format: M3U or M3U8
MusicBee, foobar2000: similar workflow.
Spotify export: not directly supported. Use third-party tools like Soundiiz to export Spotify playlists to M3U.
Manual: text editor, write the M3U format yourself.
For batch playlist creation, see Batch Processing Files Guide.
HLS Manifest Generation
For generating HLS streaming with FFmpeg:
# Generate HLS variants from MP4
ffmpeg -i source.mp4 \
-c:v libx264 -crf 22 \
-c:a aac -b:a 192k \
-f hls \
-hls_time 10 \
-hls_list_size 0 \
-hls_segment_filename "segment_%03d.ts" \
output.m3u8
For multi-bitrate HLS:
# Generate 720p, 480p, 240p variants
ffmpeg -i source.mp4 \
-map 0:v -map 0:v -map 0:v -map 0:a \
-c:v libx264 \
-filter:v:0 "scale=1280:720" -b:v:0 2000k \
-filter:v:1 "scale=854:480" -b:v:1 1000k \
-filter:v:2 "scale=426:240" -b:v:2 400k \
-c:a aac -b:a 192k \
-f hls \
-hls_time 6 \
-hls_list_size 0 \
-hls_segment_filename "segment_%v_%03d.ts" \
-master_pl_name master.m3u8 \
-var_stream_map "v:0,a:0 v:1,a:0 v:2,a:0" \
variant_%v.m3u8
The master_pl_name and var_stream_map create a master playlist referencing each variant.
CDN Hosting
For HLS streaming via CDN:
- Cloudflare Stream auto-generates HLS from upload
- Mux generates HLS automatically
- Bunny Stream generates HLS
- Self-hosted: serve M3U8 + segments via static file server
For CDN comparison, see Cloudflare Stream vs Mux vs Bunny.
Music Player Compatibility
| Player | M3U | M3U8 |
|---|---|---|
| VLC | Yes | Yes |
| foobar2000 | Yes | Yes |
| MusicBee | Yes | Yes |
| Apple Music app | Limited | Limited |
| iTunes legacy | Yes | Yes |
| Plex | Yes | Yes |
| Roon | Yes | Yes |
| Spotify | No (third-party tools needed) | No |
For most music libraries: M3U8 is the modern default. M3U for legacy compatibility.
HLS Player Compatibility
| Player | HLS |
|---|---|
| Safari (iOS, macOS) | Native |
| Chrome | Via HLS.js or Shaka Player |
| Firefox | Via HLS.js or Shaka Player |
| Apple TV | Native |
| Smart TVs | Most via app SDKs |
| Mobile apps | Via AVPlayer (iOS), ExoPlayer (Android) |
For broadest reach: HLS works everywhere via player libraries.
Path Handling
M3U paths can be:
| Path type | Example |
|---|---|
| Absolute | /Users/me/Music/song.mp3 |
| Relative | ../Music/song.mp3 |
| URL | http://server/song.mp3 |
For portable playlists: use relative paths from the playlist file's location. The playlist remains valid when moved with its referenced files.
For shared playlists with files on different machines: absolute paths or URLs. Each player has different rules for path resolution.
Common Issues
Special characters fail in M3U: not UTF-8 encoded. Use M3U8 with explicit UTF-8 encoding.
Player can't find files: relative paths from wrong base. Verify paths are correct relative to playlist location.
HLS playback stutters: bitrate too high or segments too small. Adjust -hls_time flag.
Mobile player rejects HLS: missing required tags. Verify #EXT-X-VERSION and #EXT-X-TARGETDURATION exist.
Music playlist works in VLC but not other players: encoding mismatch. Save as UTF-8 BOM-free.
Frequently Asked Questions
Should I use M3U or M3U8?
For new playlists: M3U8 (UTF-8 supports all characters). For legacy compatibility: M3U.
Can I create an HLS stream from a YouTube video?
Yes. Download via yt-dlp, then run FFmpeg HLS generation on the local file.
What about XSPF?
XSPF (XML Sharable Playlist Format) is XML-based playlist alternative. Less popular than M3U/M3U8.
Can M3U include images or video?
Yes. Path can reference any media type. Video players use M3U for video playlists.
How do I make Spotify playlist into M3U?
Use Soundiiz, TuneMyMusic, or similar third-party tools. They export Spotify metadata to M3U format with file paths or stream URLs.
Does YouTube have M3U URLs?
YouTube generates M3U8 (HLS) URLs internally for video streaming. They're not directly accessible but tools like yt-dlp can extract them.
Related Reading
Bottom Line
For M3U/M3U8 in 2026: M3U8 for music playlists with international characters, HLS M3U8 for video streaming. They share format syntax but serve different purposes. FFmpeg generates HLS streams from any video source. Our video compressor handles source preparation before HLS encoding.



