Stream Recorder SDK (.Net)
Version 1.0.17
|
HTTP Live Streaming (HLS) is an HTTP-based media streaming protocol implemented by Apple Inc. HLS recorder cuts the TS stream into a sequence of small files, so the player could download one short chunk of a transport stream when it is required. A list of available streams (manifest) can be accessed by client as M3U playlist.
So, the stream recorder does two main tasks:
When recording is started, the stream recorder sets a PLAYLIST-TYPE as EVENT, indicating live recording. Upon stop, the playlist is finalized - PLAYLIST-TYPE is set to VOD.
Usage:
Optional Configuration
Set ManifestByteRange property to true in order to include byteRange information into manifest.
Set SplitSegmentOnHlsDiscontinuity property to true in order to split the recorded segment when discontinuity detected.
Set CreateMasterManifest property to true in order to generate master manifest together with I Frame manifest.
Once this set, Recorder will generate video manifest, master manifest and I frame manifest.
You can get the Master manifest and IFrame manifest names using MasterManifestName and IFrameManifestName properties.
There are 2 related properties
During recorder Init phase, if CopyOutputLocation is not empty, recorder will try to create the remote directory Empty segments will not be copied. Files with the same name will be overwritten Files are not copied in parallel, to insure that the large TS segment is present at the remote location before the manifest is updated. Recorder will not work property if the time it takes to copy a segment exceeds the segment duration. On stop command, recorder will try to copy the files for 2000 ms. Stop will block for that time. If recorder process is terminated with files still in the queue, they will not be copied to the remote and can be found at the local directory. IFrame manifest stays in the local directory during the recording even when DeleteOriginalAfterCopy is set to true. It is removed on stop.
Detection mechanism:
In last two cases it does not detect discontinuity and consequently, does not split the files.
In TS recording mode, if CopyOutputLocation is not empty, recorder will try to copy recorded ts segments upon SegmentCompleted event.
In HLS recording mode, if CopyOutputLocation is not empty, recorder will try to copy recorded ts segments upon SegmentInfo event and manifests upon MasterManifestUptated, ManifestUpdated, IFrameManifestUpdated and ManifestFinalized respectively.