What is the EXTINF tag?
#EXTINF is an extended M3U information tag. It belongs immediately before the URI of the media item it describes, so the tag and the following URI form a pair. A player reads the information after #EXTINF, then applies it to the next stream, file or HLS segment.
The general form is #EXTINF:<duration>,<title>. IPTV applications often place optional channel attributes between the duration and the comma. The playlist itself should start with #EXTM3U so a parser knows that extended tags are present.
#EXTM3U
#EXTINF:-1,Example News
https://stream.example.com/news/master.m3u8EXTINF syntax explained one part at a time
Every character around an EXTINF line has a job. A small formatting mistake can shift the display name, hide metadata or cause the next URL to be treated as an unrelated entry.
Keep the complete EXTINF directive on one line. Put the stream URI on the line directly beneath it. Blank lines and comments are tolerated by some players, but the adjacent two-line form is the most portable and easiest to validate.
- # begins a playlist directive rather than a media URL
- EXTINF identifies the directive as information about the next media item
- : separates the tag name from its duration value
- -1 is commonly used in IPTV lists when a live channel has no fixed duration
- Optional key="value" attributes describe the channel for compatible IPTV players
- The final comma separates the duration and attributes from the display title
- The next non-comment line is the media URI associated with this entry
A complete IPTV EXTINF example
This example uses the fields most often found in IPTV channel lists. The values are fictional, and the URL is deliberately an example domain.
#EXTM3U
#EXTINF:-1 tvg-id="example.news" tvg-name="Example News" tvg-logo="https://cdn.example.com/news.png" group-title="News",Example News HD
https://stream.example.com/news/master.m3u8The title after the final comma is normally what the viewer sees in the channel list. The attributes before it help a player match programme-guide data, display a logo and organise the entry. These IPTV attributes are widely used conventions layered on extended M3U; applications can interpret or ignore them differently.
What the common IPTV attributes mean
Use straight double quotes around attribute values, especially when a value contains spaces. Keep one consistent tvg-id scheme throughout the playlist and match it exactly to the ID used by the chosen EPG source. A valid EXTINF line cannot compensate for an incorrect guide ID or an inaccessible logo URL.
Many players also recognise vendor-specific fields, but adding more attributes does not automatically improve compatibility. Start with the smallest useful set and test the result in the applications you actually support.
- tvg-id: the identifier used to match a channel with an XMLTV or other EPG record
- tvg-name: an alternate channel name that some players use during guide matching
- tvg-logo: an absolute URL for the channel logo
- group-title: the folder or category in which the player should place the channel
What does -1 mean in an IPTV EXTINF line?
In IPTV-style extended M3U lists, -1 conventionally means that the item has no known fixed duration. That makes it a natural choice for a live channel. Some playlist producers use 0 instead, and player behaviour varies, so -1 is a compatibility convention rather than a promise about whether the referenced stream is live.
Do not copy that rule into an HLS media playlist. HLS assigns a different, protocol-defined meaning to EXTINF: its duration value describes the media segment that follows.
EXTINF in IPTV M3U versus HLS M3U8
An IPTV channel list uses one EXTINF entry for a channel or programme and may point to an HLS master playlist, another streaming protocol or a media file. Its -1 value and tvg attributes are conventions understood by many IPTV players.
An HLS media playlist uses #EXTINF:<duration>,[<title>] before each media-segment URI. RFC 8216 requires the duration to describe that segment in seconds. Decimal durations require HLS protocol version 3 or later, and current authoring guidance favours enough decimal precision to avoid accumulated timing error.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:5.984,
segment000.ts
#EXTINF:6.000,
segment001.tsThis HLS example is not a two-channel IPTV list. It is one media playlist containing consecutive pieces of a presentation. A master HLS playlist usually contains #EXT-X-STREAM-INF variant entries instead of EXTINF segment entries. Inspect the surrounding tags before deciding how to parse or repair a file.
Seven common EXTINF errors and how to fix them
If the syntax looks correct but playback still fails, test the media URI by itself. An EXTINF error affects how a playlist is parsed or displayed; it does not cause a remote server to restore an offline stream, accept an expired token, permit browser CORS access or provide a supported codec.
- Missing #EXTM3U header: add it as the first line of an extended M3U playlist
- Missing comma: insert the separator before the display title, even when the title is empty
- Curly or unmatched quotes: replace them with paired straight double quotes
- Metadata split across lines: keep the duration, attributes and display title on one EXTINF line
- Missing media URI: add one valid URI immediately after every EXTINF directive
- Wrong EPG ID: make tvg-id exactly match the identifier in the selected guide source
- HLS duration mismatch: calculate the real segment duration instead of using the IPTV value -1
A practical EXTINF validation checklist
Validate structure before testing hundreds of streams. This separates playlist-format problems from network and media failures, makes bulk cleanup safer and gives you a known-good sample for comparing player behaviour.
- Save the playlist as plain UTF-8 text
- Confirm that #EXTM3U is the first line
- Pair every #EXTINF line with exactly one following media URI
- Check the final comma and all double quotes on each metadata line
- Use absolute HTTPS URLs for remote logos and streams when available
- Verify a sample of tvg-id values against the actual EPG file
- Open the playlist in a second player to detect parser-specific behaviour
- For HLS, verify segment durations and protocol-version requirements separately
Frequently asked questions about EXTINF
Does every M3U entry need EXTINF? A basic M3U can contain only media URIs, but an extended M3U entry needs EXTINF when you want a title or associated metadata. In HLS media playlists, every media-segment URI must be preceded by EXTINF.
Can an EXTINF title contain commas? Player parsers differ because the final comma is the structural separator. For broad IPTV compatibility, keep the display title simple and test commas in the target player before publishing a large list.
Is EXTINF case-sensitive? HLS tag names are case-sensitive, so use the uppercase spelling #EXTINF. Uppercase also provides the safest compatibility in ordinary extended M3U playlists.
Why does a channel play without its logo or EPG? Playback comes from the media URI, while the logo and guide depend on separate metadata and external resources. Check tvg-logo reachability and the exact tvg-id match without changing a working stream URL.
Create or repair an EXTINF playlist
For a new channel list, the M3U Playlist Creator writes the #EXTM3U header and correctly paired #EXTINF entries from structured fields. For an existing file, use the playlist editor or cleaner to inspect names, groups, URLs and malformed entries while keeping a backup of the original.
Only add streams you are permitted to access. Treat playlist URLs containing usernames, passwords, signatures or access tokens as credentials and remove them before sharing an example or diagnostic screenshot.
Further reading
- Create an M3U playlist in the browser (opens in a new tab)
- Clean malformed M3U entries (opens in a new tab)
- IPTV metadata: tvg-id, tvg-logo and group-title (opens in a new tab)
- RFC 8216 section 4.3.2.1: EXTINF (opens in a new tab)
- Apple: live HLS playlist construction (opens in a new tab)
- IPTV-org: how playlist channel IDs match EPG records (opens in a new tab)