uv4l-server

NAME

uv4l-server – Streaming Server with Web front-end over HTTP/HTTPS

SYNOPSIS

uv4l [ uv4l-options ] [ –enable-server option ] [ –server-option ‘option=value’ [ … ] ]

DESCRIPTION

This is the Realtime Audio/Video Streaming Server with Web HTML front-end over HTTP or HTTPS protocols. See the ‘uv4l’ manual page for other details.

Basic options:

–port arg (=8080)
TCP/IP port number to which the server will be listening

–bind-host-address arg
bind the server socket to the specified host address (e.g. localhost)

HTTP/HTTPS Basic Authentication:

You can optionally require client authentication by specifying one password for the ‘user’ user and one password for the ‘admin’ user. Once authenticated, ‘admin’ is allowed to access all the pages on the server. ‘user’ is allowed to access all the pages on the server as well, but if both ‘admin’ and ‘user’ authentications are required, then only ‘admin’ is allowed to access the Control Panel page. Only the ‘config’ user is allowed to edit the configuration file specified by the ‘–editable-config-file’ option:

–user-password arg
require the client to provide the specified password for the ‘user’ username

–admin-password arg
require the client to provide the specified password for the ‘admin’ username

–config-password arg
require the client to provide the specified password for the ‘config” username

–md5-passwords [=arg(=md5)] (=clear)
any user password provided by the client will be hashed with MD5 and the resulting hex string will be considered for matching the corresponding user password specified in hashed form on the server

HTTPS options:

–use-ssl [=arg(=yes)] (=no)
enable and use SSL

–ssl-private-key-file arg
path to the private key file used for encryption. Can be empty if no private key file is used.

–ssl-certificate-file arg
path to the certificate file (in PEM format).
If the private key and the certificate are stored in the same file, this can be empty if the private key file is given.

WebRTC options:

–enable-webrtc [=arg(=yes)] (=yes)
attempts to load the WebRTC extension and enable it

–enable-webrtc-video [=arg(=yes)] (=yes)
enable video track

–enable-webrtc-audio [=arg(=yes)] (=yes)
attempt to use the default audio input device if present (i.e. microphone)

–enable-webrtc-datachannels [=arg(=yes)] (=yes)
enable webrtc datachannels

–webrtc-datachannel-label arg (=uv4l)
label of the data channel to be created

–webrtc-datachannel-socket arg (=/tmp/uv4l.socket)
path to the Unix Domain Socket (SOCK_SEQPACKET) used as IPC mechanism to relay incoming/outcoming data to/from a local third-party process

–webrtc-receive-video [=arg(=yes)] (=yes)
offer to receive the video track and render the stream onto a supported output device (e.g. HDMI display or touchscreen)

–webrtc-renderer-window arg (=0 0 480 352)
first video rendering window position and size <x y width height>. When the fullscreen option is on, this same window size will be stretched to fullscreen.

–webrtc-renderer-fullscreen [=arg(=yes)] (=yes)
stretch the specified renderer window to fullscreen

–webrtc-renderer-rotation arg (=0)
rotation of rendered from 0 to 359 degrees

–webrtc-renderer-opacity arg (=255)
rendering window opacity, from 0 to 255

–webrtc-renderer2-window arg (=480 0 320 240)
second video rendering window position and size <x y width height>

–webrtc-renderer3-window arg (=0 352 176 128)
third video rendering window position and size <x y width height>

–webrtc-receive-datachannels [=arg(=yes)] (=no)
enable and accept one webrtc datachannel offered by the remote peer

–webrtc-received-datachannel-socket arg (=/tmp/uv4l.socket)
path to the Unix Domain Socket (SOCK_SEQPACKET) used as IPC mechanism to relay incoming/outcoming data to/from a local third-party process

–webrtc-receive-audio [=arg(=yes)] (=yes)
offer to receive audio stream

–webrtc-received-audio-volume arg (=medium)
volume for received audio stream in the range of [0, 10]

–webrtc-prerenderer-smoothing [=arg(=yes)] (=yes)
enable prerenderer video smoothing effect

–webrtc-recdevice-index arg (=0)
index, starting from 0, of the audio recording device to use in the sequence given by the command ‘arecord –list-pcms’

–webrtc-vad [=arg(=yes)] (=yes)
enable Voice Activity Detection on audio input

–webrtc-echo-cancellation [=arg(=yes)] (=no)
enable echo cancellation

–webrtc-preferred-vcodec arg (=auto)
set preferred video codec 0 for auto, 1 for VP8, 2 for VP9

–webrtc-enable-hw-codec [=arg(=yes)] (=yes)
enable use of hardware codecs (if supported)

–webrtc-hw-vcodec-minbitrate (=256)
minimum bitrate used during adaptive streaming with video hardware codec, from 256 to 9000, in kbit/s referred to a base resolution of 1280×720 at 30fps. For different resolutions or frame rates, the specified value is multiplied by a factor given by the formula f=(width*height*fps)/(1280*720*30).

–webrtc-hw-vcodec-maxbitrate (=4000)
maximum bitrate during adaptive streaming with video hardware codec, from minimum specified bitrate to 9000, in kbit/s referred to a base resolution of 1280×720 at 30fps (see the minimum bitrate option for the correction factor).

–webrtc-hw-vcodec-startbitrate (=800)
start bitrate during adaptive streaming with video hardware codec, from minimum to maximum specified bitrates, in kbit/s referred to a base resolution of 1280×720 at 30fps (see the minimum bitrate option for the correction factor).

–webrtc-cpu-overuse-detection [=arg(=yes)] (=yes)
enable CPU overuse detection

–webrtc-combined-audiovideo-bwe [=arg(=yes)] (=no)
enable combined audio+video bandwidth estimation

–webrtc-stun-urls arg (=stun:stun.l.google.com:19302, stun:stun.ekiga.net)
list of STUN server URL’s to be used for the peer connection. To undefine them all pass one empty string.

–webrtc-stun-server [=arg(=yes)] (=no)
attempt to enable the internal STUN Server

–webrtc-ice-servers arg
array of RTCIceServer’s as single JSON string, e.g. (in one line)
[{“urls”: “stun:stun1.example.net”}, {“urls”: “turn:turn.example.org”, “username”: “user”,”credential”: “myPassword”}]

–webrtc-tcp-candidate-policy arg (=enabled)
TCP candidate policy: 0 disabled, 1 enabled

–webrtc-enable-dscp [=arg(=yes)] (=yes)
enable DSCP

–webrtc-ignore-loopback [=arg(=yes)] (=yes)
ignore loopback interface on host

XMPP options:

–xmpp-server arg
XMPP server hostname

–xmpp-port arg (=5222)
XMPP server port

–xmpp-muc-domain arg
MUC domain name

–xmpp-room arg
MUC room name

–xmpp-username arg
XMPP username

–xmpp-password arg
XMPP password

–xmpp-reconnect arg (=yes)
once the start command is given, keep trying to reconnect to the XMPP server every few seconds on failures or disconnections, until stop command

–xmpp-bosh-enable [=arg(=yes)] (=yes)
enable Bidirectional-streams Over Synchronous HTTP

–xmpp-bosh-tls [=arg(=yes)] (=yes)
use TLS connection (for HTTPS)

–xmpp-bosh-server arg
HTTP(S) server host

–xmpp-bosh-port arg (=443)
HTTP(S) server port

–xmpp-bosh-hostname arg
hostname of the BOSH connection manager.
Leave it empty or set it the same as BOSH server if you are in doubt.

–xmpp-bosh-path arg
path on the BOSH connection manager

–xmpp-bridge-host arg (=localhost)
host where xmpp-bridge is running

–xmpp-bridge-port arg (=7999)
port xmpp-bridge is listening on

Janus WebRTC Gateway options:

–janus-gateway-url arg
URL of the gateway in the form
scheme://username:password@subdomain.domain.tld:port (e.g. http://my.janus-gateway.org:8088)

–janus-gateway-root arg (=/janus)
root of the gateway

–janus-room arg
conferencing room number

–janus-room-pin arg
room pin

–janus-username arg
username in the conferencing room

–janus-token arg
authentication token

–janus-proxy-host arg
HTTP/HTTPS proxy host

–janus-proxy-port arg (=80)
port the proxy is listening on

–janus-proxy-username arg
username used for the authentication on the proxy

–janus-proxy-password arg
password used for the authentication on the proxy

–janus-proxy-bypass arg
a regular expression defining hosts for which the proxy should be bypassed. Can also be an empty string to disable proxy bypassing.

–janus-publish arg (=yes)
publish live audio & video to the video room

–janus-force-hw-vcodec [=arg(=no)] (=no)
try to force use of hardware codecs (if supported)

–janus-video-format arg (=1280×720 30fps)
preferred video resolution and framerate, if supported by the codec selected. Valid values are: 10 for 320×240-30fps, 20 for 352×288-30fps, 30 for 640×480-30fps, 40 for 960×720-30fps, 50 for 1024×768-30fps, 60 for 1280×720-30fps, 63 for 1280×720-60fps, 65 for 1280×768-15fps, 70 for 1280×768-30fps, 80 for 1280×960-30fps, 90 for 1600×768-30fps, 95 for 1640×1232-15fps, 97 for 1640×1232-30fps, 100 for 1920×1080-15fps, 105 for 1920×1080-30fps

–janus-subscribe arg (=no)
subscribe for live audio & video streams from other participants in the video room

–janus-reconnect arg (=yes)
once the start command is given, keep trying to reconnect to the Janus WebRTC Gateway server every few seconds on failures or disconnections, until the stop command is given

Fine-tuning options:

–connection-timeout arg (=15)
set the connection timeout in seconds for HTTP/HTTPS connections

–enable-keepalive [=arg(=yes)] (=yes)
maintain an active connection between client and server

–max-keepalive-requests arg (=0)
specify the maximum number of requests allowed during a persistent connection. 0 means unlimited.

–keepalive-timeout arg (=7)
set the connection timeout in seconds for HTTP/HTTPS connections

–max-queued-connections arg (=8)
set the maximum number of queued connections. Must be greater than 0. If there are already the maximum number of connections in the queue, new connections will be discarded.

–max-streams arg (=3)
specify the maximum number of allowed simultaneous video streams

–max-threads arg (=5)
set the maximum number of simultaneous threads used for handling incoming connections. It should be greater or equal to –max-streams.

–thread-idle-time arg (=10)
specify an idle time in seconds after which a thread is terminated

–chuncked-transfer-encoding arg [=arg(=yes)] (=no)
set chuncked transfer encoding during video stream over HTTP/HTTPS

Advanced options:

–frame-timeout arg (=5000)
set the timeout for a frame from the camera in ms. 0 for no timeout.

–frame-buffers arg (=auto)
number of frame buffers. Default value is optimal for a given –max-streams.

Options specific to the HTTP/HTTPS Server serving custom Web pages only:

–enable-www-server [=arg(=yes)] (=no)
attempt to enable the HTTP/HTTPS server serving custom web pages

–www-root-path arg (=/usr/share/uv4l/www/)
absolute path to the filesystem directory containing the custom web pages

–www-index-file arg (=index.html)
defines the file that will be used as an index

–www-port arg (=8888)
TCP/IP port number to which the server will be listening

–www-bind-host-address arg
bind the server socket to the specified host address (e.g. localhost, meaning that the server will only accept connections from localhost)

–www-password arg
require the client to provide the specified password for the ‘www’ username

–www-use-ssl [=arg(=yes)] (=no)
enable and use SSL

–www-ssl-private-key-file arg
path to the private key file used for encryption. Can be empty if no private key file is used.

–www-ssl-certificate-file arg
path to the certificate file (in PEM format). If the private key and the certificate are stored in the same file, this can be empty if the private key file is given.

–www-connection-timeout arg (=15)
set the connection timeout in seconds for HTTP/HTTPS connections

–www-enable-keepalive [=arg(=yes)] (=no)
maintain an active connection between client and server

–www-max-keepalive-requests arg (=0)
specify the maximum number of requests allowed during a persistent connection. 0 means unlimited.

–www-keepalive-timeout arg (=7)
set the connection timeout in seconds for HTTP/HTTPS connections

–www-max-queued-connections arg (=8)
set the maximum number of queued connections. Must be greater than 0. If there are already the maximum number of connections in the queue, new connections will be discarded.

–www-max-threads arg (=4)
set the maximum number of simultaneous threads used for handling incoming connections

–www-thread-idle-time arg (=10)

–www-set-etag-header [=arg(=yes)] (=yes)
hash files on the server with MD5 and set the result in the ETag header in the response to any HTTP/HTTPS GET request

–www-webrtc-signaling-path arg
enable the WebRTC signaling protocol over websocket under the specified URL path (e.g. /webrtc). This endpoint is only subjected to ‘user’ and/or ‘admin’ authorizations if enabled.

Other options:

–editable-config-file arg
path to an editable configuration file from within the server. –config-password user must be set. If the file does not exist, it will be created.

–enable-control-panel [=arg(=yes)] (=yes)
enable or disable access to the Camera Control Panel page

–server-config-file arg
path to the configuration file specifying server option values. Options specified via command line have higher priority.

–enable-rest-api [=arg(=yes)] (=yes) enable or disable the server RESTful API

EXAMPLES

To run the ‘raspicam’ driver with the streaming server enabled
on port 9000 and a password for the admin user (in one line):

uv4l --auto-video_nr --driver raspicam --encoding mjpeg --server-option '--port=9000' --server-option '--admin-password=myp4ssw0rd!'

If the WebRTC extension is installed, by default it is loaded
automatically when needed. audio is enabled by
default, to disable it from command line, type:

uv4l --auto-video_nr --driver raspicam --server-option '--enable-webrtc-audio=0'

SEE ALSO

uv4l(1)

BUGS

No known bugs.

AUTHOR

Luca Risolia <luca.risolia@linux-projects.org> http://linux-projects.org