启动序列:
14:47:55.119
14:48:01.886
14:48:01.889
14:48:01.917
会话初期 ~6 秒编码器在 11Mbps 跑,但彼时无客户端(见 #19);客户端连上后立刻发现 BWE 只有 5Mbps,编码器在 1ms 内降到 5Mbps——但首 IDR 已在更早 14:47:55–14:48:01 窗口若开启 --output 模式会被以 11Mbps 写出。
--output
src/state_portal.rs:200-202:
src/state_portal.rs:200-202
let actual_bitrate = self.args.bitrate.unwrap_or_else(|| { 5 * (enc_width as u64) * (enc_height as u64) * (self.args.fps as u64) / 100 });
固定公式 5 × W × H × fps / 100,不考虑:
5 × W × H × fps / 100
WebRTC 模式下 BWE 要等客户端连接后才到,所以冷启动 IDR 一定会跑偏。
libx264
VBV bitrate (2000000) > level limit (62500)
WebRTC 模式:
avcodec_send_frame
--output 模式:
No dependencies set.
The note is not visible to the blocked user.
现象
启动序列:
14:47:55.11914:48:01.88614:48:01.88914:48:01.917会话初期 ~6 秒编码器在 11Mbps 跑,但彼时无客户端(见 #19);客户端连上后立刻发现 BWE 只有 5Mbps,编码器在 1ms 内降到 5Mbps——但首 IDR 已在更早 14:47:55–14:48:01 窗口若开启
--output模式会被以 11Mbps 写出。根因
src/state_portal.rs:200-202:固定公式
5 × W × H × fps / 100,不考虑:WebRTC 模式下 BWE 要等客户端连接后才到,所以冷启动 IDR 一定会跑偏。
影响
--output文件模式:直接以 11Mbps 写 mp4,文件偏大且无任何反馈机制纠正libx264启动时打印多条VBV bitrate (2000000) > level limit (62500)警告,噪音修复方向
WebRTC 模式:
avcodec_send_frame重设 rc_bitrate--output模式:关联