Playing WebRTC and RTMP video streams via HLS
HTTP Live Streaming (HLS) is a stream video technology designed by Apple to play video via the HTTP protocol. An HLS video stream is encoded in H.264 and AAC and played on any compatible device, browser or player such as iOS Safari, Firefox, Mobile Chrome, Quicktime, VLC, and so on.
Web Call Server converts video received from other sources such as webcams, professional video capturing devices, SIP PBX to the HLS video. For example, you can send a video stream from the Chrome browser on an Android smartphone using the WebRTC technology and deliver this video stream via HLS.
The key advantage of HLS is its versatility. Multiple devices starting from smartphones to TV-sets provide support for HLS. A video stream is delivered to the device using the ordinbary HTTP protocol just like any other bit of Internet traffic.
Playback technology and codecs
HLS video stream playback from RTMP, RTMFP, WebRTC, SIP
Web Call Server receives video traffic from various sources and converts it to HLS. Therefore, traffic converts in these four directions: WebRTC-HLS, RTMP-HLS, RTMFP-HLS, SIP-HLS.
Step-by-step diagram of WebRTC video stream playback on an HLS compatible device
- The browser initiates sending of a video stream using the publishStream method
- Connection is established to the WCS server and the traffic is sent via the WebRTC technology
- An HLS device or player connects to the server and fetches the video stream.
- The WCS server converts the WebRTC video stream to HLS and returns it to the device for playback.
Example broadcasting of a WebRTC video stream from the Google Chrome browser to HLS to play on iPhone Safari
First, we send the video stream from the Chrome browser. For that, the browser connects to the server and sends the video from the webcam to the server via the WebRTC technology.
Then, if we open the page in iOS Safari, we can see the HLS player playing this video stream. When you click the ‘Play’ button, Safari plays the video fullscreen.
For more information on this test, please refer to the Testing section.
Download Web Call Server 5
System requirements: Linux x86_64, 1 core CPU, 1 Gb RAM, Java
- wget https://flashphoner.com/download-wcs5-server.tar.gz
- Unpack and install using 'install.sh'
- Launch server using command 'service webcallserver start'
- Open the web interface https://host:8888 and activate your license
If you are using Amazon EC2, you don't need to download anything.