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

Allow downscaling resolution of video recording #77

Closed
maximbaz opened this issue Mar 21, 2020 · 8 comments · Fixed by #133
Closed

Allow downscaling resolution of video recording #77

maximbaz opened this issue Mar 21, 2020 · 8 comments · Fixed by #133

Comments

@maximbaz
Copy link

When I record my 4k screen to video4linux2, wf-recorder uses 100% CPU. I want to record full screen, but I'm willing to sacrifice resolution, and record it in Full HD, if that helps reducing CPU usage. If I record a part of the screen of 1920x1200 resolution, wf-recorder only consumes ~25% CPU. I'd like to be able to tell wf-recorder to record full screen but downscale it to Full HD, so that hopefully CPU usage is not that high.

@ammen99
Copy link
Owner

ammen99 commented Mar 21, 2020

I think you are already aware of https://github.com/schauveau/wf-recorder-x. I do not know why the person who wrote that code there hasn't opened PRs to merge his work.

@schauveau Any plans for bringing your work to upstream?

@maximbaz
Copy link
Author

Yes, I wanted to try that project but sadly it was forked before streaming to v4l2loopback was implemented, and quick attempt to rebase on master failed with some conflicts (I didn't loop much into it).

@ammen99
Copy link
Owner

ammen99 commented Mar 21, 2020

One workaround is to just lower the resolution of your screen. I know this isn't ideal but since you're already sacrificing on quality ...

@maximbaz
Copy link
Author

Good point, and this reduced CPU usage to 50%

@varac
Copy link

varac commented Nov 19, 2020

@ammen99: Can you think of any other possible CPU load improvement besides reducing screen resolution ?

@soreau
Copy link
Collaborator

soreau commented Nov 19, 2020

@varac You can use the gpu to encode the video using vaapi. Refer to the README for more information.

@ammen99 ammen99 mentioned this issue Jan 1, 2021
@truesilver92
Copy link

If we change the scope of the project to just being an ffmpeg input device then you will already have this capability as an ffmpeg filter #139

@hholst80
Copy link

In case anyone runs across this issue the solution is this (no need to use the fork):

Suppose i have a 4k source and want to save the recording in full 1080p:

wf-recorder -f test-vaapi.mp4 -c h264_vaapi -a -F scale_vaapi=format=nv12:w=1920:h=1080

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 a pull request may close this issue.

6 participants