When we started building WalisTV , a free M3U player for Android TV and Windows, we assumed M3U was a simple format. It is, until you open real playlists. This post shows what the format looks like, a small Dart parser, and the things that broke for us.
What an M3U playlist is
An M3U playlist is a plain text file. The extended version starts with #EXTM3U , then each entry is a metadata line ( #EXTINF ) followed by the stream URL:
#EXTM3U #EXTINF:-1 tvg-id="news1" tvg-logo="https://example.com/logo.png" group-title="News",News Channel 1 https://example.com/stream/news1.m3u8 #EXTINF:-1 group-title="Sport",Sport Channel 2 https://example.com/stream/sport2.m3u8
Enter fullscreen mode
Exit fullscreen mode
-1 is the duration. For live streams it is always -1 .
key="value" pairs ( tvg-id , tvg-logo , group-title ...) are not part of the original spec.…