使用 Wirecast 编码器发送单比特率实时流Use the Wirecast encoder to send a single bitrate live stream

本文说明了如何配置 Telestream Wirecast 实时编码器,以便将单比特率流发送到用于实时编码的 AMS 频道。This article shows how to configure the Telestream Wirecast live encoder to send a single bitrate stream to AMS channels that are enabled for live encoding. 有关详细信息,请参阅使用能够通过 Azure 媒体服务执行实时编码的频道For more information, see Working with Channels that are Enabled to Perform Live Encoding with Azure Media Services.

本教程演示了如何通过 Azure 媒体服务浏览器 (AMSE) 工具管理 Azure 媒体服务 (AMS)。This tutorial shows how to manage Azure Media Services (AMS) with Azure Media Services Explorer (AMSE) tool. 此工具仅在 Windows 电脑上运行。This tool only runs on Windows PC. 如果使用的是 Mac 或 Linux,则可使用 Azure 门户创建频道节目If you are on Mac or Linux, use the Azure portal to create channels and programs.

备注

使用 RTMPS 协议时,编码器必须支持 TLS 1.2。Encoders must support TLS 1.2 when using RTMPS protocols. 由于 TLS 1.2 要求,请使用 Wirecast 版本 13.0.2 或更高版本。Use the Wirecast version 13.0.2 or higher due to the TLS 1.2 requirement.

必备条件Prerequisites

提示Tips

  • 尽可能使用硬编码的 Internet 连接。Whenever possible, use a hardwired internet connection.
  • 确定带宽要求时,可以认为它就是将流式处理比特率翻倍。A good rule of thumb when determining bandwidth requirements is to double the streaming bitrates. 虽然此要求不是强制性要求,但它可以减轻网络拥塞的影响。While this is not a mandatory requirement, it helps mitigate the impact of network congestion.
  • 使用基于软件的编码器时,请关闭任何不需要的程序。When using software-based encoders, close out any unnecessary programs.

创建频道Create a channel

  1. 在 AMSE 工具中,导航到“实时” 选项卡,并右键单击频道区域。In the AMSE tool, navigate to the Live tab, and right-click within the channel area. 从菜单中选择“创建频道…” Select Create channel… from the menu.

    Wirecast

  2. 指定频道名称,说明字段为选填字段。Specify a channel name, the description field is optional. 在“频道设置”下针对“实时编码”选项选择“标准” ,将“输入协议”设置为“RTMP” 。Under Channel Settings, select Standard for the Live Encoding option, with the Input Protocol set to RTMP. 所有其他设置可保留原样。You can leave all other settings as is.

    确保选中“立即启动新频道” 。Make sure the Start the new channel now is selected.

  3. 单击“创建频道” 。Click Create Channel.

    Wirecast

备注

启动频道可能需要长达 20 分钟的时间。The channel can take as long as 20 minutes to start.

启动频道时,可以配置编码器While the channel is starting, you can configure the encoder.

重要

只要频道进入就绪状态,就会开始计费。Billing starts as soon as Channel goes into a ready state. 有关详细信息,请参阅频道的状态For more information, see Channel's states.

配置 Telestream Wirecast 编码器Configure the Telestream Wirecast encoder

在本教程中,将使用以下输出设置。In this tutorial, the following output settings are used. 本部分的其余内容介绍更详细的配置步骤。The rest of this section describes configuration steps in more detail.

视频Video:

  • 编解码器:H.264Codec: H.264
  • 配置文件:高(级别 4.0)Profile: High (Level 4.0)
  • 比特率:5000 kbpsBitrate: 5000 kbps
  • 关键帧:2 秒(60 秒)Keyframe: 2 seconds (60 seconds)
  • 帧速率:30Frame Rate: 30

音频Audio:

  • 编解码器:AAC (LC)Codec: AAC (LC)
  • 比特率:192 kbpsBitrate: 192 kbps
  • 采样率:44.1 kHzSample Rate: 44.1 kHz

配置步骤Configuration steps

  1. 在所使用的计算机上打开 Telestream Wirecast 应用程序,并针对 RTMP 流式处理进行设置。Open the Telestream Wirecast application on the machine being used, and set up for RTMP streaming.

  2. 导航到“输出” 选项卡并选择“输出设置…” ,以配置输出。Configure the output by navigating to the Output tab and selecting Output Settings….

    确保已将“输出目标” 设置为“RTMP 服务器” 。Make sure the Output Destination is set to RTMP Server.

  3. 单击 “确定”Click OK.

  4. 在设置页上,将“目标” 字段设置为“Azure 媒体服务” 。On the settings page, set the Destination field to be Azure Media Services.

    编码配置文件已预先选择为 Azure H.264 720p 16:9 (1280x720)The Encoding profile is pre-selected to Azure H.264 720p 16:9 (1280x720). 若要自定义这些设置,请选择下拉列表右侧的齿轮图标,并选择“新建预设” 。To customize these settings, select the gear icon to the right of the drop-down, and then choose New Preset.

    Wirecast

  5. 配置编码器预设。Configure encoder presets.

    为预设命名,并查看是否存在下列建议的设置:Name the preset, and check for the following recommended settings:

    视频Video

    • 编码器:MainConcept H.264Encoder: MainConcept H.264

    • 每秒帧数:30Frames per Second: 30

    • 平均比特率:5000 Kbps/秒(可根据网络限制进行调整)Average bit rate: 5000 kbits/sec (Can be adjusted based on network limitations)

    • 配置文件:主要Profile: Main

    • 关键帧间隔:60 帧Key frame every: 60 frames

      音频:Audio

    • 目标比特率:192 kbits/秒Target bit rate: 192 kbits/sec

    • 采样率:44.100 kHzSample Rate: 44.100 kHz

      Wirecast

  6. 按“保存” 。Press Save.

    “编码”字段现在有新建的配置文件可供选择。The Encoding field now has the newly created profile available for selection.

    请确保选择新的配置文件。Make sure the new profile is selected.

  7. 获取频道的输入 URL,以便将其分配给 Wirecast 的“RTMP 终结点” 。Get the channel's input URL in order to assign it to the Wirecast RTMP Endpoint.

    导航回 AMSE 工具,查看频道完成状态。Navigate back to the AMSE tool, and check on the channel completion status. 一旦状态从“正在启动” 变为“正在运行” ,即可获取输入 URL。Once the State has changed from Starting to Running, you can get the input URL.

    频道正在运行时,右键单击频道名称,向下导航,将鼠标悬停在“将输入 URL 复制到剪贴板” 上方,然后选择“主要输入 URL” 。When the channel is running, right-click the channel name, navigate down to hover over Copy Input URL to clipboard and then select Primary Input URL.

    Wirecast

  8. 在 Wirecast 的“输出设置” 窗口中,将此信息粘贴到输出部分的“地址” 字段,然后指定一个流名称。In the Wirecast Output Settings window, paste this information in the Address field of the output section, and assign a stream name.

    Wirecast

  9. 选择“确定” 。Select OK.

  10. 在“Wirecast” 主屏幕上,确认视频和音频的输入源已就绪,并单击左上角的“流” 。On the main Wirecast screen, confirm input sources for video and audio are ready and then hit Stream in the top left-hand corner.

    Wirecast

重要

在单击“流” 之前,必须 确保频道已就绪。Before you click Stream, you must ensure that the Channel is ready. 另外,请确保不要让频道在没有一个输入贡献源的情况下处于就绪状态的时间超出 15 分钟。Also, make sure not to leave the Channel in a ready state without an input contribution feed for longer than > 15 minutes.

测试播放Test playback

导航回 AMSE 工具,并右键单击要测试的频道。Navigate to the AMSE tool, and right-click the channel to be tested. 在菜单中,将鼠标悬停在“播放预览” 上方,然后选择“使用 Azure Media Player” 。From the menu, hover over Playback the Preview and select with Azure Media Player.

Wirecast

如果流出现在播放器中,则编码器已正确配置,可以连接到 AMS。If the stream appears in the player, then the encoder has been properly configured to connect to AMS.

如果收到错误,则需重置频道并调整编码器设置。If an error is received, the channel needs to be reset and encoder settings adjusted. 有关指南,请参阅故障排除一文。See the troubleshooting article for guidance.

创建节目Create a program

  1. 确认频道可以播放后,即可创建节目。Once channel playback is confirmed, create a program. 在 AMSE 工具的“实时” 选项卡下,右键单击节目区域,并选择“创建新节目” 。Under the Live tab in the AMSE tool, right-click within the program area and select Create New Program.

    Wirecast

  2. 为节目命名,并根据需要调整“存档时段长度” (默认为 4 小时)。Name the program and, if needed, adjust the Archive Window Length (which defaults to four hours). 还可以指定存储位置,也可以将其保留为默认值。You can also specify a storage location or leave as the default.

  3. 选中“立即启动节目” 框。Check the Start the Program now box.

  4. 单击“创建节目” 。Click Create Program.

    备注

    创建节目需要的时间比创建频道需要的时间少。Program creation takes less time than channel creation.

  5. 运行节目以后,可通过下述方式来确认其是否能够播放:右键单击该节目,导航到“播放节目” ,并选择“使用 Azure Media Player” 。Once the program is running, confirm playback by right-clicking the program and navigating to Playback the program(s) and then selecting with Azure Media Player.

  6. 确认以后,再次右键单击该节目,然后选择“将输出 URL 复制到剪贴板” (也可通过菜单从“节目信息和设置” 选项检索此信息)。Once confirmed, right-click the program again and select Copy the Output URL to Clipboard (or retrieve this information from the Program information and settings option from the menu).

现在可以将流嵌入到播放器中,也可将其分发给受众进行实时观看。The stream is now ready to be embedded in a player, or distributed to an audience for live viewing.

故障排除Troubleshooting

有关指南,请参阅故障排除一文。See the troubleshooting article for guidance.

媒体服务学习路径Media Services learning paths

媒体服务 v3(最新版本)Media Services v3 (latest)

查看最新版本的 Azure 媒体服务!Check out the latest version of Azure Media Services!

媒体服务 v2(旧版)Media Services v2 (legacy)