Repository navigation
fix(nodes): repeat H.264 SPS/PPS before every IDR on RTSP inputs - #1357
Open
justin-guth-sima wants to merge 1 commit into
Open
justin-guth-sima wants to merge 1 commit into
justin-guth-sima wants to merge 1 commit into
Conversation
H264Depacketize wrote h264parse's config-interval only for values >= 0 and treated -1 as "leave the element default" (0, never repeat). An app could therefore not ask for -1, GStreamer's "before every IDR", and the RTSP inputs never repeated parameter sets. Sources republished without re-encoding (MP4 over RTSP) carry SPS/PPS in-band only ahead of the first access unit. In a fused encoded branch the egress queue is leaky (RealtimeLatestByStream); when it drops that first access unit at startup, the egress h264parse never sees SPS/PPS and drops every frame for the rest of the run, while the lossless decode branch keeps working. With 16 RTSP streams this left 1-4 random channels without video in every run. config-interval is now always written, -1 by default, as H265Depacketize already does. 0 still turns repetition off and N > 0 repeats every N seconds; values below -1 are rejected.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch was successfully deployed
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.
Summary
H264Depacketizewroteh264parse'sconfig-intervalonly for values>= 0and treated-1as "leave the element default" (0, never repeat). So no RTSP H.264 input repeated parameter sets,
and an app could not ask for GStreamer's
-1, "before every IDR".In a fused encoded branch this loses a stream's video for the whole run: sources republished
without re-encoding carry SPS/PPS only ahead of the first access unit, the leaky egress queue
(
RealtimeLatestByStream) sometimes drops that access unit at startup, and the egressh264parsethen drops every frame. With 16 RTSP streams in
high-density-multi-stream-object-detector, 1 to 4random streams sent no video in every run. Details and logs are in the issue.
config-intervalis now always written,-1by default, asH265Depacketizealready does.0still turns repetition off,
N > 0repeats every N seconds, and values below-1(whichh264parsewould reject when the pipeline is parsed) throwstd::invalid_argumentfrombackend_fragment, as partial caps already do.Fixes #1356
Change Type
Risk
Risk notes (required for Medium/High): every RTSP H.264 input (
RtspEncodedInput,RtspDecodedInput, directH264Depacketizeusers) now repeats SPS/PPS before each IDR unless theapp sets the interval. The parser inserts them only where an IDR lacks them, so streams that
already carry them are unchanged; others gain a few dozen bytes per IDR. The decoder receives the
parameter sets it already had. An app that relied on
-1meaning "never repeat" gets that with0.Test Evidence
Commands run and outcomes:
Docs Impact
Docs notes: the option's doc comments in
RtspEncodedInput.h,RtspDecodedInput.handH264Depacketize.hnow say what-1,0andN > 0do.Migration Impact
Migration notes (required if impact exists):
Breaking API Change
include/*API / Deprecation Checklist
docs/architecture/naming.md)Release Hygiene Checklist
scripts/ci/check_naming_and_conflicts.shpassedscripts/ci/check_artifacts.shpassedscripts/ci/check_release_policy.shpassed