When you develop your own application or website for exchanging video and/or audio via WebRTC, you may choose to send streams to Flussonic to enrich your project with useful cutting edge features extending the basic protocol. You may find recommendations on embedding Flussonic's WebRTC capabilities to your app here. Below are the instructions on configuring Flussonic to accept WebRTC publications.
The publication is carried out via the WHIP standard. For more details about WebRTC, WHIP and WHEP, see Using WebRTC protocol.
On this page:
- Configure HTTPS. Most of the modern browsers allow video and audio publishing via WebRTC over a secure connection only.
- Do not close UDP ports. Flussonic does not have a fixed port range for WebRTC, i.e. the ports allocated by the OS are used. When closing UDP ports, you can accidentally close the ones that are being used. Consider not using any other software on the Flussonic server to safely allow UDP listening on all ports.
WebRTC publication settings in Flussonic
To accept WebRTC publication on the Flussonic server, just create a stream with
publish:// input in one of the following ways:
Use the following URL for the published stream in your client application:
See also Streaming API reference to learn how to compile the payload for this URL.
Having created a stream with
publish:// input, you can start publishing to it right away. No additional settings are strictly necessary, but you may need them to achieve certain objectives. Below are possible further settings of WebRTC publishing.
You can configure transcoding of the WebRTC published streams at options on the same Input tab. The following settings are available in the UI:
- Output audio codec is an audio transcoding option.
- Maximum and minimum bitrate are the basic settings for Adaptive publication over WebRTC.
Protecting your publication
To prevent anyone other than your users from publishing videos to the server, you can protect the publication in one of the following ways:
- Protect the publication with a password.
- Configure external authorization for the publication sessions.
Test publishing from your webcam
To make sure the settings are correct, you can try publishing from your webcam to the created stream. Just click Publish From Webcam on the Input tab in the stream profile and allow your browser to access your camera and microphone.
The webcam video preview window will be displayed under the button.
This publishing method is available for testing purposes only. End users usually do not have access to the Flussonic admin UI; they can publish videos through your application (website).
Publishing with adaptive bitrate
Publishing to Flussonic is performed at Adaptive Bit Rate (ABR) by default. This means that Flussonic helps the publication source adjust the bitrate to the bandwidth. Learn more at Adaptive publication over WebRTC.
Load balancing with WHIP publications
Since WHIP is based on HTTP POST requests, you can use our load balancer to distribute play requests between servers in a cluster. The balancer will redirect POST requests to servers in the cluster using the 307 HTTP redirect code.
WebRTC Player's publication options
If you use our WebRTC Player following the recommendations on developing the client application, you can flexibly configure the publications. You will find detailed instructions and examples in the readme. For example, you can configure it to perform:
- Audio podcasts through WebRTC. Just set
audio: truein the Publisher's
- Custom filters application via
canvas. The example of a webpage incorporating WebRTC Player also includes the use of
canvas. If you try the example, you will see that "sepia" filter is applied to the published video and "It's publishing to Flussonic!" text appears over it.