Repository navigation
mediad: lower the frame rate on a weak link, never the resolution - #431
Open
FabienDanieau wants to merge 1 commit into
Open
FabienDanieau wants to merge 1 commit into
FabienDanieau wants to merge 1 commit into
Conversation
webrtcsink's default mitigation lowers the resolution below 2 Mbps, which puts a software videoscale in front of mpph264enc. A system-memory frame into mpph264enc is the path that oopsed the board kernel twice; the camera's own buffers are safe. videorate only drops frames, so with enable-mitigation-modes=downsampled those buffers still reach the encoder untouched. Measured on the board (720p30 camera, Chrome on the far side of a 600 kbit/s policer): the stream stays 1280x720 and settles at 15 fps, mediad logs no negotiation error, and the kernel stays clean. Assisted-by: Claude:claude-opus-5-5
Coverage73.87% lines on this branch, against a floor of 70%. Per-file |
This branch has not been 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.
webrtcsink's default mitigation lowers the resolution below 2 Mbps, which puts a software
videoscalein front ofmpph264enc. A system-memory frame intompph264encis the path that oopsed the board kernel twice; the camera's own buffers are safe. Withenable-mitigation-modes=downsampled, a weak link only costs frame rate (videoratedrops frames), so the camera buffers still reach the encoder untouched.Pairs with pollen-robotics/microduck_yocto#59, which lets webrtcsink scale again (the patched plugin had an
identitythere, so downscaling failed to negotiate).Tested on the Zero 3W with that bundle and this change on top of 0.17.8: Chrome behind a 600 kbit/s policer kept 1280x720 and settled at 15 fps, no negotiation error, kernel clean. 117 mediad tests pass.
Note:
cargo clippy -D warningsfails on Rust 1.99 for reasons already onmain(fetch_updatedeprecated inpipeline.rs/stream.rs, single-element loop atpipeline.rs:2393), not from this change.馃 Generated with Claude Code