Anatomy of an IPTV EXTINF line
Attributes appear between #EXTINF:-1 and the final comma. The display name follows the comma, and the next line contains the stream URL. Keep each attribute quoted and on the same line for broad parser compatibility.
#EXTINF:-1 tvg-id="example.news" tvg-name="Example News" tvg-logo="https://cdn.example.com/logo.png" group-title="News",Example News HD
https://stream.example.com/news/master.m3u8tvg-id is the matching key
A player can use tvg-id to connect a playlist entry with a channel element in XMLTV guide data. Matching by a stable ID is less ambiguous than matching display names, which may contain HD labels, regional suffixes or punctuation differences.
Copy the identifier from the EPG source you actually use. Inventing a clean-looking ID will not produce programme data unless the same ID exists in that guide.
tvg-name and the display name serve different purposes
tvg-name may assist matching in players that support it. The text after the comma is what viewers normally see. You can keep a stable matching name in tvg-name while using a friendlier display name such as Example News HD, but test the target player because implementations differ.
Use logo URLs that remain available
- Prefer HTTPS so a secure player does not request insecure images
- Use a direct image URL rather than a page containing the image
- Choose a compact square or transparent asset that remains legible at small sizes
- Avoid short-lived signed URLs and hotlinks that forbid external embedding
- Treat a missing logo as cosmetic; it should never prevent playback
Keep group-title useful and predictable
Groups work best as a small, controlled vocabulary: News, Sports, Entertainment, Kids, Radio and similar categories. Differences such as Sport, Sports and SPORTS create separate folders in many players.
Pick one grouping dimension. Mixing country, language, genre and video quality in the same field produces a fragmented library. Store extra distinctions in the display name or maintain separate playlists when necessary.
A safe metadata-cleanup workflow
- Back up the original playlist
- Normalise whitespace and quoting without changing stream URLs
- Map known channel IDs against one chosen EPG source
- Consolidate duplicate group names
- Test a sample in the actual target player
- Export as UTF-8 and re-open the result before replacing the original