流媒体

Streaming Media on Facebook Streaming Media on Twitter Streaming Media on LinkedIn
 

回顾:Ant Media Server(企业版)

这篇综述将强调 Ant Media Server 以及流媒体服务器支持的许多功能. 观众还将学习如何配置webbrtc流媒体服务器 亚马逊网络服务 以及如何启动并运行直播流和视频点播流.

这篇综述将强调 Ant Media Server 以及流媒体服务器支持的许多功能. 观众还将学习如何配置webbrtc流媒体服务器 亚马逊网络服务 以及如何启动并运行直播流和视频点播流.

关于Ant Media Server(企业版)

Ant Media Server是一个流媒体服务器,旨在提供和简化直播, 超低延迟一对多WebRTC流, 并支持视频点播.

用户可以在自己的平台上安装两个版本的Ant Media Server. 第一个是包含RTMP的免费社区版, RTSP, MP4, HLS支持, IP摄像头支持, 重流远程流的能力, 还有很多其他特点. 付费的企业版增加了对VP8和H的支持.265, SRT摄取, CMAF, 360度直播和视频点播流, 扩展, RTMP摄取到webrtc回放, 还有很多其他特点.

有许多方法可以访问Ant Media Server并在云中运行它. The company works with numerous cloud providers to give users access to their streaming server. Ant Media Server在Azure上可用, 亚马逊网络服务, 谷歌云, 数字海洋, OVH, Linode, 和阿里云. 为了在本文中进行测试,我将使用亚马逊网络服务来托管我的Ant Media Server.

设置和配置

开始使用Ant Media Server(企业版), 首先,你需要通过亚马逊市场订阅它. 您还需要订阅Amazon的EC2服务.

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 订阅 button on the Ant Media Server (Enterprise Edition) subscription page in Amazon Marketplace. 在出现的下一页中,单击Continue to Configuration.

图1. 通过亚马逊网络服务订阅Ant Media Server

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

选择从网站启动,然后选择C5.xlarge作为EC2实例类型(图2). “VPC设置”和“子网设置”保持默认值.

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

在“安全组设置”下,单击“基于卖方设置创建新”按钮. 为安全组添加名称并提供简短描述. 在使用Ant Media Server时,列出的所有端口都是必需的.

接下来,单击在EC2中创建密钥对按钮,并为其命名(图3). 添加名称后,单击Create Key Pair按钮. 该文件将被下载到您的计算机上. 把文件放在安全的地方.

图3. 启动EC2实例

现在,返回到前面的Launch页面. 选择您创建的密钥对并单击Launch按钮. 您的新Ant Media Server实例应该很快就会启动并可用.

实例准备好使用之后, 从EC2实例复制公共IP并将其放置在浏览器中. 最后添加5080端口. 应该会出现Ant Media Server登录页面. Log in using JamesBond for the user and the EC2 instance ID for Ant Media Server as your password.

图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. 首先,通过SSH客户端或终端连接到EC2 Linux实例. 第二个, create a record for your domain in Route 53 to route traffic to your Ant Media Server instance IP address. 第三,使用终端安装SSL证书.

而不是把所有步骤都讲一遍, 我建议您参考视频AWS市场快速入门指南- Ant Media, 你可以在go2sm上找到.com/antmedia. 从4分钟开始.

使用Ant Media Server

一旦在Ant Media Server上安装了SSL, 您可以使用您的域登录并开始使用Ant Media Server.

图5. 查看仪表板

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

发布和播放WebRTC流

只需很少的配置,您就可以发布和播放WebRTC流. 首先,确保您的Ant Media Server已启动并运行, 你的电脑上有一个网络摄像头. 接下来,使用您的域名在web浏览器中输入以下URL:

http://AMS_domain_name:5443/WebRTCAppEE

您的视频将出现一个窗口. 单击出现的页面上的“开始发布”按钮(图6).

图6. 开始发布一个WebRTC流

视频下的状态将变为“发布”. 一旦发布开始,就会出现比特率、丢包和其他项目的反馈. 点击“使用WebRTC播放”按钮播放流媒体(图7). 播放将在新窗口中开始.

图7. 点击Play with WebRTC

您可以在蚂蚁媒体的Dashboard Web UI中上传视频. 为此,导航到您的应用程序并选择Upload VoD选项卡. 接下来,单击Upload VoD按钮. 在打开的对话框中(图8),单击“选择文件”,浏览到视频,然后单击“保存”. You can play the video in the Dashboard by clicking the player icon to the right of the video.

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

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

第一个, copy the Publish URL for the new stream and paste it into a Word document or Note on your computer. 您将在Dashboard中流名称的最右侧找到Publish URL.

发布URL的格式如下:

rtmp: / / AWSDomain.com / LiveApp / Rqp47G8mfs4HVTY1692333013499 

发布流

用于测试流, we’ll use Wirecast (although this process would work similarly in vMix or OBS or any comparable application). 首先,打开Wirecast并导航到输出设置对话框(图10). 选择“添加”,选择“RTMP服务器”. 选择720p30 x264预设或其他H.264个你想要的预设. 现在, 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. 单击OK.

图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 (图11). 流名称是“sample3”.”

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

要查看流,您可以将其格式化为HLS:

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

You should be able to paste this URL into Chrome, Safari, or other browsers to see it play. 我使用Chrome和Safari进行测试(图12)和来自THEO (go2sm)的两个第三方流测试播放器.com/theotest)和Bitmovin (go2sm . com).com/bitmovin).

图12. 测试流

活转码  

Ant Media Server还可以在服务器上执行实时流的实时转码. 用户可以在应用程序的设置选项卡中添加自适应比特率(图13).

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

添加后,将在该应用程序的实时流上使用转码.  当为转码添加比特率时,选项是有限的. 用户只能添加分辨率、视频比特率、音频比特率和帧速率.

测试

下面是我测试Ant Media Server的方法. 第一个, 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. 通常需要提供视频点播流媒体和直播流媒体. 能够提供自适应流媒体对于支持移动设备也很重要, 平板电脑, 和电脑. Lecture capture of 在线直播 for VOD playback is always important on college campuses, 俄亥俄州也不例外.

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

封闭的思想

对于蚂蚁媒体的视频点播流媒体来说,上传视频既简单又直接. 但是,用户一次只能通过Dashboard Web UI上传一个视频. 它将是伟大的,能够执行批量上传以及. 对于视频上传,我只能上传MP4文件. 当我试图上传WebM文件时,我收到了一个错误消息. 这个问题是2的一个小错误.6.2 version I tested; Ant Media tells me they have fixed the bug in v2.6.3.

Once 视频 are uploaded, users can easily play 视频 from Web UI within Ant Media Server. One limitation I discovered with VOD streaming is I could stream only single-data rate streams. 如果能够提供自适应的视频点播流,那就太棒了.

The 在线直播 features are more developed with Ant Media Server as adaptive streaming is possible with 在线直播, 直播流的实时转码也是可用的. 另外, 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流在所有测试的浏览器中都运行良好.

使用Ant Media Server流在第三方播放器中播放视频也是可能的, 但这需要更多的工作. 在没有第三方播放器的Web浏览器中播放WebRTC流很容易. Third-party players worked great for me using HLS, but I couldn’t get my DASH streams to play. 很可能是我设置错了,影响了播放.

我没有注意到在Ant Media Server流中包含标题的选项. 在大学环境中, 这是确保所有观看者都能访问所有视频内容的重要需求. Having an option to include captions from third-party vendors within the Dashboard would be helpful.

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

在使用AWS证书管理器进行一些初始设置挑战之后, 我使用AWS CloudFormation成功配置了Ant Media服务器扩展解决方案. 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. 它还可以轻松地删除集群中的所有元素. 

Here are two YouTube video tutorials that will help you with configuring the auto扩展 cluster:

  • 使用CloudFormation建立Ant Media服务器扩展解决方案5分钟:go2sm.com/扩展设置
  • 使用Amazon证书管理器颁发SSL证书:go2sm.com/ssl

我最后的想法, 我很欣赏Ant Media Server有一个仪表盘,它使设置变得容易, 虽然在仪表板中有一个重启按钮会很好. This would help tremendously with configuration changes when a server restart is required.

相关文章
The USB Fusion is a device that can be used in a production environment for local content feeds/sources. 它可以用于输入各种来源,如HDMI设备, 网络摄像头, USB麦克风, 视频, 图片, screenshares, 还有其他项目. The USB Fusion is touted as a tool to make your online lectures and virtual events more engaging and to easily combine numerous sources into attractive live presentations for remote education, 在线研讨会, 在线直播, 视频会议.
众所周知,它是一款用于捕捉移动视频的运动相机, GoPro在体育爱好者中很受欢迎, 水下活动, 捕捉卡通镜头, 以及许多其他用例. 然而, the GoPro Hero11 Black can also serve as a high-quality webcam for meetings or online conferences using web applications like Zoom, 微软团队, 和去会议, and it can be deployed in production streaming workflows for YouTubers and video podcasters.