This is the multi-page printable view of this section. Click here to print.
how-to
1 - Looping channels
The simplest channel to set up is a looping channel.
Such a channel has a fixed schedule and the programs of that channel are presented over and over again and will never stop.
A looping channel can be setup via the
REST API, but it can
also be setup using a configuration file as examplified in the
Startup configuration.
Such channels have the doLoop
attribute set, and will run until
they are stopped. One can set the startTimeS
parameter to tell when
the first media should be “generated”, but there is no end time.
The default value startTime == 0
means that the channel will have
segments with a time relative to the start of the UNIX epoch
1970-01-01T00:00:00Z.
2 - Dynamic Channels
A flexible FAST channel has a schedule that is not fixed and looped, but has a limited window in the past and future. This can for example, be two hours back in time and 10 hours into the future.
To achieve such a “sliding window” of programs, the schedule needs to be updated by adding new entries and removing old ones. At the same time, the timeline needs to be continuous, and the generated DASH and HLS manifests must be consistent over time when it comes to discontinuities and period times.
A schedule update is done by posting a complete new schedule via the REST API to “/api/v1/schedule/{channel}”.
Removing old assets from the schedule
When removing old assets, it is important to keep a long enough window of old assets so that the sliding window for players is still available. This may be the last two hours or something similar.
To keep a consistent state when removing assets from the schedule, use the following two parameters:
- GopNrAtScheduleStart - the GoP number at which the schedule starts
- GopNrAfterLastAd - the GoP number right after the last ad before the schedule start
These should be updated like follows when one or more entries are dropped from the start of a schedule:
- GopNrAtSchedulStart should increase by the number of GoPs dropped
- GoPNrAfterLastAd should increase if an ad has been dropped
The source code in the Github repo edgeware/v2l-example-scheduler provides a simple example service that updates the schedule by adding and removing random entries and ads.
3 - Test Output
The ew-vod2cbm
service is targeted to provide a live stream
to the ESB3002 repackager, but for testing purposes it is also
possible to get media output that can be played directly with media players.
The supported output formats are HLS and DASH.
The media segments are in CMAF/fMP4 format with subtitles in
stpp/imsc1
format.
Direct HLS streams
A channel ch
can be reached as an HLS live asset using the URL
/ch/index.m3u8
The HLS playlist have SCTE-35 markers at the start and end of ad periods.
Direct DASH playback (new in v0.8)
A channel ch
can be reached as a DASH live asset using the URL
/ch/manifest.mpd
The DASH format is the simple SegmentTemplate with $Number$ format and does currently (v0.8) not include any SCTE-35 markers.
View as combined VoD
It is also possible to view a channel as an VoD asset by adding an extra
vod=1
query string to the URLs. This provides an HLS VoD playlist or
DASH static MPD. In both cases each subtitle track is provided as
a single big WebVTT file including all the subtitle cues.
Subtitle time track
To investigate timing and stitching of segments, it is possible to
enable an extra generated subtitle track for all channels. This is
done using the command line option -timesubs
.