1. Creation of a template for HLS output
Open the WEB UI of transcoder http://IP_address and login (the defaults login/pass are admin/2bechanged). Then go to the “Templates” menu item on the left side. If you don’t have any suitable template for your stream you can download the reference cloud templates by pressing “Get Reference Cloud Templates” and select any templates you need. You can create your own template as well.
Here is an example how to create a template. Click “Add New Template”
You will see “Add template” page (Pic.1)
Enter the template name you want and select the “Codec” for output stream (H264 is recommended). You may write some text in the “Description” field as well. Then you need to setup “Resolution” and “Bitrate” for your first stream. It is recommended set in the “Stream 1” smallest “Resolution” and “Bitrate”. In “FPS” field in most cases you should set the same FPS value as in the input source stream.
Optimization can take one of three values: best speed, balanced, best quality. For most cases it is enough to set “best speed”. If you set “best quality”, then the performance decreases and you will be able to setup smaller number of input channels.
For other parameters if you don’t understand them well you can leave the default values:
Codec profile – base
Codec level – 3
Rate control – CBR
Slice count – 0
GOP length – 100
B-frames count – 0
IDR interval – 0
Reference frames number – 1
NAL HRD Conformance – Enabled
HRD Buffer Length – 0
HRD Initial Delay – 0
Look Ahead – Disabled
Look Ahead Depth – 0
Aspect Ratio – static pixel aspect ratio from first source IDR
Deinterlace Algorithm - BOB
Deinterlace – Enabled
Hardware acceleration – Enabled
If you want to have a multibitrate stream you can click “Add new stream” and fill values in the fields for the next stream. You should create so many streams, how many bitrates at the HLS output you want to have. Every next stream we recommend create with more big numbers of “Resolution” and “Bitrate”, other values can be the same.
Click “Save” when you finish with the template creation.
2. Creating of an audio template
Go to the “Audio templates” menu item on a WEB UI. If you don’t have any suitable template for your stream you can create it here. We recommend the following parameters for most cases (Pic.2):
Codec – AACPlus
SampleRate – 48000/44100
Bitrate – 64
Use of non-supported values in audio template can lead to the fact that the channel won't be able to start.
3. Set the default multicast interface
Go to the “Setting” menu item on the WEB UI. You will see the table with all network interfaces which are have connected status (Pic.3).
Input multicast interface – it is interface where you receive your input source stream.
To change an interface settings click “edit (pencil icon)” in front of the interface you want to edit.
Set the checkbox “Default multicast input interface” if you will going to receive input stream on the interface (Pic.4)
Click “Save and reboot”. The device will not reboot if you didn’t change any IP parameters.
4. Setup a channel (input)
Go to the “Channels” menu item and click “Add New Channel”.
Enter the channel name. For UDP multicast input you should select from “Source protocol” drop down list “udp TS stream”. Enter “Source address” and “Source port” for the input multicast group. If you are receiving the multicast group not at the interface which is “default multicast interface” you should set the IP address of ingress interface of the encoder before the address of the multicast group via colon (for example 172.20.10.144:188.8.131.52).
When you have set the source address and port you should click here to get all services and tracks. Wait for a few seconds and if there are no any error messages you will see the message “Analyze Completed”. Now you can click “Service ID (SID)” drop down list to see all services which transcoder found in the input stream (Pic.5).
Active services should have the status “on the air”. In case of MPTS you will see several services and you should choose one of them. If your source is SPTS you can choose the SID of the service or leave “auto”.
If you have selected some Service ID you will be able to choose the PIDs in the Video PID and Audio PID fields. You can leave everywhere “auto” if your source is SPTS and has one Video and Audio tracks.
Data track allows you to forward subtitles and teletext to your output. If you want to do that, you should choose subtitles and/or teletext PIDs from the dropdown list. To be able to do that, exact value of Service ID should be selected earlier.
If you don’t have any Data tracks in your input stream you should set “Data track” field to “Disabled”.
You don’t need to setup “SDI mode” filed in case of UDP input.
Set“Interlace mode” value to “auto”.
You have an option to setup a backup source for the channel if you have any backup sources for the channel.
When you click “Backup” checkbox you will see additional input fields for the backup source. You should fill all the fields by the same way as for the main source. Encoder will migrate to backup source if main one will not be available during 10 seconds and will stay on backup while it is working. To migrate back to the main you should stop the backup source or restart the channel.
“Audio Gain” value allows you to increase or decrease the gain level if you want.
“Video Cropping” allows you to crop the picture for several pixels from all the sides. To setup cropping you should write 4 numbers in the field via space left right top bottom. The values set number of pixels to crop from the corresponding side. First value (left) cannot be zero. You can setup crop by one number as well, then that number of pixels will crop from all the sides.
Click “Add”. Your channel setup is completed.
5. Setup HLS output stream
Go to the “Output streams” menu item and then click “Add New Output Stream”.
Start mode – set auto if you want to start output automatically when the corresponding channel (on the “Channels” page) starts
Channel – select your channel from the drop down list
Template – choose a template you have created for HLS output
Audio template – select an audio template
Format- choose HLS version you need or select HLSv2 if you don’t understand distinctions of versions
Encryption key provider, Key providerURL, Key request interval (minutes), DRM content ID – these parameters are optional and used for the content encryption
Segment length – length of one chunk (one .ts file) in seconds, recommended value is calculating as GOPLength*2/FPS, for example, if GOP length in the template 100 and FPS 25, then recommended value is 8.
Output URL – in case of HLS you can just write some name (channel name). The full output URL will be create by combination of the parameter OutputDir from the configuration file state.dat and that name (Pic. 6) Another option is set full URL here, for example http://WebDav_server_name/channel_name. When you set full URL with http:// prefix, then the parameter OutputDir from the configuration file state.dat will be ignored.
6. Starting the channel and checking the output
On the “Channels” page click the start icon. After a few seconds if all is correct the state of channel should be “started” Pic.7.
Now you can play the output stream in any player with HLS support (VLC, ffplay, Android MX Player, Apple Safari and other).
WEB UI has its own embedded player, which is working for HLS outputs only. Go to “Outputs stream” page and click on Output URL