Skip to content

Latest commit

 

History

History
139 lines (114 loc) · 5.04 KB

demo.asciidoc

File metadata and controls

139 lines (114 loc) · 5.04 KB

demo(1)

NAME

demo - run media delivery demo

SYNOPSIS

demo [<options>] streams
demo [<options>] [<stream1> [<stream2>…​]]

DESCRIPTION

demo is a helper script used to operate media delivery demo.

demo streams prints streams available in the demo for streaming. Copy one of the stream names and supply it as an input to the client. You can add your own content to the demo placing it in the /opt/data/content folder (using docker mount host folder with -v option).

demo <stream1> [<stream2>…​] will trigger the default demo mode. Demo will start both nginx server and client(s) under container. This is the simplest demo mode since it does not require any interaction from the host other than to start or stop a container. Clients could use ffmpeg commands to get HLS stream and save it on the disk.

Running just demo will trigger the interactive demo mode. Nginx server will be started, but it will be awaiting for the incoming client requests. You need to start client somewhere, for example on a host. To start the client on a host, supply stream names given by demo streams. To start the client on some other system other than host, substitute localhost in the stream name with the host IP address.

Example clients:

   vlc http://localhost:8080/vod/avc/WAR_TRAILER_HiQ_10_withAudio/index.m3u8

or capturing via ffmpeg:

   ffmpeg -i http://localhost:8080/vod/avc/WAR_TRAILER_HiQ_10_withAudio/index.m3u8 -c copy /tmp/output.mkv

-<n> option is useful for demo purposes. With this option, the demo pretends to have <n> copies of each input stream. Execute demo -4 streams to see the difference.

If demo script is run under tty, it will provide monitoring data to track:

To check whether demo is alive, you can use demo-alive script which is available as a health check command under docker.

PROTOCOLS/CODECS

Currently, only HLS streaming protocol is supported for both CDN and Edge demos. Under CDN demo, the AVC and HEVC codecs are supported, while Edge demo only supports AVC. Invoking the specific protocol/codec can be accomplished with HTTP link formatting. The following HTTP link format is used:

http://<ip>:<port>/<type>/<stream>/<playlist>.<protocol-extension>
HLS/AVC

AVC streaming with HLS protocol can be started as follows:
<type>=vod/avc
<protocol-extension>=m3u8
Example:
\http://localhost:8080/vod/avc/WAR_TRAILER_HiQ_10_withAudio/index.m3u8

HLS/HEVC

HEVC streaming with HLS protocol can be started as follows (CDN demo only):
<type>=vod/hevc
<protocol-extension>=m3u8
Example:
\http://localhost:8080/vod/hevc/WAR_TRAILER_HiQ_10_withAudio/index.m3u8

HLS/AVC-ENCTOOLS

AVC streaming using EncTools quality boost with HLS protocol can be started as follows (CDN demo only):
<type>=vod/avc-enctools
<protocol-extension>=m3u8
Example:
\http://localhost:8080/vod/avc-enctools/WAR_TRAILER_HiQ_10_withAudio/index.m3u8

HLS/HEVC-ENCTOOLS

HEVC streaming EncTools quality boost with HLS protocol can be started as follows (CDN demo only):
<type>=vod/hevc-enctools
<protocol-extension>=m3u8
Example:
\http://localhost:8080/vod/hevc-enctools/WAR_TRAILER_HiQ_10_withAudio/index.m3u8

NETWORK PORTS

8080

Port used by nginx server to expose HLS streams. You might wish to publish this port out of docker container to be able to connect external clients to get HLS server. Use -p 8080:8080 option for docker run.

1234

Port used by simple socat server capable to execute incoming bash scripts. Nginx uses this server to schedule transcoding tasks for the incoming HLS requests. For this demo this is internal port and there is no need to publish it out of container. However, in real deployments you will likely wish to scale the sample and move socat server (or some other server with the same purpose) to a separate container (which likely will run on a separate GPU-capable machine). In such a case you will eventually need to publish the port.

OPTIONS

--help

Print help

--exit

Exit from the demo once all streams are completed on the client side. This option requires default demo mode.

-<n>

Pretend to have <n> additional copies of each input stream (n ⇐ 50)

ENVIRONMENT VARIABLES

DEVICE

GPU device to run the demo on. Default device is /dev/dri/renderD128. Can be overwritten by externally setting the environment variable.