Repository navigation
feat: draw external subtitles and play open-GOP sources during takeover - #11
Merged
Merged
Conversation
Open-GOP random access points (HEVC CRA, H.264 recovery-point I frames)
are followed in decode order by leading pictures that present earlier.
Seeking onto such a key fed those pictures with negative timestamps, and
leading pictures that present before an already written picture of the
previous GOP made the MP4 muxer reject the stream ("Timestamps cannot be
smaller than the largest timestamp of the previous GOP").
Video packets now pass through a leading-picture filter before the muxer.
The start key drops its undecodable leading pictures, and a mid-stream key
whose leading pictures cross the previous GOP drops only its own leading
pictures. Other open GOPs are passed through unchanged. Playback from the
start uses the same manual packet path as Seek so the filter applies to
both.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
When a takeover failed with a read-class error the hook only stopped the session. Shaka's media data path was already unloaded, so Plex Web kept an empty video element and an endless spinner, and the in-page notice disappeared after a few seconds. After releasing the session the hook now dispatches a critical Shaka network error (HTTP_ERROR) on the current player for media_read_failed and source_expired, before or after ready, so Plex shows its own s1002 dialog, which the existing presenter rewrites with the ShimWeave message. These failures do not block the source, so a retry takes over again. Nothing is dispatched when Plex has started another load meanwhile or for stop codes such as media_detached. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Some encodes, typically chunked encodes spliced at a scene cut, end a
short GOP with a picture that presents after the next IDR. The MP4 muxer
rejects that IDR ("Timestamps cannot be smaller than the largest timestamp
of the previous GOP"). Such a key is now demoted to a regular picture of
the current GOP, keeping every frame and the decode order and losing only
that random access point.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Error details longer than 200 characters were dropped entirely, so a muxer failure reached the page only as "stream_failed Error". The worker now keeps the first and last 80 characters of a long detail, which retains the actual timestamps at the end of muxer messages, and the session-end detail on the video element allows 320 characters. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
|
补上从头播放改走分片转封装(b7398e1)前后的对比。真实页面,Plex Web 播放一集 4K(3840×1632)STRM,默认音轨 EAC3,经配套反代由扩展接管,每次清掉播放记录从头播放,起播后 6 秒向后 Seek 120 秒。时间从点击播放算起,到画面开始推进。
两版在误差范围内持平,均在发布门槛(首个可播放分片与 Seek 恢复 p95 < 2 s)以内。 |
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.
问题
结果
control-v1未改动。验证
本地(Node 22、pnpm 11)
真实页面(Plex Web + 配套反代,合成与公开测试片源)
限制:从头播放改走分片转封装后,没有做改动前后的首帧、CPU 与内存对比,仓库没有能自动复现播放管线的测量工具,上述真实页面验收覆盖了起播与 Seek 的功能表现。
🤖 Generated with Claude Code