The command inserted into `runOnDemand` will start only when a client requests the path `ondemand`, therefore the file will start streaming only when requested.
Every time someone publishes a stream, the server will produce HLS segments, that can be served by a web server.
The example above makes the assumption that the incoming stream is encoded with H264 and AAC, since they are the only codecs supported by HLS; if the incoming stream is encoded with different codecs, it must be converted:
The command inserted into `runOnDemand` will start only when a client requests the path `ondemand`, therefore the file will start streaming only when requested.
### Redirect to another server
### Redirect to another server
To redirect to another server, use the `redirect` source:
To redirect to another server, use the `redirect` source: