Skip to content

🐛[BUG] 录制错误后不会自动重试 #231

@HexStan

Description

@HexStan

⚠️ 确认是否已存在类似问题

  • 我已经搜索过issues,没有找到类似问题

🔧 运行方式

使用源代码运行

🐍 如果是使用源代码运行,请选择你的Python环境版本

None

💻 请选择你的系统环境

Other (请在问题中说明)

⚠️ 确认是否已经重试多次

  • 我已经尝试过多次,仍然出现问题

🕹 复现步骤

等待录制错误

😯 问题描述

除非手动点击一次录制按钮,否则会一直保持在录制错误状态,不会自动重试。查看日志后怀疑是因为录制实例没有在错误后被正确释放,因此程序一直误认为在录制。
今天已经出现3次,因此可以确定并非偶发问题。暂不清楚和关闭了“新增录制时立即获取直播状态”选项有没有关系。

📜 错误信息

发生录制错误前后的日志:

2025-08-30 22:18:23.461 | INFO     | app.core.recording.stream_manager:start_ffmpeg:352 - Exit loop recording (normal 0 | abnormal 1): code=0, https://live.bilibili.com/25993387
2025-08-30 22:18:23.462 | SUCCESS  | app.core.recording.stream_manager:start_ffmpeg:387 - Live recording completed: 小药甜甜圈
2025-08-30 22:18:23.462 | INFO     | app.core.recording.stream_manager:start_ffmpeg:393 - Removed recorder from active_recorders: 5c9474d2-ef55-46b3-8c31-d6585e91aa48
2025-08-30 22:18:23.464 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:23.464 | INFO     | app.core.recording.stream_manager:fetch_stream:197 - Live URL: https://live.bilibili.com/25993387
2025-08-30 22:18:23.466 | INFO     | app.core.recording.stream_manager:fetch_stream:198 - Use Proxy: None
2025-08-30 22:18:24.362 | INFO     | app.messages.message_pusher:log_push_result:87 - Push Email message successfully: ['***@qq.com']
2025-08-30 22:18:24.363 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:24.861 | INFO     | app.core.recording.record_manager:check_if_live:294 - Stream Data: StreamData(platform='哔哩哔哩', anchor_name='小药甜甜圈', is_live=True, title='不够强 也不够唐O.o', quality='OD', m3u8_url=None, flv_url=None, record_url='https://d1--cn-gotcha04.bilivideo.com/live-bvc/139282/live_1764532461_86061550.flv?expires=1756567164&len=0&oi=3746143894&pt=web&qn=10000&trid=10005292de5bffa746ab856b91c687792938&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha04&sign=b2c0f6376ec7c064977968296ec334eb&sk=e6aaba89e71b84655864c4f3d0fa00e6&p2p_type=0&sl=1&free_type=0&mid=0&pp=rtmp&source=one&trace=40&site=58ca548952f91ac8233d9bc680f810a1&order=2', new_cookies=None, new_token=None, extra=None)
2025-08-30 22:18:24.862 | INFO     | app.core.recording.record_manager:start_update:395 - Started recording for 小药甜甜圈 - 原画
2025-08-30 22:18:24.867 | INFO     | app.core.recording.stream_manager:start_recording:224 - Save Path: /app/downloads/哔哩哔哩/小药甜甜圈(B站)/2025-08-30/小药甜甜圈-[2025-08-30_22-18-24]-不够强_也不够唐O_o_%03d.ts
2025-08-30 22:18:24.869 | INFO     | app.core.recording.stream_manager:start_recording:241 - Saved recorder instance for 5c9474d2-ef55-46b3-8c31-d6585e91aa48, id: 140642751566512
2025-08-30 22:18:24.870 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:24.871 | INFO     | app.core.recording.stream_manager:start_ffmpeg:303 - Starting ffmpeg recording - recorder id: 140642751566512, rec_id: 5c9474d2-ef55-46b3-8c31-d6585e91aa48
2025-08-30 22:18:24.874 | INFO     | app.core.recording.stream_manager:start_ffmpeg:320 - Recording in Progress: https://live.bilibili.com/25993387
2025-08-30 22:18:33.886 | INFO     | app.core.recording.stream_manager:start_ffmpeg:352 - Exit loop recording (normal 0 | abnormal 1): code=0, https://live.bilibili.com/25993387
2025-08-30 22:18:33.888 | SUCCESS  | app.core.recording.stream_manager:start_ffmpeg:387 - Live recording completed: 小药甜甜圈
2025-08-30 22:18:33.889 | INFO     | app.core.recording.stream_manager:start_ffmpeg:393 - Removed recorder from active_recorders: 5c9474d2-ef55-46b3-8c31-d6585e91aa48
2025-08-30 22:18:33.890 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:33.892 | INFO     | app.core.recording.stream_manager:fetch_stream:197 - Live URL: https://live.bilibili.com/25993387
2025-08-30 22:18:33.894 | INFO     | app.core.recording.stream_manager:fetch_stream:198 - Use Proxy: None
2025-08-30 22:18:33.901 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:34.615 | INFO     | app.core.recording.record_manager:check_if_live:294 - Stream Data: StreamData(platform='哔哩哔哩', anchor_name='小药甜甜圈', is_live=True, title='不够强 也不够唐O.o', quality='OD', m3u8_url=None, flv_url=None, record_url='https://d1--cn-gotcha04.bilivideo.com/live-bvc/213104/live_1764532461_86061550.flv?expires=1756567174&len=0&oi=3746143894&pt=web&qn=10000&trid=1000a659f475f7f14fd690654694fa1b6c03&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha04&sign=108b4c235b22e1d5d5260e5505040937&sk=80121362105aad259a7d77c7aafa86da&p2p_type=0&sl=1&free_type=0&mid=0&pp=rtmp&source=one&trace=40&site=13357bc4b1a38ecc5d6802934a55ca31&order=2', new_cookies=None, new_token=None, extra=None)
2025-08-30 22:18:34.617 | INFO     | app.core.recording.record_manager:start_update:395 - Started recording for 小药甜甜圈 - 原画
2025-08-30 22:18:34.619 | INFO     | app.core.recording.stream_manager:start_recording:224 - Save Path: /app/downloads/哔哩哔哩/小药甜甜圈(B站)/2025-08-30/小药甜甜圈-[2025-08-30_22-18-34]-不够强_也不够唐O_o_%03d.ts
2025-08-30 22:18:34.620 | INFO     | app.core.recording.stream_manager:start_recording:241 - Saved recorder instance for 5c9474d2-ef55-46b3-8c31-d6585e91aa48, id: 140642750266928
2025-08-30 22:18:34.622 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:34.624 | INFO     | app.core.recording.stream_manager:start_ffmpeg:303 - Starting ffmpeg recording - recorder id: 140642750266928, rec_id: 5c9474d2-ef55-46b3-8c31-d6585e91aa48
2025-08-30 22:18:34.628 | INFO     | app.core.recording.stream_manager:start_ffmpeg:320 - Recording in Progress: https://live.bilibili.com/25993387
2025-08-30 22:18:43.639 | INFO     | app.core.recording.stream_manager:start_ffmpeg:352 - Exit loop recording (normal 0 | abnormal 1): code=0, https://live.bilibili.com/25993387
2025-08-30 22:18:43.640 | SUCCESS  | app.core.recording.stream_manager:start_ffmpeg:387 - Live recording completed: 小药甜甜圈
2025-08-30 22:18:43.642 | INFO     | app.core.recording.stream_manager:start_ffmpeg:393 - Removed recorder from active_recorders: 5c9474d2-ef55-46b3-8c31-d6585e91aa48
2025-08-30 22:18:43.645 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:43.646 | INFO     | app.core.recording.stream_manager:fetch_stream:197 - Live URL: https://live.bilibili.com/25993387
2025-08-30 22:18:43.647 | INFO     | app.core.recording.stream_manager:fetch_stream:198 - Use Proxy: None
2025-08-30 22:18:43.650 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:44.218 | INFO     | app.core.recording.record_manager:check_if_live:294 - Stream Data: StreamData(platform='哔哩哔哩', anchor_name='小药甜甜圈', is_live=True, title='不够强 也不够唐O.o', quality='OD', m3u8_url=None, flv_url=None, record_url='https://d1--cn-gotcha04.bilivideo.com/live-bvc/348269/live_1764532461_86061550.flv?expires=1756567184&len=0&oi=3746143894&pt=web&qn=10000&trid=10004c807e1c573e490cb4abe2b72f51a4b5&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha04&sign=68358ee7f9caeca42c8ded24e38d800f&sk=80121362105aad259a7d77c7aafa86da&p2p_type=0&sl=1&free_type=0&mid=0&pp=rtmp&source=one&trace=40&site=13deae48a98ef6aaf92d9486fa1ba4ba&order=2', new_cookies=None, new_token=None, extra=None)
2025-08-30 22:18:44.219 | INFO     | app.core.recording.record_manager:start_update:395 - Started recording for 小药甜甜圈 - 原画
2025-08-30 22:18:44.220 | INFO     | app.core.recording.stream_manager:start_recording:224 - Save Path: /app/downloads/哔哩哔哩/小药甜甜圈(B站)/2025-08-30/小药甜甜圈-[2025-08-30_22-18-44]-不够强_也不够唐O_o_%03d.ts
2025-08-30 22:18:44.220 | INFO     | app.core.recording.stream_manager:start_recording:241 - Saved recorder instance for 5c9474d2-ef55-46b3-8c31-d6585e91aa48, id: 140642753327568
2025-08-30 22:18:44.223 | DEBUG    | app.ui.components.business.recording_card:update_card:243 - Update card failed: Page has been disconnected
2025-08-30 22:18:44.225 | INFO     | app.core.recording.stream_manager:start_ffmpeg:303 - Starting ffmpeg recording - recorder id: 140642753327568, rec_id: 5c9474d2-ef55-46b3-8c31-d6585e91aa48
2025-08-30 22:18:44.228 | INFO     | app.core.recording.stream_manager:start_ffmpeg:320 - Recording in Progress: https://live.bilibili.com/25993387
2025-08-30 22:18:55.241 | INFO     | app.core.recording.stream_manager:start_ffmpeg:352 - Exit loop recording (normal 0 | abnormal 1): code=8, https://live.bilibili.com/25993387
2025-08-30 22:18:55.242 | ERROR    | app.core.recording.stream_manager:start_ffmpeg:362 - FFmpeg Stderr Output: [in#0 @ 0x55de536d9400] Error opening input: Server returned 404 Not Found

发生错误后检测该直播间的日志:

    行 2858: 2025-08-30 22:26:35.754 | DEBUG    | app.core.recording.record_manager:check_if_live:233 - Skip check_if_live because recorder is active: https://live.bilibili.com/25993387
    行 2880: 2025-08-30 22:29:35.763 | DEBUG    | app.core.recording.record_manager:check_if_live:233 - Skip check_if_live because recorder is active: https://live.bilibili.com/25993387
    行 2887: 2025-08-30 22:32:35.761 | DEBUG    | app.core.recording.record_manager:check_if_live:233 - Skip check_if_live because recorder is active: https://live.bilibili.com/25993387
    行 2911: 2025-08-30 22:35:35.764 | DEBUG    | app.core.recording.record_manager:check_if_live:233 - Skip check_if_live because recorder is active: https://live.bilibili.com/25993387
    行 2936: 2025-08-30 22:38:35.770 | DEBUG    | app.core.recording.record_manager:check_if_live:233 - Skip check_if_live because recorder is active: https://live.bilibili.com/25993387

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions