在 Microsoft Stream 中手动配置实时事件流的编码器Manually configure encoders for live event streaming in Microsoft Stream

如果您有一个未直接集成到 Microsoft Stream 中的编码器,请了解如何使用 Microsoft Stream 手动设置和配置编码器的实时流。If you have an encoder that is not directly integrated into Microsoft Stream, learn how to setup and configure the encoder manually for Live streaming with Microsoft Stream.

Microsoft Stream 接受来自输出 RTMP 或 RTMPS 的各种不同编码器的实时源。Microsoft Stream accepts live feeds from a variety of different encoders that output RTMP or RTMPS. 每个编码器都不同,因此请务必遵循发送到流时编码器配置的指南。Each encoder is different, so make sure to follow the guidelines for the encoder configurations when sending to Stream. 查看已 测试编码器 的列表,并提供易于安装的入门。Check out the list of tested encoders with easy setup to get started.

若要了解如何在 Microsoft Stream 中设置实时事件,请阅读有关 创建实时事件的信息。To learn how to setup a Live event in Microsoft Stream, read about creating live events. 如果您已在使用与 Microsoft Stream 集成的编码器,请阅读有关 为实时流式处理配置编码器的信息。If you are already using an encoder that is integrated with Microsoft Stream, read about configuring encoders for live streaming.

手动配置Configure manually

保存 live 事件 (阅读创建实时事件以获取详细信息) 后,可以在编码器设置选项卡上的 "选择编码器" 下拉列表中查看集成编码器的列表。此时也会生成插入 Url。After you save the live event (read Creating live events for details), you can see the list of integrated encoders in the Select encoder drop down list on the Encoder setup tab. The ingest URLs are also generated at this time. 选择 " 手动配置 ",将编码器设置为不在集成编码器列表中。Select Configure manually to setup an encoder not in the list of integrated encoders.

EncoderPicker 下拉列表

设置Setup

  1. 选择 " 启动安装程序 " 以创建用于实时流式处理的插入通道。Select Start setup to create an ingest channel for live streaming. 等待安装程序完成。Wait for the setup to be complete. 你将在屏幕上看到 "已 准备好" 连接 邮件。You will see a Ready to connect message on the screen.

  2. 将以下设置复制并粘贴到您选择的编码器中:Copy and paste the following settings into the encoder of your choice:

    a.a. 服务器插入 URL:在编码器中,这可能称为 URL 或地址。Server ingest URL: In your encoder, this may be called URL or Address. Microsoft Stream 不需要流键或名称,因此您可以使用任何非空值(如 MicrosoftStream)填充此项。Microsoft Stream does not require a stream key or name, so you can fill this in with any non-empty value such as MicrosoftStream.

    b.b. 辅助服务器的插入 URL:如果编码器支持,请使用此 URL 进行双推,以提高耐用性和恢复能力。Secondary server ingest URL: If supported by your encoder, use this URL to double push to improve durability and resiliency. 由于这将从编码器中输出冗余流,因此将需要双带宽。Since this is outputting a redundant stream from your encoder, it will require double bandwidth. 因此,请确保你具有支持此功能所需的带宽容量。So, make sure that you have the required bandwidth capacity to support this. 这将在 "高级" 部分列出。This is listed under the advanced section.

    c.c. 使用 **安全连接 (SSL) ** 切换以在插入 URL 的 RMTP 或 RTMPS 协议之间切换。Use the Secure Connection (SSL) toggle to switch between RMTP or RTMPS protocols for the ingest URLs. 请注意,编码器必须支持 RTMPS 才能使用它。Note that your encoder must support RTMPS to use it.

  3. Microsoft Stream 需要流键或名称,因此您可以使用任何非空值(如 MicrosoftStream)填充此项。Microsoft Stream does not require a stream key or name, so you can fill this in with any non-empty value such as, MicrosoftStream. 根据编码器,可以在单独的字段中输入,也可以将其追加到插入 URL 的末尾(例如 /MicrosoftStream)。Depending on the encoder, this may be entered on a separate field or appended to the end of the ingest URL e.g. /MicrosoftStream.

  4. 请确保您的编码器已按照下面建议的编码器设置进行了正确的设置。Make sure your encoder is configured with the correct settings as per our recommended encoder settings below.

  5. 使用所需的音频和视频源配置编码器。Configure your encoder with the desired audio and video sources.

  6. 启动从编码器到 Microsoft Stream 摄取终结点的数据流。Start streaming from your encoder to the Microsoft Stream ingest endpoints.

  7. 返回到 Microsoft Stream。Go back to Microsoft Stream. 在编码器中查看预览后,请选择 " 启动事件 " 进入活动状态,以便观众可以看到 live 事件。After you are able to see the preview from the encoder, select Start event to go live so your audience can see the live event.

摄取协议Ingest protocols

  • 一个比特率 RTMPS 或 RTMPSingle bitrate RTMPS or RTMP

视频格式Video format

  • 编解码器: H-pCodec: H.264
  • 配置文件:高 (级别 4.0) Profile: High (Level 4.0)
  • 比特率:最高 5Mbps (5000 kbps) Bitrate: Up to 5Mbps (5000 kbps)
  • 严格常量比特率 (CBR) Strict Constant Bitrate (CBR)
  • 关键帧/GOP:2秒Keyframe/GOP: 2 seconds
    • 每个 GOP 的开头必须有一个 IDR 帧There must be an IDR frame at the beginning of each GOP
    • 帧速率:29.97 或30fpsFrame Rate: 29.97 or 30fps
    • 解决方案: 1280 x 720 (720P) Resolution: 1280 x 720 (720P)
    • 交错模式:渐进Interlace Mode: Progressive
  • 像素纵横比 (PAR) :平方Pixel Aspect Ratio (PAR): Square

音频格式Audio format

  • 编解码器: AAC (LC) Codec: AAC (LC)
  • 比特率: 192 kbpsBitrate: 192 kbps
  • 采样率: 48 kHz 或 44.1 kHz (建议 48 kHz) Sample Rate: 48 kHz or 44.1 kHz (recommend 48 kHz)

播放要求Playback requirements

  • 音频和视频流都必须存在,才能在 Microsoft Stream 中播放内容。Both an audio and video stream must be present in order to playback content in Microsoft Stream.

配置提示Configuration tips

  • 只要有可能,请使用 hardwired internet 连接。Whenever possible, use a hardwired internet connection.

  • 确定带宽要求的最佳经验规则是将流式处理 bitrates 加倍。A good rule of thumb when determining bandwidth requirements is to double the streaming bitrates. 虽然这不是强制性要求,但它将有助于缓解网络拥塞的影响。While this is not a mandatory requirement, it will help mitigate the impact of network congestion.

  • 使用基于软件的编码器时,请关闭所有不必要的程序。When using software based encoders, close any unnecessary programs.

  • 请勿在开始推送后更改编码器配置。Don't change your encoder configuration after it has started pushing. 它对事件产生负面影响,并可能导致事件不稳定。It has negative effects on the event and can cause the event to be unstable. 如果要在事件启动之前执行此操作,则必须使用 Microsoft Stream 中的发生器控件断开连接,然后再次启动安装程序。If you want to do this before the event has started, you must disconnect using the producer controls in Microsoft Stream and start setup again.

  • 如果编码器在 live 事件期间断开连接,请重新连接它,保持继续进程的时间戳。If the encoder is disconnected during the live event, reconnect it keeping the same timestamps of continuing process. 请注意,任何连续性都可能导致某些浏览器和设备出现音频或视频问题。Note that any discontinuity may cause audio or video issues on certain browsers and devices.

  • 为自己提供充足的时间来设置事件。Give yourself ample time to setup your event. 对于高规模事件,建议在活动前的一小时内启动该设置。For high scale events, its recommended to start the setup an hour before your event.

另请参阅See also

Microsoft 365 Live 事件帮助Microsoft 365 Live Events Assistance