Skip to content

fix/vp9 decode and keyframe request - #22

Merged
dangusev merged 4 commits into
feat/remove-h264from
fix/vp9-decode-and-keyframe-request
Oct 13, 2026
Merged

dangusev merged 4 commits into
feat/remove-h264from
fix/vp9-decode-and-keyframe-request

Conversation

@dangusev

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLI • Give Feedback 💬

@dangusev
dangusev added this pull request to stack #31 October 13, 2026 14:22
@dangusev
dangusev force-pushed the fix/vp9-decode-and-keyframe-request branch from f19b7e4 to 2b8c9b3 Compare October 13, 2026 14:54
@dangusev
dangusev force-pushed the fix/vp9-decode-and-keyframe-request branch from f19b7e4 to 2b8c9b3 Compare October 13, 2026 14:54
Browsers send VP9 SVC in flexible mode, with a reference index in each
inter-frame packet. The webrtc-rs Vp9Packet keeps the reference indices
of earlier packets and fails when three accumulate. The SampleBuilder
uses one Vp9Packet for the stream, so after the third reference index no
inter frame completed and next_video_frame gave no more frames.

Vp9Depacketizer resets the Vp9Packet before each packet.

Add debug logs for inbound video: the codec of a new track, a payload
type change, and receive counts every 5 s (packets, sequence gaps,
markers, samples, frames, decode errors).
next_video_frame asked for a keyframe only after a decode error or a gap
in a completed frame. When packets arrived but no frame completed, it
decoded nothing and sent no PLI, so the video stayed frozen.

It now sends a PLI when no frame was decoded for 3 s while packets
arrive, and again after each further 3 s, as libwebrtc does with
kMaxWaitForFrame.
@dangusev
dangusev force-pushed the fix/vp9-decode-and-keyframe-request branch from 2b8c9b3 to 0562452 Compare October 13, 2026 15:02
@dangusev
dangusev merged commit 14c2017 into main Oct 13, 2026
6 of 11 checks passed
@dangusev
dangusev deleted the fix/vp9-decode-and-keyframe-request branch October 13, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants