IPTV M3U Playlist Format and Syntax

M3U is a plain-text structure. Understanding how the headers, tags, and URLs connect is essential for manual custom editing.

The Structure of an M3U Line

A standard entry has two parts: The directive line (`#EXTINF:-1 tvg-id="ID" group-title="Category",Channel Name`) and the URL line immediately following it.

EPG Metadata Parameters

EPG guides rely on tag keys inside the `#EXTINF` line, including tvg-id (EPG program ID), tvg-logo (channel icon), and group-title (category name).

Understanding the Duration Field

The value following the colon (e.g. -1 in #EXTINF:-1) defines the track duration. For live TV streams, this is set to -1 or 0 since live broadcasts have no fixed length.

Escaping Special Characters

Values containing commas or spaces (like category names) must be enclosed in double quotes. Do not use quotes in the channel name that follows the comma separator.

Frequently Asked Questions

What does the -1 in EXTINF mean?

It designates the duration. For live streams, -1 (or 0) signifies a live stream rather than a pre-recorded file.

Is spacing important in M3U syntax?

Yes. Attribute parameters must be separated by spaces, and there must be a comma before the channel name.

Interactive Tool Workspace