OTT Navigator

Archive (catch-up) in playlists

How to declare the archive (catch-up, timeshift) of channels in an M3U playlist, and the same in OTC (archive_type, archive_days, archive_source). A marker like (since 1.7.1.3) is the first app version that reads an attribute.

Sample

#EXTM3U url-tvg="http://example.com/epg.xml.gz" catchup="flussonic" catchup-days="7"
#EXTINF:-1 tvg-id="news1",News One
http://example.com/news1/index.m3u8
#EXTINF:-1 tvg-id="sport1" catchup="default" catchup-days="3" catchup-source="http://example.com/sport1/archive.m3u8?start={utc}&end={utcend}",Sport One
http://example.com/sport1/index.m3u8
#EXTINF:-1 tvg-id="music1" catchup-enable="0",Music One (no archive)
http://example.com/music1/index.m3u8

Attributes

All of them can be set in the #EXTM3U header (for every channel) and in #EXTINF (for one channel; it wins over the header).

Which channels have an archive:

Users can override the archive type and the number of days in the provider’s properties.

Archive types

The archive address is built from the stream URL (or from catchup-source, when given) by the rule of the type. In the examples, {start} is the programme start, {now} the current time, {end} the end (unix time), {duration} its length in seconds.

Type What the app does
default Uses catchup-source with its variables filled in, nothing else. Without catchup-source it works like shift.
append Appends catchup-source to the stream URL, then fills in the variables.
shift Adds utc={start}&lutc={now} to the URL query.
archive Adds archive={start}&archive_end={end} to the URL query.
timeshift Adds timeshift={start}&timenow={now} to the URL query.
flussonic Picks flussonic-dash for .mpd URLs, flussonic-ts for .ts, flussonic-hls for the rest.
flussonic-hls /index.m3u8 becomes /archive-{start}-{duration}.m3u8, /video.m3u8 becomes /video-{start}-{duration}.m3u8, any other last part becomes timeshift_abs-{start}.m3u8.
flussonic-dash The last part of the path becomes archive-{start}-{duration}.mpd.
flussonic-ts, fs The last part of the path becomes timeshift_abs-{start}.ts.
xc Xtream Codes: http://host:port/live/user/pass/123.ts becomes http://host:port/streaming/timeshift.php?username=...&password=...&stream=123&start=YYYY-MM-DD:HH-MM&duration={duration in minutes}, with the login and password of the provider in the app.

Template variables

Variables are filled in in catchup-source, in stream URLs (live too), in seek_preview (where start and end are both the moment being previewed), and in OTC archive_source. Names are case-insensitive.

Variable Value
${start}, {utc} programme start, unix time
{start_iso} (since 1.7.1.3) programme start, UTC, 2024-12-31T23:59:59Z
${end}, {utcend} (since 1.6.9.3) programme end, unix time
{end_iso} (since 1.7.1.3) programme end, UTC, ISO form
${timestamp}, {current_utc} now, unix time
{now_iso} (since 1.7.1.3) now, UTC, ISO form
${offset} seconds from the programme start to now
${duration} programme length, seconds
${durmin} programme length, minutes
${start-year}, ${start-mon}, ${start-day}, ${start-hour}, ${start-min}, ${start-sec} (since 1.6.6.5) parts of the start: 2024, 01–12, 01–31, 00–23, 00–59, 00–59, in the device’s time zone
${end-year} … ${end-sec} (since 1.6.6.5) the same for the end
${token}, {key} the token set in the provider’s settings in the app
${login}, ${password} the login and password set in the provider’s settings in the app

Shifting the time

Offsets: a number with m (minutes), h (hours) or d (days), or a plain number of seconds: +90, -2h, 1d. Write seconds as a plain number, without a suffix.

catchup-source="http://example.com/archive/{utc:-5m}-{utcend:+5m}.m3u8?token=${token}"