
Video Streaming
Viinex video management middleware allows you to stream video using the following protocols: WebRTC, HLS and RTSP. You can see examples of live and archive video streaming on our demo for developers.
WebRTC
Viinex released its WebRTC server in February 2019 after devoting significant resources to its development. The WebRTC server is a proprietary technology stack created by our development team using no existing streaming libraries or frameworks. Similarly, all other video streaming servers, including RTSP and HLS video streaming, is developed in-house.
From a technical standpoint, WebRTC is a set of protocols and standards combined for interoperability, including DTLS for algorithm and encryption key selection, STUN and ICE for connection setup, SDP for media session description, and SRTP for secure media streaming. For more information on WebRTC, please visit webrtc.org.
- DTLS – Datagram Transport Layer Security – RFC 7983
- STUN – Session Traversal Utilities for NAT – RFC 8489
- ICE – Interactive Connectivity Establishment – RFC 8445
- SDP – Session Description Protocol – RFC 4566
- SRTP – Secure Real-time Transport Protocol – RFC 6904
Most of these protocols need to be combined with each other to deliver a video stream in a browser. Fortunately, Viinex seamlessly and automatically handles these combinations, making the process seamless and unnoticeable for software utilizing Viinex. In addition to being commonly used and supported by most browsers, WebRTC offers several advantages when used in video surveillance systems:
1. Low latency. WebRTC protocol, which is widely used in video conferencing, can also be used in video surveillance systems for applications that require real-time secure monitoring or manual remote control of PTZ cameras by an operator. For instance, when using the WebRTC server in Viinex, the delay between video registration with a USB camera and its display in a browser is about 230 ms, while for IP cameras it is typically between 300 to 400 ms, which accounts for the time needed to encode the video onboard the IP camera.
2. Peer-to-Peer (P2P). WebRTC can minimize expenses on incoming and outgoing traffic through a central server by supporting P2P video streaming between servers and clients. However, in a standard approach, WebRTC signaling is still required, which Viinex solves with its Web Application Messaging Protocol (WAMP) support. For more information on using WAMP, please refer to the Viinex blog. Thus, with zero network settings needed on the edge for WebRTC signaling, event messaging, and remote managing of the middleware through its exposed HTTP API, media can be controlled and streamed directly from a Viinex WebRTC server installed on the edge to a client’s browser, bypassing the central server. Viinex includes a STUN server and supports TURN server for video streaming as well.
3. Security. WebRTC provides secure video streaming since it uses DTLS for handshaking and SRTP for video streaming, both of which are standardized protocols for security in streaming media.
For more information on using WebRTC in video surveillance, please refer to our blog.
HLS
Viinex has supported HLS streaming since 2016. HLS stands for HTTP Live Streaming, a protocol developed by Apple and released in 2009, later becoming an RFC 8216 document. As the name suggests, HTTP is the transport protocol used for video delivery in HLS, making it a reliable choice for streaming over the internet, even when dealing with NAT, firewalls, and port traffic limits on the client side. HLS is widely used and supported by most media players, browsers, and mobile devices.
Viinex supports HLS streaming for both live video and video archives without the need for transcoding, only wrapping incoming encoded live video or recorded video into MPEG TS format for further delivery. Viinex functions as a standard web server, receiving requests from users and delivering all necessary components for playback. The video is divided into chunks and an index file is created (M3U8 playlist) based on the HLS specification for consecutive playback. In live video streaming mode, M3U8 contains only links to recent chunks, while in video archive streaming mode, M3U8 contains links to all chunks.
HLS playback is supported natively in Apple Safari and Microsoft Edge browsers, while Google Chrome and Mozilla Firefox require the use of Media Streaming Extensions (MSE) to play HLS video streams using ready-made players like hls.js. Viinex ensures security through a well-documented perimeter with a single open HTTP port per instance and authentication for all API calls. Viinex does not implement TLS itself but can be wrapped by a reverse proxy that implements TLS on the frontend of an application. Viinex also supports a shared resource policy for different sources (CORS).
For more information on using HLS in video surveillance, refer to the Viinex blog.
RTSP
RTSP, created in 1998, has become a de facto standard in video surveillance and is supported by every IP video camera manufacturer on the market. As part of the ONVIF standard, RTSP allows for real-time-controlled multimedia data delivery on request, including both real-time data streams and recorded video. Real Time Streaming Protocol (RFC 2326) is an application-level protocol that allows real-time, controlled multimedia data delivery on request. This protocol supports both real-time data streams and previously recorded video, and provides delivery management tools such as starting and stopping streaming, starting from a certain time point, changing multimedia streaming speed (e.g., 2x, 8x), and more. In addition, RTSP allows for choosing a delivery channel such as UDP, multicast UDP, and TCP, as well as a delivery mechanism based on RTP (RFC 1889).
Viinex offers both an RTSP client and server. Viinex’s RTSP server supports RTP with UDP unicast, multicast, and TCP transport, and also supports digest authentication, making it a useful RTSP proxy for different video sources. Viinex’s RTSP client is compatible with its own RTSP server, allowing for video streaming from one Viinex instance to other instances, which can distribute this data using HLS or WebRTC protocols.