Skip to content

Web Player 回看失败(开发人员工具中有数据流、无画面和声音) #448

@birdiehb-pixel

Description

@birdiehb-pixel

Web Player 无法播放湖南电信回看流: AAC 时间戳重叠(pts overlapped)导致 MediaSource 错误

📝 问题详情
现象描述:
在 rtp2httpd 的 Web 播放器中播放回看内容时,显示黑屏无画面。但在 VLC 等桌面播放器中播放同一地址却一切正常。

关键日志:

[TSDemuxer] > AAC: Detected pts overlapped, expected: xxxms, PES pts: xxxms

[MSE] > Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.

Play error after user interaction 及 Retrying playback due to decoding error...

初步分析:
通过对比 rtp2httpd 服务端日志(显示 206 状态码和 Received all content)与前端报错信息,推断问题根源在于 湖南电信回看流的 AAC 音频时间戳(PTS,Presentation Time Stamp)出现重叠。该流在 VLC 中能正常播放,说明其内部解复用器(demuxer)能自动修复此类时间戳错误,而 Web Player 依赖的 hls.js 对时间戳规范要求较严格,无法处理此类非致命错误,导致解码流程中断。

💡 建议修复方向
如果从服务端直接修正流格式成本较高,或许可以考虑在前端层面提高 hls.js 对 AAC 时间戳重叠(pts overlapped)的容错率,例如通过配置 fragLoader 或添加 liveSync 相关参数来规避。

通过deepseek查找问题并提供的总结。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions