ZEC Adding HLS Streams
5 min
this screen enables zec to receive an hls stream the hls stream is not protected by the zixi protocol there are two options for pulling the stream single source (adaptive bitrate) the stream can be an adaptive bitrate stream in this case, zec will pull the main playlist to adapt between bitrates according to network conditions multiple sources it is possible to pull multiple input streams with static individual bitrates in this case, zec will automatically create a separate input for each bitrate to add an hls stream in the zec navigation menu, click the inputs tab in the menu bar, click +new input the add a new input stream window is displayed enter the unique stream id note this must be identical (case sensitive) to the stream name configured in the sending zixi broadcaster or mediaconnect select the maximum concurrent connections to this stream from the max outputs drop down list default unlimited select the show in matrix check box to display this stream in the matrix (see zec using the matrix docid\ ofxethpsuo9eimqpwfzea ) default selected select the log this stream checkbox if you would like to generate event logs for this input select the analyze checkbox if you would like to enable stream analysis for the input select hls for the input stream specify the stream parameters (see the input stream parameters table docid\ tsp xjnanauk5jnwnlc1l below) if you want to enable encryption , select this checkbox (see input stream parameters table docid\ tsp xjnanauk5jnwnlc1l ) for more information, see zec encrypting an input stream docid\ qern0zffbaztl vrw4rn if you want to configure the recording parameters , specify them in the respective fields (see input stream parameters table docid\ tsp xjnanauk5jnwnlc1l ) click ok the “input added” message appears on the top of the screen the hls stream from the source is added to the zec and now appears in the list of streams available in the zec inputs ui if the "multiple sources" option was select, zec will automatically create a separate input for each bitrate input stream parameters table parameter description stream parameters master playlist url specify the url of the hls stream's master playlist download type specify whether the variants will be pulled from a single source (adaptive bitrate) or multiple sources (pull all bitrates) buffering time \[ms] specify a buffer time to time packets according to the stream's clock this is useful when there are bursts in the rate at which the stream arrives this feature creates a queue in the buffer, allowing smoother entry into the broadcaster the buffer time parameter defines the size of the buffer in milliseconds a larger buffer enables smoother entry; however, it may influence the latency rate inject scte35 on cue marks select this checkbox to inject scte markers into the adaptive stream manifest scte 35 markers found in the source input will be used to segment the stream, and the #ext x cue in/#ext x cue out tags will be added to the manifest remove old scte35 remove any existing scte 35 messages from the input, so that they don't get passed to the output inject scte35 one segment in advance to accommodate various scte pre rolls/timing variances, this allows the scte marker to be injected in the prior segment scte35 pid previously, broadcaster has used pid 32 to place scte data on this option allows you to override the default and specify the pid if set to auto , broadcaster will match the incoming pid for scte data, and if there is none, use pid 32 scte35 mpu mpu is a specific upid type that packages multiple identifiers or program labels into a single unit so downstream systems can associate cues in the hls stream with several related programs or assets the value is a 4 letter ascii string such as adfr or nflx dependent on the format the downstream receiver will be getting support ext x daterange ext x daterange is a way of providing timed metadata in an hls manifest it is used to define date range metadata in a media playlist a possible use case is defining timed metadata for interstitial regions, such as advertisements, but it can be used to define any timed metadata needed by your stream select this checkbox to enable this feature start from last segment select this checkbox to begin downloading from the last segment in the playlist by selecting this mode, you may lose the previous data in the playlist (i e , the chunks before the last chunk will not be downloaded); however, you will enjoy lower latency zixi broadcaster select this checkbox if you are pulling the hls from a zixi broadcaster this will add a parameter in the request to pull the stream so that the origin zixi broadcaster can identify the puller and show a single output in the outputs table if you don't select this option, the origin zixi broadcaster will display a different output for each downloaded segment use http parameters for substreams if your master url has http parameters (e g , http //server com/main m3u8?user=someuser\&password=somepass\&etc= http //server com/main m3u8?user=someuser\&password=somepass\&etc= ), the parameters will be propagated as subplaylists and chunks for example, the master playlist will have a subplaylist sub playlist1 m3u8 in this case, the request for this playlist will be http //server com/sub playlist1 m3u8?user=someuser\&password=somepass\&etc= http //server com/sub playlist1 m3u8?user=someuser\&password=somepass\&etc= remux hls to mpeg ts select this checkbox to convert the hls to an mpeg ts transport stream, and then, in the target bitrate field, specify the cbr bitrate to target for the padded stream (pad) or a re multiplexed stream (remultiplex) enable encryption select this checkbox to encrypt the input stream the stream encryption prevents any further processing, such as analysis, transcoding, etc the encryption works in the following way if the stream has been encrypted at the source the stream will remain encrypted regardless of the output type zec can only encrypt the stream after it has been decrypted if the stream is being encrypted by the zec it will be encrypted only if the output is a zixi pull or zixi push output all other outputs will send out an unencrypted stream for more information, see zec encrypting an input stream docid\ qern0zffbaztl vrw4rn encryption type (for encryption enabled) specify the type of encryption (aes 128/192/256) encryption key (for encryption enabled) click generate to generate an encryption key the generated encryption key must be sent to the end user to decipher the received encoded stream recording parameters select this checkbox to customize the recording parameters destination type select the radio button for the desired storage type and then fill in the relevant parameters record to disk – the recording is saved on the local disk it is possible to record to an external destination by replacing the default storage location with a symbolic link to learn more, see using an external storage docid\ z2amp6 fj7crckkfqrthq section record to s3 – the file is saved to your aws s3 bucket the mechanism uses aws multipart upload amazon advises to define a lifetime rule for objects on destination bucket record to disk parameters file name template specify the file name pattern that zixi will use to generate when saving the recorded content a separate file will be generated for each recording up to the time specified in the max recorded file duration parameter (see above) after this duration, a new file will be generated the file name pattern can include any string and up to five variables listed below only the %t=hh mm ss creation time is mandatory you can change the order of these variables and add text as long as you maintain the legitimate structure of the file in linux and windows %s=stream id optional %y=year optional %m=month optional %d=day optional %t=hh mm ss creation time mandatory %u=yyyymmddthhmmssz utc timestamp optional for example, the following pattern %y recording%t ts will generate the following file name 2017 recording15 32 35 ts max recorded file duration \[hh\ mm] specify the maximum time allotted for recording a video stream default 2 hours keep recorded files for \[hh\ mm] specify the maximum time for storing the recording default 0 hours custom path optionally specify a storage location for the recorded files that is relative to the root folder this location bypasses the location specified as the root folder in the settings > general screen record to s3 parameters file name template specify the file name pattern that zixi will use to generate when saving the recorded content a separate file will be generated for each recording up to the time specified in the max recorded file duration parameter (see above) after this duration, a new file will be generated the file name pattern can include any string and up to five variables listed below only the %t=hh mm ss creation time is mandatory you can change the order of these variables and add text as long as you maintain the legitimate structure of the file in linux and windows %s=stream id optional %y=year optional %m=month optional %d=day optional %t=hh mm ss creation time mandatory %u=yyyymmddthhmmssz utc timestamp optional for example, the following pattern %y recording%t ts will generate the following file name 2017 recording15 32 35 ts max recorded file duration \[hh\ mm] specify the maximum time allotted for recording a video stream default 2 hours url specify the url of the s3 bucket ignore tls certificate errors tls certificate for s3 bucket might be detected as faulty if bucket name contains dot\[s] when this option is selected, zixi broadcaster will ignore the tls certificate errors and transmit the stream to its destination access key the access key that is used for accessing the s3 bucket secret key the secret key that is used for accessing the s3 bucket advanced mode the fields discussed below are optional and available only in advanced mode to enter advanced mode add the url parameter ?advanced=1 to the zec url in your browser and press enter/return to reload the page note the advanced mode settings are generally intended for advanced users and special cases if you do not understand the settings, you should probably accept the default values general latency offset \[ms] the subsection on latency offset below support scte 35 injection allows insertion of scte 35 messages, typically used to define pre rolls and ad breaks scte 35 pid (also available in basic mode) allows specifying a pid for scte 35 insertion (or you can leave it as auto) remove old scte 35 packets (also available in basic mode) if you are inserting your own scte 35 messages, it's a good idea to remove existing ones that might conflict, unless you know what the existing scte 35 is and that it is needed timeout for cbr for cbr streams, scte 35 insertions should ideally be on null packets this setting tells the broadcaster to wait for a specified period for a null packet for vbr streams, set the value to zero, as there is no need to look for a null packet remux hls to mpeg ts checking this box tells the broadcaster to not take the segments as is and concatenate them, but to demultiplex the original transport stream, build frames out of them (video/audio), then multiplex them as a new transport stream this is useful if the original transport stream inside the hls can't be used for example, if it has a discontinuity in every segment, or if the stream is vbr and needs to be delivered as cbr stream parameters target pmt pid target pcr pid target video pid target audio pid maximal dts pcr delta refers to the maximum allowable difference between the decoding time stamp (dts) and the program clock reference (pcr) in an mpeg 2 transport stream (ts) this delta is crucial for maintaining synchronization between the encoder and decoder, ensuring smooth playback without buffering issues or timing errors default 1500 ms max pcr interval