Skip to content

Encoder Pace setter / Traffic Shaper based on remaining free WiFi Tx_buffer free slots#450

Open
tipoman9 wants to merge 1 commit intosvpcom:masterfrom
tipoman9:pr_branch
Open

Encoder Pace setter / Traffic Shaper based on remaining free WiFi Tx_buffer free slots#450
tipoman9 wants to merge 1 commit intosvpcom:masterfrom
tipoman9:pr_branch

Conversation

@tipoman9
Copy link
Contributor

This is intended to work with this patch libc0607/rtl88x2eu-20230815#15
Integrated a reactive Traffic Shaper into the data_source loop to enforce physical-layer pacing. The logic prevents lost Tx packets by stalling the injection process when the WiFi driver's hardware transmission buffers are near saturation.
When unix sockets are used to feed data to wfb_tx, this propagates back to the video encoder and makes it decrease the output bitrate (usually by simply dropping frames)
This will work only if mmaps on /dev/wifi_tx_buffer_free_frames device on startup succeeds, the latter would be exposed only if a patched driver is used with a module param ShareTxBufLen = 1
Added a new counter count_p_wait_tx_buffer to the IPC_MSG stats. This allows real-time monitoring of how many times the shaper had to intervene, which is critical for tuning encoder bitrates.

If you feel this logic doesn't align with the core goals of wfb-ng, I completely understand. In that case, we can simply apply it as a patch during the OpenIPC firmware build process instead.

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