EXTINF

Gives the duration of the next media segment in seconds, with an optional human-readable title.

Media segment tagAny protocol versionIn: Media playlistRFC 8216, section 4.3.2.1

Syntax

#EXTINF:<duration>,[<title>]

What EXTINF means

EXTINF gives the duration of one media segment, in seconds. A segment is one of the short files a stream is cut into. The tag applies only to the next segment, and every segment must have one.

The format is #EXTINF:<duration>,[<title>]:

duration
A decimal number such as 6.006, or a whole number such as 6.
title
Optional text after the comma, meant for people. Players do not need it, and most HLS playlists leave it empty.

The comma is part of the format, so a line with no title still ends in a comma: #EXTINF:6.006,.

Where it goes

Media playlists only, once per segment, among the tags directly above the segment's URI line. Other segment tags, such as EXT-X-BYTERANGE, can sit between it and the URI. Adding up every EXTINF value gives the duration of the whole playlist.

Rules from RFC 8216

Section 4.3.2.1 and the related sections set these rules:

Common mistakes

How players treat it

Players use EXTINF values to build the timeline and the seek bar, and to work out which segment holds a given time before they download it. Once a segment arrives, the timestamps inside the media decide exactly when each frame plays. Players generally ignore the title.

Example

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:6.006,
https://example.gov/council/seg0.ts
#EXTINF:6.006,Opening remarks
https://example.gov/council/seg1.ts
#EXTINF:2.002,
https://example.gov/council/seg2.ts
#EXT-X-ENDLIST

Each EXTINF gives the length of the segment on the line after it; the second one also carries an optional title.

How m3u8.cloud handles it

m3u8.cloud adds up the EXTINF durations to show the length of the video. When you trim, it uses them to work out which pieces (segments) your start and end times fall in, so only those pieces are downloaded.

The m3u8 inspector lists every piece with its duration.

Check the tags in any playlist

Open the m3u8 inspector