-->
为五月的纽约流媒体保留座位吧. Register Now!

回顾:Ant Media Server(企业版)

文章特色图片

这篇综述将强调 Ant Media Server and many of the features supported with the streaming server. Viewers will also learn how to configure the WebRTC streaming server on 亚马逊网络服务 and how to get up and running with delivering live streams and video-on-demand streams.

关于Ant Media Server(企业版)

The Ant Media Server is a streaming server designed to deliver and simplify live, 超低延迟一对多WebRTC流, 并支持视频点播.

There are two versions of Ant Media Server that users can install on their platforms. The first is a free Community Edition that includes RTMP, RTSP, MP4, HLS support, IP摄像头支持, 重流远程流的能力, 还有很多其他特点. The paid Enterprise Edition version adds support for VP8 and H.265, SRT ingest, CMAF, 360度直播和视频点播流, scaling, RTMP摄取到webrtc回放, 还有很多其他特点.

There are numerous methods for accessing Ant Media Server and running it in the cloud. The company works with numerous cloud providers to give users access to their streaming server. Ant Media Server在Azure上可用, 亚马逊网络服务, Google Cloud, Digital Ocean, OVH, Linode, 和阿里云. For testing in this review, I’ll be using 亚马逊网络服务 to host my Ant Media Server.

设置和配置

To get started with the Ant Media Server (Enterprise Edition), first you need to subscribe to it through the Amazon Marketplace. You’ll also need to subscribe to Amazon’s EC2 service.

Once you’ve subscribed to EC2, you can launch an instance of Ant Media Server on 亚马逊网络服务. You’ll do this by clicking the Continue to Subscribe button on the Ant Media Server (Enterprise Edition) subscription page in Amazon Marketplace. On the next page that appears, click Continue to Configuration.

Figure 1. Subscribing to Ant Media Server via 亚马逊网络服务

Select the latest version of the software under Software Version (In my case, I selected v2.6.2). 对于区域,请选择离您最近的区域. 然后,单击Continue to Launch.

选择从网站启动,然后选择C5.xlarge作为EC2实例类型(Figure 2). You can leave VPC Settings and Subnet Settings at the default.

Figure 2. 选择EC2实例类型和其他设置

Under Security Group Settings, click the button for Create New Based on Seller Settings. Add a name for your security group and provide a short description. All of the ports listed are necessary when using Ant Media Server.

Next, click the Create Key Pair in EC2 button, and give it a name (Figure 3). Once you add a name, click the Create Key Pair button. 该文件将被下载到您的计算机上. 把文件放在安全的地方.

Figure 3. 启动EC2实例

现在,返回到前面的Launch页面. Select the key pair you created and click the Launch button. Your new Ant Media Server instance should launch and be available shortly.

实例准备好使用之后, copy the Public IP from your EC2 instance and place it in your browser. 最后添加5080端口. 应该会出现Ant Media Server登录页面. Log in using JamesBond for the user and the EC2 instance ID for Ant Media Server as your password.

Figure 4. 登录Ant Media Server

安装SSL证书

You’ll need to perform some additional steps to install an SSL certificate for use with your Ant Media Server. First, connect to the EC2 Linux instance via an SSH client or the Terminal. Second, create a record for your domain in Route 53 to route traffic to your Ant Media Server instance IP address. Third, install your SSL certificate using the Terminal.

而不是把所有步骤都讲一遍, I refer you to the video AWS Marketplace Quick Start Guide – Ant Media, 你可以在go2sm上找到.com/antmedia. 从4分钟开始.

使用Ant Media Server

一旦在Ant Media Server上安装了SSL, you can log in using your domain and start using Ant Media Server.

Figure 5. 查看仪表板

您将在登录后立即看到Dashboard. 在Dashboard主页面上, 用户可以查看“系统信息”, Active Streams, 访问设置, Logs, 并访问“应用程序”部分.

发布和播放WebRTC流

With very little configuration, you can publish and play a WebRTC stream. First make sure your Ant Media Server is up and running, 你的电脑上有一个网络摄像头. Next, type the following URL into a web browser using your domain:

http://AMS_domain_name:5443/WebRTCAppEE

您的视频将出现一个窗口. Click the Start Publishing button on the page that appears (Figure 6).

Figure 6. 开始发布一个WebRTC流

The status will change to Publishing under your video. Once publishing starts, feedback on bitrate, packet loss and other items should appear. Click the Play with WebRTC button to play the stream (Figure 7). 播放将在新窗口中开始.

Figure 7. 点击Play with WebRTC

You can upload a video in Ant Media’s Dashboard Web UI. To do so, navigate to your application and select the Upload VoD tab. 接下来,单击Upload VoD按钮. 在打开的对话框中(Figure 8), click Choose File, browse to your video, and click Save. You can play the video in the Dashboard by clicking the player icon to the right of the video.

Figure 8. 为点播流媒体上传视频

Figure 9. 在Ant Media Server上创建实时流

First, copy the Publish URL for the new stream and paste it into a Word document or Note on your computer. You’ll find the Publish URL to the far right of the stream name in Dashboard.

发布URL的格式如下:

rtmp://AWSDomain.com / LiveApp / Rqp47G8mfs4HVTY1692333013499 

发布流

用于测试流, we’ll use Wirecast (although this process would work similarly in vMix or OBS or any comparable application). To begin, open Wirecast and navigate to the Output Settings dialog (Figure 10). 选择“添加”,选择“RTMP服务器”. 选择720p30 x264预设或其他H.264个你想要的预设. Now, copy the publish URL you saved earlier and paste it into the Address box of your encoding settings. Leave the entire string through LiveApp in the Address box and copy the Stream ID (the items with all the characters) into the Stream text box for Wirecast. Click OK.

Figure 10. 在Wirecast中发布直播流

Launch the stream by navigating to Output Start/Stop Broadcasting and choose the stream you created.

You can view the status of the live stream by navigating to the Live Streams section of your application (Figure 11). 流名称是“sample3”.”

Figure 11. 在Ant Media Server中查看流状态

To view the stream, you can format it like so for HLS:

http://AWSDomain.com:5443/LiveApp/streams/QqzK47D8mfs4HVQU1692333013500.m3u8

You should be able to paste this URL into Chrome, Safari, or other browsers to see it play. 我使用Chrome和Safari进行测试(Figure 12) and two third-party stream-test players from THEO (go2sm.com/theotest)和Bitmovin (go2sm . com).com/bitmovin).

Figure 12. 测试流

Live Transcoding  

Ant Media Server can also perform live transcoding of live streams on the server. Users can add their adaptive bitrates in the settings tab of their application (Figure 13).

Figure 13. 在Ant Media Server中配置实时转码

Once added, transcoding will be used on the live streams for that application.  When adding bitrates for transcoding, the options are limited. Users can only add resolution, video bitrate, audio bit rate, and frame rate.

Testing

下面是我测试Ant Media Server的方法. First, I was interested in determining how Ant Media Server could be used for streaming delivery in a university in a setting like The Ohio State University. There is often a need to deliver video 流媒体点播 and live streaming. Being able to provide adaptive streaming is also important to support on mobile devices, tablets, and computers. Lecture capture of live streaming for VOD playback is always important on college campuses, 俄亥俄州也不例外.

For this review, 我测试了直播, 播放的WebRTC, 流媒体点播, 在web浏览器中播放流的本地视频, 使用第三方播放器播放流, 以及自适应流的转码.

Closing Thoughts

For VOD streaming with Ant Media, uploading videos was easy and straightforward. However, users can upload only one video at a time using the Dashboard Web UI. It would be great to be able to perform bulk uploads as well. For video uploads, I was able to upload only MP4 files. I received an error message when I attempted to upload WebM files. 这个问题是2的一个小错误.6.2 version I tested; Ant Media tells me they have fixed the bug in v2.6.3.

Once videos are uploaded, users can easily play videos from Web UI within Ant Media Server. One limitation I discovered with VOD streaming is I could stream only single-data rate streams. It would be great to be able to deliver VOD adaptive streams.

The live streaming features are more developed with Ant Media Server as adaptive streaming is possible with live streaming, and live transcoding of live streams is also available. Additionally, the ability to create streams on the server and publish them with a live encoder works reliably.

WebRTC publishing and playback was easy to perform and doesn’t require a lot of setup for users. 使用WebRTC的用户将会欣赏这一点. WebRTC streams worked great in all browsers tested.

Playing videos in third-party players with Ant Media Server streams is also possible, 但这需要更多的工作. It was easy to play WebRTC streams in Web browsers without third-party players. Third-party players worked great for me using HLS, but I couldn’t get my DASH streams to play. It’s likely that I could have had a setting wrong that impacted playback.

I didn’t notice an option for including captions with Ant Media Server streams. 在大学环境中, this is an important need to ensure that all video content is accessible for all viewers. Having an option to include captions from third-party vendors within the Dashboard would be helpful.

I also tested setting up an autoscaling cluster with Ant Media Server Scaling Solution with AWS CloudFormation. The autoscaling cluster allows users to create a cluster that scales up and down based on the current streaming need. The autoscaling cluster includes a Mongo database, a load balancer, an origin, and an edge group.

After some initial setup challenges with AWS Certificate Manager, I succeeded in configuring the Ant Media Server Scaling Solution with AWS CloudFormation. Being able to create a cluster is a promising feature as it saves users a significant amount of time by creating all the items in the cluster in a matter of minutes. It also easily removes all elements in the cluster as well. 

Here are two YouTube video tutorials that will help you with configuring the autoscaling cluster:

  • Setting up an Ant Media Server Scaling Solution with CloudFormation In 5 minutes: go2sm.com/scaling setup
  • Using the Amazon Certificate Manager to Issue an SSL Certification: go2sm.com/ssl

我最后的想法, I do appreciate Ant Media Server having a Dashboard that makes setup easy, although it would be nice to have a restart button in the Dashboard. This would help tremendously with configuration changes when a server restart is required.

Streaming Covers
Free
合资格订户
Subscribe Now Current Issue Past Issues
Related Articles

回顾:ViCueSoft CodecWar

CodecWar is an analysis service created by ViCueSoft, the developer of codec analy­sis tools VQ Analyzer, VQ DVK, and VQ Probe. 当前配置, the site's ideal users are researchers who are looking for a convenient way to compare codecs using relevant datasets and codec developers who are looking for a structured way to benchmark their codecs against others. In contrast, it's not a particularly convenient way for streaming producers to run experiments to optimise their encoding parameters, 虽然它可以发展成这样.

提及的公司及供应商