Creating an HLS Stream

From the local streams in EMS, issue the createHLSStream command:

Single Stream

General Format:

createHLSStream localstreamnames=<localstreamname> targetFolder=<target_folder_path> groupname=<groupname>
  • For Windows:
createHLSStream localstreamnames=myStream targetfolder=C:\EvoStream\evo-webroot groupname=myHLSGroup
  • For Linux:
createHLSStream localstreamnames=myStream targetfolder=/var/evo-webroot groupname=myHLSGroup

The created files will automatically save in the targetFolder path.

evo-webroot:                           --> targetfolder
myHLSGroup                             --> groupname
- myStream                             --> localstreamname
-- segmentfile_1.ts                    --> segment_file
-- segmentfile_2.ts                    --> segment_file
-- segmentfile_X.ts                    --> segment_file
-- playlist.m3u8                       --> childplaylist_file
- playlist.m3u8                        --> masterplaylist_file

Multiple Stream

To use multiple localStreamNames using one createHLSStream command do the following:

General Format:

createHLSStream localstreamnames=<localstreamname1>,<localstreamname2>,<localstreamnameX> targetFolder=<target_folder_path> groupname=<groupname>
  • For Windows:
createHLSStream localstreamnames=myStream1,myStream2 targetfolder=C:\EvoStream\evo-webroot groupname=myHLSGroup
  • For Linux:
createHLSStream localstreamnames=myStream1,myStream2 targetfolder=/var/evo-webroot groupname=myHLSGroup

The created files will automatically save in the targetFolder path.

evo-webroot:                           --> targetfolder
myHLSGroup                             --> groupname
- myStream1                            --> localstreamname_1
-- segmentfile_1.ts                    --> segment_file
-- segmentfile_2.ts                    --> segment_file
-- segmentfile_X.ts                    --> segment_file
-- playlist.m3u8                       --> childplaylist_file_1
- myStream2                            --> localstreamname_2
-- segmentfile_1.ts                    --> segment_file
-- segmentfile_2.ts                    --> segment_file
-- segmentfile_X.ts                    --> segment_file
-- playlist.m3u8                       --> childplaylist_file_2
- playlist.m3u8                        --> masterplaylist_file

Playing an HLS Playlist File

The corresponding link to use on Safari or other players to play this stream would then be:

General Format:

http://<EMS_IP_Address:<Web_Server_Port>/<HLS_groupname>/<Subfolder>/<playlist_filename>

Sample URL:

  • Single Stream:
http://192.168.2.34:8888/myHLSGroup/playlist.m3u8
  • Multiple Stream:
http://192.168.2.34:8888/myHLSGroup/myStream1/playlist.m3u8
http://192.168.2.34:8888/myHLSGroup/myStream2/playlist.m3u8
http://192.168.2.34:8888/myHLSGroup/myStream3/playlist.m3u8

The player will now automatically play the stream once the HLS playlist is loaded.

Please see createHLSStream API for more details.