Skip to content

WhepExample receive videoFrame too slow #237

@skill7899

Description

@skill7899

Describe the bug

if (track instanceof VideoTrack vTrack) {
            vTrack.addSink(videoFrame -> {
                System.out.println("Received video frame: " + videoFrame);

                // IMPORTANT: Always release the frame when done to prevent memory leaks
                videoFrame.release();
            });
        }

here println 15FPS
My hypothesis is that the latency stems from slow callback processing on the C++ side. Since CPU utilization is low, we should investigate potential inefficiencies in the C/C++ code.

To Reproduce
Steps to reproduce the behavior:
i test
https://github.com/devopvoid/webrtc-java/blob/main/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/WhepExample.java

ffmpeg push video to srs 25FPS
WhepExample pull video from srs
but WhepExample println 15FPS

Expected behavior
java code recevie 25fps

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions