antmedia支持社区版和商业版。已经在AWS上线。
官方文档:https://antmedia.io/docs/
AWS文档: https://aws.amazon.com/marketplace/pp/prodview-464ritgzkzod6?sr=0-1&ref_=beagle&applicationId=AWSMPContessa 优势:auto-scaling。
Scalable, Ultra Low Latency & Adaptive WebRTC Streaming
Real-time streaming engine delivers content with sub-0.5secs latency. Ant Media Server supports WebRTC, CMAF, HLS, RTMP, RTSP, SRT, Zixi and more for your needs.
Ant Media Server is a real-time streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and can run on-premise or on-cloud.
Antmedia支持全新的部署模式:Self-Hosted Licenses (Get a license and run wherever you want)。
Monthly License ($99, Per Instance Per Month)
Enterprise Edition including
Monthly Subscription
No Connection Limit (in/out)
Adaptive Bit Rate
Flex Scalability Charging
SDKs included
Standard Support
Free Software Upgrade
30 Days Free Trial (可以先试用30天,https://antmedia.io/monthly/?aero-add-to-checkout=47606)
key-features
1. Load Balancer: LB is the entrance point for the publishers and players. Load Balancer accepts the requests from publishers or players and forwards the requests to the available node in the cluster.
2. Origin Auto-Scalable Group: Nodes(Instances) in the origin group accept the publish requests and ingest the incoming WebRTC stream. When an origin instance accepts a WebRTC stream, it saves the related information to the MongoDB Database Server.
3. There may be one node or multiple nodes in the origin group. It may even be manually or auto-scalable. In our deployment, it’s auto-scalable in AWS.
4. Edge Auto-Scalable Group: Node(Instances) in the edge group accepts the play requests. Then it learns from MongoDB which origin node has the related stream. After that, it gets the stream from the related origin node and sends the stream to the player.
5. MongoDB Database Server: Ant Media Server uses MongoDB in clustering. Streams information is saved to MongoDB so that edge instances can learn any stream’s origin node.
player是基于video.js开发的。https://github.com/ant-media/videojs-webrtc-plugin
使用场景:obs推srt流,拉流webrtc.
https://antmedia.io/webrtc-samples/srt-publish-webrtc-play/
下载一个标准obs推srt流:srt://test.antmedia.io:4200?streamid=WebRTCAppEE/streamId_M57nLNZXJ
https://AMS_domain_name:5443/WebRTCAppEE/play.html?name=streamId_M57nLNZXJ
也可以用ffmpeg来推srt流:https://antmedia.io/docs/guides/publish-live-stream/srt/
# ffmpeg -re -i xxxx.mp4 -vcodec libx264 -profile:v baseline -g 60 -acodec aac -f mpegts srt://ant.media.server.address:4200?streamid=WebRTCAppEE/streamId_M57nLNZXJ
Publish Stream to
srt://test.antmedia.io:4200?streamid=WebRTCAppEE/streamId_VCrftGCs5
web browser打开: https://antmedia.io/webrtc-samples/srt-publish-webrtc-play/
获得你的推流地址 like srt://test.antmedia.io:4200?streamid=WebRTCAppEE/streamId_
现场用官方obs推流后,你就可以看到webrtc流了。
docker部署测试ant media-server(only support ubuntu22.04¢os8)
$ docker pull ubuntu/apache2
$ docker run --net=host --name antmedia-v1 -v /data/stallman/:/mnt --privileged=true -tid ubuntu/apache2:2.4-22.04_beta bash
# apt update && apt -y install vim curl wget
wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh
./install_ant-media-server.sh -l 'your-license-key'
2023-10-23 07:33:54,532 [main] org.red5.server.tomcat.TomcatLoader - Server root: /usr/local/antmedia
2023-10-23 07:33:54,533 [main] org.red5.server.tomcat.TomcatLoader - Config root: /usr/local/antmedia/conf
2023-10-23 07:33:54,556 [main] org.red5.server.tomcat.TomcatLoader - Application root: /usr/local/antmedia/webapps
antmedia目前还不支持svc-simucast特性,估计还在等标准完善吧,特别是推流侧软件支持。