Repository navigation
fix: 三个录制稳定性修复 (#500 / #504 + ffmpeg 断线重连失效) - #516
Open
zzuu080603 wants to merge 4 commits into
Open
zzuu080603 wants to merge 4 commits into
zzuu080603 wants to merge 4 commits into
Conversation
added 4 commits
November 10, 2026 08:48
…lly works The three reconnect options sat after -i (output options area) where ffmpeg silently ignores them, so automatic reconnection on network drops never worked for any platform. They are HTTP-protocol input options and must precede -i; only added for http(s) URLs to avoid errors on rtmp inputs. Helps ihmily#502 (douyu 5-min disconnects).
…y#500) The offline branch of check_if_live updated streamer_name to the platform anchor whenever the display title carried the live marker, silently discarding the name the user typed and persisting the overwrite. Only auto-fill the name while it still holds the default placeholder; custom names (and titles built from them) are kept.
…d rooms (ihmily#504) For rooms with only_notify_no_record enabled, on_toggle_recording called check_if_live (which skips starting ffmpeg) and then start_update, which only flips the is_recording flag — the card showed a fake recording with no file. Pass manual_start=True so check_if_live bypasses the setting and launches ffmpeg itself; drop the redundant manual start_update call.
-reconnect_streamed followed directly by another option made ffmpeg parse
the next option name as its value ("Unable to parse ... as boolean") and
refuse to start — every http(s) recording would have failed to launch.
Verified by actually executing the builder command against a local HTTP
source this time; with explicit values it records normally (exit 0).
Author
|
发现并已修复本 PR 引入的一个启动失败问题:布尔选项 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
三个小而关键的修复,均通过代码审查 + 命令构建实测验证(ruff 通过):
1️⃣ ffmpeg 断线重连选项从未生效(影响所有平台,helps #502)
base.py中-reconnect_delay_max/-reconnect_streamed/-reconnect_at_eof位于-i之后(输出选项区),这三个是 HTTP 协议的输入选项,放在那里会被 ffmpeg 静默丢弃——因此网络闪断时的自动重连从未生效过。修复:移到
-i之前的输入选项区;仅对http(s)URL 添加(rtmp 等协议无此选项,避免报错)。已实测验证生成的完整命令中三项正确位于-i前,headers/proxy 插入位置不受影响。2️⃣ #500 下播状态检查覆盖手动设置的主播名
check_if_live下播分支中,只要标题带[直播中]标记就会用平台返回的anchor_name覆盖streamer_name并持久化——用户手动填写的名称被静默丢弃,重启也无法恢复。修复:仅当名称仍为默认占位符「直播间」时才自动填入平台名;自定义名一律保留,标题也改为基于保留后的名称生成。
3️⃣ #504 「仅通知不录制」房间手动点击录制按钮只显示假录制
on_toggle_recording调用check_if_live(其内部因only_notify_no_record跳过启动 ffmpeg),随后又调用start_update只设置了is_recording标志——UI 显示录制中、计时走动,但 ffmpeg 从未启动、无文件产生。修复:
check_if_live增加manual_start参数,手动点击时绕过 only-notify 拦截、真正启动录制;删除外层多余的start_update调用(正是假录制的根源)。周期检测等其他调用点行为不变。测试
-i前,rtmp URL 不添加,proxy/headers 插入位置回归通过Fixes #500
Fixes #504