Skip to content

Retry an incomplete RTSP video description before writing MP4 headers - #359

Draft
JxnLexn wants to merge 1 commit into
seydx:mainfrom
JxnLexn:fix/fmp4-live-reprobe
Draft

JxnLexn wants to merge 1 commit into
seydx:mainfrom
JxnLexn:fix/fmp4-live-reprobe

Conversation

@JxnLexn

@JxnLexn JxnLexn commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

An RTSP producer can initially advertise video without dimensions, then correct its codec description after media starts arriving. FMP4Stream can proceed with the incomplete first description and fail while writing the MP4 header.

Retry the RTSP open once when video dimensions are missing, keeping the first connection alive while fetching the new description. Await closure of the original input on both success and failure and preserve the startup abort signal. File inputs and caller-provided demuxers are unchanged; this is not an unbounded reconnect loop.

Tests inject an incomplete first description, verify a usable init segment after the second open, and verify that the initial input closes if refreshing fails. The existing shutdown and stalled-source tests remain in place.

Validation: all 22 FMP4Stream tests passed with the current upstream source and published native binding; lint, TypeScript build, test and example typechecks passed. Full CI-mode suite: 2,082 passed, six hardware tests skipped, zero failures. Kept as a draft for review of the RTSP-specific recovery policy: the deterministic regression validates recovery/resource handling, while exact camera timing remains device-dependent.

This branch has not been deployed

No deployments
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.

1 participant