设置广播软件
兼容性
一般来说,Owncast 与任何使用 RTMP 向远程服务器广播的软件兼容。 RTMP 是所有主要直播服务使用的,所以如果您当前使用其中之一,您很可能可以将现有的软件指向您的 Owncast 实例。
但是,我们尚未对所有软件进行测试。 所以,如果您正在使用某些特定的软件 我们想知道您使用的软件及其结果。 如果您发现自己遇到问题,我们很乐意帮助排查。
将软件指向 Owncast
Owncast accepts incoming streams over RTMP on TCP port 1935 by default. The port is configurable in the admin under Configuration > Server Setup (see Server Setup). Your stream key is only accepted on the /live/ path, so the full endpoint is rtmp://yourserver:1935/live/<your-stream-key>.
大多数广播软件都有一种方式来指定 "自定义 "位置作为 RTMP 端点。 In this case you would specify rtmp://yourserver:1935/live as the RTMP destination, specifying your stream key where it asks for it. 默认流密钥是 abc123,但您应在设置 Owncast 后立即更改此项。
If your software doesn't have a place to specify a stream key you can simply append it to your RTMP location, for example: rtmp://yourserver:1935/live/abc123.
您配置广播软件的方式很重要
您需要将广播软件配置为与您能为观众提供的最高质量相匹配。 这意味着如果您的 Owncast 服务器只能处理 720p@2500k,您就不应该配置广播软件以发送 1080p@6000k。 您要求 Owncast 进行的转换工作越多,它将占用您服务器上的更多资源,使您更难为观众提供最佳质量。
每个服务器、环境、网络速度和处理能力都是不同的。 仅仅因为您 想 提供某种质量并不意味着您的服务器能够支持它。
If you find yourself trying to squeeze better performance out of Owncast then try setting your broadcasting software to a lower quality as well as lowering the output quality in the admin under Configuration > Video.
广播设置
以下是您可以在广播软件中设置的高质量流的一些建议设置。 但您应记住,您将提供给观众的最高质量,如上所述。 继续阅读有关这些值的更多信息。
视频分辨率和质量
| 分辨率 | 帧速率 | 比特率 |
|---|---|---|
| 1920x1080 | 60fps | 5000k |
| 1920x1080 | 30fps | 4500k |
| 1280x720 | 60fps | 4000k |
| 1280x720 | 30fps | 3000k |
分辨率和帧率
分辨率是指屏幕上视频的大小,而帧速率是指每秒显示的帧数。 全高清分辨率通常是 1080p,60 帧每秒(fps)。 以更高的分辨率(如1080p)进行流媒体需要更高的比特率,而更高的帧率需要更多的编码能力。 如果您在广播计算机和 Owncast 服务器上都有带宽和编码能力以在 1080p、60 fps 上进行流媒体,那就太好了! 如果没有,请尝试其他设置以优化您的视频质量和稳定性。
比特率
比特率是您在流媒体时发送到 Owncast 服务器的数据量。 更高的比特率会占用更多可用的互联网带宽。 提高比特率可以改善视频质量,但仅在某个点之前。
Video and audio codecs
Use H.264 video and AAC audio for the best compatibility. Owncast's ingest layer also recognizes H.265 video and MP3 and Speex audio, but transcoding and playback compatibility are only assured for H.264 and AAC.
关键帧间隔
Set your broadcasting software to send a keyframe every 2 seconds and do not leave it at auto. Keyframe settings use different units in different tools. The OBS keyframe interval is in seconds, so use 2. The ffmpeg -g option counts frames, so use twice your framerate.
音频设置
将广播软件设置为发送 Owncast AAC 音频。
音频比特率和质量
流媒体时,请确保将音频质量与您正在流媒体的内容相匹配。 如果您是专注于音乐的直播,可能可以提高。 如果您只是说话,那么您可能可以降低。
Owncast passes audio through untouched by default, so it goes out exactly how it's sent. If audio passthrough is turned off for an output variant, Owncast re-encodes that variant's audio to AAC.
| 质量 | 比特率 |
|---|---|
| 低 | 96kbps |
| 中等 | 128kbps |
| 高 | 192kbps |
| 更高 | 256kbps |
| 最高 | 320kbps |
丢帧
阅读更多有关 丢帧 的故障排除信息,这在您的广播软件中被报告。
错误或断开连接
如果您的广播软件不断断开与 Owncast 的连接,或者您的流在中途掉线,请阅读 您的流不断断开。 它涵盖了常见的原因:不稳定的网络、比特率高于上传所能承受的,以及服务器上的 ffmpeg 问题。
Improve this page
See something missing or incorrect? Edit this page and improve the documentation for everyone.
Gabe Kangas