Difference between revisions of "Create HLS Broadcast"
(Новая страница: «To create HLS broadcast you must first create transport file and then (optionally) start one or more support nodes. Support nodes are not required for HLS broadc…») |
(No difference)
|
Revision as of 13:47, 27 April 2017
To create HLS broadcast you must first create transport file and then (optionally) start one or more support nodes.
Support nodes are not required for HLS broadcasts with direct access to original HLS server (both manfiest and chunks).
For other modes (when you hide manifest or chunks or both from clients) support servers are required.
Create transport file
To create transport file start engine with --create-hls-transport flag.
Available options:
- --url (mandatory, string): URL of HLS playlist (m3u8)
- --title (mandatory, string): Title of the broadcast
- --output-public (mandatory, string): Path of resulting public transport file
- --category: (mandatory, string, multiple): Category (several options add several categories). List of available categories is here
- --provider-key: (optional, string): Provider key (for statistics)
- --sid: (optional, string): Provider channel id (for statistics)
- --tracker: (optional, string, multiple): URL of the tracker (several options add several trackers)
- --hide-hls-manifest (optional, flag): Don't include HLS manifest URL in the public transport file
- --output-private (mandatory when --hide-hls-manifest is set, string): Path of resulting private transport file
Example:
/opt/acestream/start-engine --create-hls-transport --title "My broadcast" --url http://myserver.com/my_broadcast.m3u8 --output-public /data/public/my_broadcast.acelive --provider-key "my provider key" --sid "my-broadcast" --tracker "udp://tracker1.myserver.com:2710/announce" --tracker "udp://tracker2.myserver.com:2710/announce" --category informational
When you create transport file without --hide-hls-manifest option then HLS manifest URL is placed inside transport file and thus available to all clients. In this case you can distribute transport file event without special support nodes.
When you specify --hide-hls-manifest option engine outputs two transport files:
- public transport file which should be distributed to clients (it doesn't contain HLS manifest URL)
- private transport file (with HLS manifest URL) which should be used on your support nodes
In this case clients don't have direct access to HLS manifest and you must setup at least one support node.
Start support node
HLS support node is started with the same options as regular support node.
You must pass URL to transport file with --url option.
If you have created transport file with --hide-hls-manifest option then you should pass private transport file to support node.
Example:
/opt/acestream/start-engine --stream-support-node --url http://myserver.com/transport-files/my_broadcast_private.acelive --port 8641 --max-peers 25 --cache-dir /data/cache --pid-file-dir /data/pid --log-file /data/logs/node.log
There are some special flags for HLS broadcasts:
- --hide-hls-segments: don't send info about HLS segments (chunks) URLs over P2P. With this flag clients will never access original HLS server (neither manifest nor chunks).
- --hls-skip-metadata-broadcast: send info about HLS segments URLs to directly connected peers only and prevent sending this info into P2P pool. Use this flag if you want to limit number of clients who has direct access to your original HLS server.
- --hls-skip-data: don't download HLS segments (chunks) on the support node. If you set this flag then support node will handle only HLS manifest. Chunks should be downloaded from original HLS server.
Be careful: specifying both --hide-hls-segments and --hls-skip-data options at the same time makes no sense.