marissa999 / decky-recorder

Other
66 stars 7 forks source link

[Discussion] Is there a way to make it use less computational ressources? #38

Closed mdPlusPlus closed 1 year ago

mdPlusPlus commented 1 year ago

If I'm not mistaken the magic happens here: https://github.com/marissa999/decky-recorder/blob/aa6b3587db513f41a5aefe2efe2108a7acc80181/main.py#L101-L114

So, we're using gst-launch-1.0 to grab the video stream via pipewiresrc and encode it with vaapih264enc.
I'm not sure what vaapipostproc is doing exactly, tbh.

However, vaapih264enc has several options to influence video quality: https://gstreamer.freedesktop.org/documentation/vaapi/vaapih264enc.html?gi-language=python
Mainly things like bitrate and quality-level, but others as well.

Has any effort been put into testing out these parameters and their influence on the required ressources and the quality of the video output yet?
As far as I can tell it is running with the default parameters and if the documentation is to believed, that means it's using quality-factor=26 [link] and quality-level=4 [link], which are probably the most important parameters.
Since filesize isn't that important for 30 seconds clips, I'd argue increasing the quality-level (less quality, faster encode, bigger filesize) could alleviate some of those ressource bottlenecks during gameplay and still grant acceptable results.

Keep in mind I haven't tested any of this yet.

safijari commented 1 year ago

Good ideas here. I would also be interested in shrinking file size especially for replay mode.

I can't get to this right now but if you wanna test these go right ahead. We recently made development simpler and in line with the decky plugin template. You can hit me up on Discord if you have questions or need help.

mdPlusPlus commented 1 year ago

Did you close this due to inactivity or has anything been implemented?

mdPlusPlus commented 10 months ago

@safijari Has this been implemented in your fork?