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
Describe the bug
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