Avid Seeker

Liberate your playlists: M3U standardization

Stop having platform-locked playlists. Liberate them.

I was looking for a way to view some of my friends’ playlists locally. Wouldn’t it be great if you can diff and version-control youtube playlists, compare them with each other, merge them, simply liberating them from being platform-locked by youtube?

This is a simple yt2m3u script I wrote for downloading playlists as plaintext:

 1yt2m3u
 2#!/bin/sh
 3yt-dlp \
 4	--convert-thumbnails jpg \
 5	--write-thumbnail -o "thumbnail:%(id)s.%(ext)s" \
 6	--no-download \
 7	--print-to-file "\
 8#EXTIMG:./.cover/%(id)s.jpg
 9#EXT-X-SESSION-DATA:%(original_url)s
10#EXTINF:-1,%(title)s
11" out.m3u -a -

If you don’t want to download thumbnails, simply

1yt2m3u() {
2	yt-dlp --print-to-file "\
3#EXT-X-SESSION-DATA:%(original_url)s
4#EXTINF:-1,%(title)s
5" out.m3u -a -

Extensibility

Discussion

M3U is old and there is no formal specification for it. Many extensions have been added by different vendors. It would be nice to rewrite it as a community-driven spec. And no, m3u is not dead, and there are still uses for it.

Here are some suggestions I can think of:

  1. Default Player Settings: Include options to specify default player settings such as shuffle, loop, position, playback speed, and volume.

  2. Track Ratings: Add an option to rate individual tracks, which could be used by the player to create custom playlists or suggestions.

  3. Conditional Play: Implement conditional play commands, such as playing certain tracks only if certain conditions are met (e.g., user preference, disable/enable some tracks).

  4. Segmented Tracks: Allow for the definition of track segments, enabling the player to skip or repeat specific parts of a track.

  5. Playback Notifications: Add hooks for playback notifications, enabling the player to trigger events or actions (e.g., visualizations, external scripts) at certain points in the playlist.

  6. Custom Tags: Introduce support for user-defined custom tags to allow for more flexible playlist management and integration with other software.

  7. Chapter Markers (#EXTM3A?): Enable chapter markers within tracks to allow users to navigate to specific sections of longer audio files, such as podcasts or audiobooks.

Discussions:

See also