Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitrate fix #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Bitrate fix #7

wants to merge 1 commit into from

Conversation

MarioFPVdev
Copy link
Contributor

This small fix fixes the incorrect video bitrate.
By default the Majestic has 1200 Bytes NAL Size stream. This means every pkt received by Radxa is 1200 Bytes, NOT 1024 Bytes. So for example on MCS3 if we have a video stream of 2700 pkt/s the video bitrate is: (270012008)/1024/1024=25Mbps
To confirm the video stream run wfb-cli gs on the Radxa to monitor the packets received.

This small fix fixes the incorrect video bitrate.
By default the Majestic has 1200 Bytes NAL Size stream.
This means every pkt received by Radxa is 1200 Bytes, NOT 1024 Bytes.
So for example on MCS3 if we have a video stream of 2700 pkt/s the video bitrate is:
(2700*1200*8)/1024/1024=25Mbps
To confirm the video stream run wfb-cli gs on the Radxa to monitor the packets received.
@@ -108,9 +108,9 @@ void modeset_paint_buffer(struct modeset_buf *buf) {
}
avg_bw = avg_bw / avg_cnt;
if (avg_bw < 1000) {
sprintf(msg, "%.2f Kbps", avg_bw / 125 );
sprintf(msg, "%.2f Kbps", avg_bw / 75 );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's incorrect, the average bandwidth is bytes/second so 125 or 125000 is the right value.
Where is 75 is coming from?

avg_bw is populated from frame->size() which is an array of uin8_t (= a byte).
https://github.com/gehee/FPVue_rk/blob/main/main.cpp#L373

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