Skip to content

URL Parameters

Torbjörn Einarson edited this page Apr 19, 2024 · 14 revisions

Parameters implemented in livesim1 and livesim2

The following table should include all URL parameters in either livesim1 or livesim2

Parameter Values Description livesim2 livesim1
tsbd int TimeShiftBufferDepth in seconds Yes Yes
segtimeline 1 (=true) Generate live MPD using SegmentTimeline with $Time$ Yes Yes
ato float or "inf" availabilityTimeOffset in seconds (inf = infinity, all segments available) Yes Yes
chunkdur float Chunk duration for on-the-fly chunking Yes Yes
ltgt int Low-latency target in milliseconds Yes No
timesubsstpp string List of comma-separated languages with auto-generated stpp subtitles Yes No
timesubswvtt string List of comma-separated languages with auto-generated wvtt subtitles Yes No
timesubsdur int > 0 Cue duration of generated time subtitles in ms (default 900) Yes No
timesubsreg 0 or 1 Region 0 (bottom) or 1 (top) for time subtitles Yes No
start or ast int >= 0 Sets the availabilityStartTime relative to Epoch Yes Yes
stop int > 0 Sets the stop time (for time-limited events) Yes Yes
startrel int Sets relative startTime via Location with start parameter Yes Yes
stoprel int Sets relative stopTime via Location with stop parameter Yes Yes
dur int Sets a presentation duration for multiple periods No Yes
timeoffset int Sets time offset in second vs NTP No Yes
init int > 0 Offset time for early init segment availability No Yes
mup int MinimumUpdatePeriod in seconds Yes Yes
modulo int > 0 Make this number of time-limited sessions every hour No Yes
tfdt 1 (=true) Use 32-bit tfdt (needs more recent availabilityStartTime) No Yes
cont 1 (=true) Continuous update of MPD AST and segNr No Yes
periods int > 0 Make this number of periods per hour Yes Yes
xlink int > 0 Make this number of xlink periods per hour No Yes
etp int > 0 Make this number of early terminated periods per hour No Yes
etpDuration int > 0 Add early terminated period duration for multiple periods No Yes
insertad 1 (=true) Insert an ad via xlink No Yes
continuous 1 (=true) Insert period continuity signaling (only valid when periods is set) Yes Yes
segtimelinenr 1 (=true) Generate live MPD using SegmentTimeline with $Number$ Yes Yes
baseurl url string Add this top-level BaseURL in all configurations No Yes
statuscode string Periodic status code responses to segment requests Yes No
traffic string Periodic traffic problems using one or more BaseURLs Yes No
peroff int > 0 Period offset in seconds No Yes
scte35 int > 0 Add these many SCTE-35 splice insert periods every minute Yes Yes
utc string hyphen-separated list of UTCTiming methods and make into list Yes Yes
snr int Set startNumber in MPD. -1 translates to no value in MPD (fallback to default = 1) Yes Yes
spd int > 0 suggestedPresentationDelay in seconds Yes Yes
sidx 1 (=true) Insert sidx box in every segment No Yes
patch int > 0 Insert PatchLocation element in the URL Yes No

scte35 parameter

By using the scte35_x URL parameter, emsg boxes with SCTE-35 messages will be inserted 1, 2, or 3 times a minute.

x dur starts
1 20s hh:mm:10
2 10s hh:mm:10, hh:mm:40
3 10s hh:mm:10, h:mm:36:h:mm:46

The SCTE-35 emsg boxes are included in the segment that includes the media time which is 7s before the start of the SCTE-35 break.

The emsg box uses the schemeIdUri "urn:scte:scte35:2013:bin" and should follow SCTE-214-1 2022. This means that emsg version 1 is used, and the timescale of the emsgbox is the same as the media timescale. The emsg payload is a binary SCTE-35 splice_insert message with PTS time based on splice time module MPEG-2 TS wrap-around.

Query-string time specification

There are a few query-string parameters that can be used to specify the wall-clock time that livesim2 uses to generate a response. In this way, it is possible to get the response corresponding to a request at a specific time in the past or in the future.

The parameters are

parameter value meaning
nowMs int Time since epoch start 1970-01-01 in milliseconds
nowDate ISO 8601 timestamp A UTC time specified (will be converted to nowMS as milliseconds + 1)
publishTime ISO 8601 timestamp similar to nowDate, but used to fetch an MPD with a certain publishTime

With these timestamps, one can for example ask for a segment at a specific time and see it it is available:

livesim2/asset/video/2323322.cmfv?nowMS=1713528527000.

It also applies to MPD Patch where one can ask for a patch relative a publishTime with a nowDate 18s later.

/patch/.../Manifest.mpp?publishTime=2024-04-16T07:34:38Z&nowDate=2024-04-16T07:34:56Z"

This request will generate the same MPD patch document totally independent of the current wall-clock time.

Note.In general, it should be possible to use an RFC-3339 timestamp instead of an ISO 8601 timestamp.