OpenVSX will create .ts media segments with a default duration of 10 seconds. To change this duration to a value of 5 seconds use--httplivechunk=5.0
The m3u8 playlist file and media segments are stored in <OPENVSX_HOME>/html/httplive/. You may want to change this path to allow another web server to serve HTTPLive content, or to use an in-memory file system. The following option changes the output directory to allow the Apache web server to serve the generated content --httplivedir=/usr/local/apache/htdocs/httplive
Both the m3u8 playlist file and media segments are named by using the file prefix out. To use a different file prefix such as myprefix add --httplivefileprefix=myprefix. This will create the files called myprefix.m3u8 and myprefix<index>.ts.
The m3u8 playlist assumes an HTTP client will load the media segments from the same directory as the playlist. To use a different URL to refer to the media segments use --httpliveurlhost=http://my-high-bandwidth-server/my-media-uri. The playlist file will then prefix each media segment with out<index>.ts file with this URL.
HTTPLive Adaptive Bitrate Streaming
OpenVSX is able to perform real-time media encoding to produce multiple parallel encoded outputs for the same input media stream.
This example will output three representations of the input media by transcoding the video portion to produce two lower bandwidth representations while also preserving the original encoded stream.
The first representation is the original video bypassing the transcoder. In this example the bitrate is 900Kb/s.
The second representation produces a video bitrate of 600Kb/s.
The third representation produces a video bitrate of 300Kb/s with a width of 320 pixels and the same aspect ratio.
The --httplivebw parameter is used to define a comma separated list of available stream bandwidths in the master m3u8 playlist. The bandwidth values should account for both audio, video, and MPEG-2 TS container encapsulation overhead of each individual stream.
Producing multiple stream outputs will create a master playlist called multi.m3u8 which will contain references to each stream specific <stream-index>out.m3u8 playlist file.
To view the live stream from an Apple device can connect a device to http://<OpenVSX IP>:8080/httplive
. This will load the master .m3u8 playlist containing references to each bitrate specific output.
To explicitly load a specific representation append index of the desired encoding output to the URL.
Load the original representation at 900Kb/s use the URL:
Load the third representation at 300Kb/s use the URL:
HTTPLive Capture Client
OpenVSX is able to capture live input from a remote HTTPLive capable publishing server. OpenVSX periodically reads an .m3u8 playlist file and then downloads the listed media container .ts segments just like an Apple iOS device such as an iPhone would. The captured input is re-assembled into a continuous live stream and can be re-distributed by OpenVSX.
The --delay= parameter is used to delay re-streaming by the given time in seconds. This should generally be as large as the HTTPLive chunk segment duration of the publishing HTTPLive server.
Since we're increasing the delay, we should also increase the video and audio frame queue sizes used to buffer the input data before processing outgoing content. This is done by specifying a larger than default --vidq= and --audq= sizes.