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

vp8/encode: optimizations and target_bitrate fix #2936

Merged
merged 4 commits into from
Mar 6, 2024
Merged

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Mar 1, 2024

No description provided.

@sreimers sreimers added this to the v3.11.0 milestone Mar 1, 2024
@juha-h
Copy link
Collaborator

juha-h commented Mar 1, 2024

Yesterday I build my Android baresip app with the latest vpx libs. When I made tests against Debian baresip, I noticed that with vp9 calls worked fine, but not with vp8. On Debian, no video window shows up and console reports lots of these:

Set video encoder: VP8  (1000000 bit/s, 15.00 fps)
Set video decoder: VP8 
v4l2: /dev/video0: found valid V4L2 device (960 x 540) pixfmt=YUYV
v4l2: Current input: "Camera 1"
v4l2: current framerate is 15.00 fps
video tx pipeline:       v4l2 ---> selfview_pip ---> snapshot ---> VP8
video rx pipeline:        x11 <--- selfview_pip <--- snapshot <--- VP8
audio: Set audio decoder: opus 16000Hz 1ch
stream: Enable RTP timeout (60000 milliseconds)
stream: Enable RTP timeout (60000 milliseconds)
test@test.tutpro.com: Call established: sip:bar@test.tutpro.com
jbuf: drop 1 old frame seq=3636bit/s) efps=0.0/0.0    
jbuf: drop 1 old frame seq=3637
jbuf: drop 1 old frame seq=3638
jbuf: drop 1 old frame seq=3639
jbuf: drop 1 old frame seq=3640
jbuf: drop 1 old frame seq=3641
...

jbuf settings were the same in both tests:

video_jitter_buffer_type adaptive
video_jitter_buffer_delay 1-50
jitter_buffer_wish	6

Could this issue have something to do with this PR?

@sreimers
Copy link
Member Author

sreimers commented Mar 1, 2024

Looks like the max. packets within jitter buffer is to small. Try to increase:

video_jitter_buffer_delay 1-200

@juha-h
Copy link
Collaborator

juha-h commented Mar 2, 2024 via email

@sreimers
Copy link
Member Author

sreimers commented Mar 2, 2024

That helped, but wondering why only VP8 has the problem.

This can be related to the wrong bitrate calculation.

@sreimers sreimers changed the title vp8/encode: cbr optimizations and target_bitrate fix vp8/encode:optimizations and target_bitrate fix Mar 3, 2024
@sreimers sreimers changed the title vp8/encode:optimizations and target_bitrate fix vp8/encode: optimizations and target_bitrate fix Mar 3, 2024
@sreimers sreimers force-pushed the libvpx_bitrate_fix branch 2 times, most recently from 62d649f to 8a23dee Compare March 5, 2024 14:33
@sreimers sreimers marked this pull request as ready for review March 5, 2024 17:02
@sreimers sreimers merged commit f337652 into main Mar 6, 2024
18 checks passed
@sreimers sreimers deleted the libvpx_bitrate_fix branch March 6, 2024 16:09
@juha-h
Copy link
Collaborator

juha-h commented Mar 7, 2024

I tried again after this was merged and now jbuf: drop 1 old frame messages are gone. Thanks.

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.

None yet

2 participants