Skip to content

[Help] 断播后重新直播自动录制报错,会计时,但是流量和文件大小未0 #206

Description

@MinTiang

用的最新版docker。
我用tg通知,主播断播后会发送异常消息
`出错了~

异常信息:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/reactivex/observable/catch.py", line 55, in action
current = next(sources_)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/blrec/core/operators/request_exception_handler.py", line 39, in on_error
raise exc
File "/usr/local/lib/python3.10/site-packages/blrec/core/operators/connection_error_handler.py", line 48, in on_error
raise exc
File "/usr/local/lib/python3.10/site-packages/blrec/core/operators/stream_parser.py", line 53, in _before_retry
raise exc
File "/usr/local/lib/python3.10/site-packages/blrec/flv/operators/parse.py", line 45, in on_next
tag = reader.read_tag()
File "/usr/local/lib/python3.10/site-packages/blrec/flv/io.py", line 42, in read_tag
tag = self._parser.parse_tag(no_body=no_body)
File "/usr/local/lib/python3.10/site-packages/blrec/flv/format.py", line 90, in parse_tag
video_tag_header = self.parse_video_tag_header(header_data)
File "/usr/local/lib/python3.10/site-packages/blrec/flv/format.py", line 165, in parse_video_tag_header
codec_id = CodecID(flag & 0b0000_1111)
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: 12 is not a valid CodecID`

Activity

  1. changed the title [-][Help] 断播后重新直播录制报错,会计时,但是流量和文件大小未0[/-] [+][Help] 断播后重新直播自动录制报错,会计时,但是流量和文件大小未0[/+] on Mar 18, 2025
  2. self-assigned this
    on Mar 18, 2025
  3. timerring commented on Mar 18, 2025

    @timerring
    Owner

    这和断播后重新录播无关,主要是可能主播切换了码流,采用了 HEVC 编码,而 FLV 文件本身就不支持 HEVC,codec id 12 是中国云厂商自己修改定义的,不是写在 FLV 标准里的。

    如果遇到这种情况,我推荐将该直播间切换到 HEVC 流的录制,以下方法二选一即可:

    Method1 配置修改方法

    [[tasks]]
    room_id = xxxxx
    enable_monitor = true
    enable_recorder = true
    
    [tasks.recorder]
    stream_format = "fmp4"
    recording_mode = "raw"
    fmp4_stream_timeout = 5
    

    Method2 web 修改方法

    Image

    1. 在直播流格式中选择 HLS。
    2. 等待 fmp4 流中选择等待 x 秒后如果没有抓取到 HEVC 流,则回到 AVC 流。建议时间等待时间稍长一点。
  4. MinTiang commented on Mar 18, 2025

    @MinTiang
    Author

    好的,非常感谢

  5. Repository owner locked and limited conversation to collaborators on May 1, 2025
  6. converted this issue into a discussion #321 on May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions