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

Match framerate in DefaultVideoFrameProcessorPipeline with input stream #3028

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

shi-su
Copy link
Contributor

@shi-su shi-su commented Dec 20, 2024

Issue #:

Description of changes:
In DefaultVideoFrameProcessorPipeline the framerate is set as 15 fps. As a result, once video frame processor is applied, video framerate will be capped at 15 fps even if input fps is higher. This change matches this framerate with input video stream.

Testing:
Smoke tested and verified video fps matches input stream after applying a video filter.

Can these tested using a demo application? Please provide reproducible step-by-step instructions.

  1. Start a call and add an attendee with 30 fps video;
  2. Start video and verify video framerate is 30 fps;
  3. Apply background background blur and verify video framerate is still 30 fps (actual framerate may be about 3 fps lower due to video frame processing).

Checklist:

  1. Have you successfully run npm run build:release locally?
    y

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved?
    n

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved?
    n

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@shi-su shi-su requested a review from a team as a code owner December 20, 2024 20:08
@@ -144,6 +144,7 @@ export default class DefaultVideoFrameProcessorPipeline implements VideoFramePro
this.inputVideoStream = inputMediaStream;
const settings = this.inputVideoStream.getVideoTracks()[0].getSettings();
this.logger.info(`processing pipeline input stream settings ${JSON.stringify(settings)}`);
this.framerate = settings.frameRate;
Copy link
Contributor

Choose a reason for hiding this comment

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

This does have a 'surprise' performance impact to any customers with input > 15 FPS currently using the pipeline. But i think, at least with V2 bblur pipeline (assuming that is the main usage of this code) that the increase is reasonable, and this is a more 'expected' behavior.

@ltrung ltrung merged commit a3093f2 into main Jan 6, 2025
11 checks passed
@ltrung ltrung deleted the filter-fps branch January 6, 2025 17:09
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.

3 participants