-
Notifications
You must be signed in to change notification settings - Fork 636
Publish with RTMP & Play with WebRTC
Attention: We have migrated our documentation to our new platform, Ant Media Resources. Please follow this link for the latest and up-to-date documentation.
NOTE: We have updated our documentation. This page is outdated. You can access updated version from the sidebar menu.
Developers can make their app users broadcast live video not only from their browser with WebRTC, but also from OBS, thanks to WebRTC Adapter. Let’s start with introducing OBS which stands for Open Broadcaster Software. OBS is a free open source software for video recording and live streaming. You can use either your PC’s embedded camera or externally connected one as a video source with OBS. Sound sources also can be configured with it. Ant Media Server Enterprise is fully compatible with OBS.
Let’s have a look at step by step how to use OBS for streaming:
Download via its official web page. It has Windows, Mac, and Linux releases.
RTMP stream from OBS for WebRTC replay
By default, OBS starts to capture from your embedded camera if exists after initialized. You can add or remove video/audio source from Sources section, such as an image can be broadcasted as a video source or external microphone can be added as an audio source.
Contact with us from contact form in order to try Ant Media Server Enterprise Edition. Extract the Ant Media Server Enterprise zip file and start the server with start.sh command in the terminal. For detailed information please follow steps described in the Getting Started.
cd /path/to/ant-media-server
./start.sh
After that, you need to create a live stream on Ant Media Server Enterprise Management console. You can reach it at http://<server-address>:5080
address, then click WebRTCAppEE
from Applications section and New Live Stream
. The server creates a live stream with an unique ID with the format of rtmp://<server-address>/WebRTCAppEE/325859929809451108600212
. You can copy this url with clicking clipboard icon.
Ant Media Server Dashboard
You need to write live stream parameters to OBS in order to start broadcasting. Click Settings
then select Stream
tab. Split the rtmp://<server-address>/WebRTCAppEE/325859929809451108600212
url and and write url and stream key parameters as described in the below image. Make sure that Stream ID should be written to Stream Key field, not to the url.
OBS (Open Broadcaster Software) Stream Configuration
If you want to decrease latency as well, you can tune
encoder for zerolatency
in encoder settings.
Close settings window and just click the Start Streaming
button in the main window of OBS. You can watch WebRTC stream from either Ant Media Management console or other platforms such as VLC player with same RTMP URL.
To Play with WebRTC, go to http://<server-address>:5080/WebRTCAppEE/player.html
and enter the stream key parameter and click "Start Playing" button.
You can also play on Ant Media Management console which plays via HLS at about 8-10 seconds latency. A dialog will be displayed where you can watch the live stream.
In order to reduce latency in RTMP streaming, please follow the instructions here
We hope this tutorial will be helpful for you 🙂 please feel free in case you have any question, just send an email (contact at antmedia.io) or contact with us from contact page.
- Introduction
- Quick Start
- Installation
- Publishing Live Streams
- Playing Live Streams
- Conference Call
- Peer to Peer Call
- Adaptive Bitrate(Multi-Bitrate) Streaming
- Data Channel
- Video on Demand Streaming
- Simulcasting to Social Media Channels
- Clustering & Scaling
- Monitor Ant Media Servers with Apache Kafka and Grafana
- WebRTC SDKs
- Security
- Integration with your Project
- Advanced
- WebRTC Load Testing
- TURN Servers
- AWS Wavelength Deployment
- Multi-Tenancy Support
- Monitor Ant Media Server with Datadog
- Clustering in Alibaba
- Playlist
- Kubernetes
- Time based One Time Password
- Kubernetes Autoscaling
- Kubernetes Ingress
- How to Install Ant Media Server on EKS
- Release Tests
- Spaceport Volumetric Video
- WebRTC Viewers Info
- Webhook Authentication for Publishing Streams
- Recording Streams
- How to Update Ant Media Server with Cloudformation
- How to Install Ant Media Server on GKE
- Ant Media Server on Docker Swarm
- Developer Quick Start
- Recording HLS, MP4 and how to recover
- Re-streaming update
- Git Branching
- UML Diagrams