flathub / com.dec05eba.gpu_screen_recorder

https://flathub.org/apps/details/com.dec05eba.gpu_screen_recorder
14 stars 4 forks source link

[Feature request] More Control over Bitrate Options #141

Closed WesleyFister closed 2 months ago

WesleyFister commented 2 months ago

Normally I don't have a problem with variable bitrate but in this case it's overzealous in low information scenes/areas. For reference this is the command I use. flatpak run --command=gpu-screen-recorder com.dec05eba.gpu_screen_recorder -w screen -f 60 -r 600 -k h265 -a "$(pactl get-default-sink).monitor" -a "$(pactl get-default-source)" -ac opus -fm cfr -q ultra -v no -c mkv -cr limited -o ~/Videos

What I see: Screenshot from 2024-08-16 15-48-07 Screenshot from 2024-08-16 15-48-20 Screenshot from 2024-08-16 15-48-28

What was recorded: mpv-shot0001 mpv-shot0002 mpv-shot0003

https://github.com/user-attachments/assets/eceea083-d967-48a6-8820-b3e3d3f70e9c

In the game there is banding when looking at the sky but it is hard to notice and has smoother lines. In the recording it is WAY more apparent and is jagged. The horizon is blurry as well.

I suggest that there should be an option to allow the user to specify minimum and maximum bitrate for variable bitrate and an option for constant bitrate.

dec05eba commented 2 months ago

different video encoders and gpu have different methods for selecting quality and its multiple parameters, it's not as simple as selecting a bitrate. gpu screen recorder doesn't actually set bitrate at all. I may have an option to make the quality range higher later on, but in the case of banding its mostly not a bitrate issue, its a color range issue. You can decrease the banding by choosing -cr full (note that vlc cant play that correctly, mpv can if you have it set up correctly) and when I add 10-bit encoding then that will also reduce banding. Note that these changes to quality wont matter if you upload it to youtube or another site later on as youtube changes the color range to limited and 10-bit video to 8-bit (except for HDR videos).

dec05eba commented 2 months ago

Here is an example of that. Here is a screenshot of a gradient to see how it's supposed to look like: screenshot_banding and here is what 8 bit encoding with limited color range looks like (the option you are using): 8bit_video_limited_color_range_banding and here is what 10 bit encoding with full color range looks like: 10bit_video_full_color_range_banding these last two images are a screenshot of the video, both recording at the same quality (bitrate).

WesleyFister commented 2 months ago

Oh man. I can't unsee the banding now on YouTube.

I tried setting the color range to full earlier and it didn't seem to reduce the banding. I did play it with mpv but I'm not sure if it was setup incorrectly as you say.

In truth the banding was only part of the problem. It just shows the artifacting you get with low bitrate. The lines are not smooth and are instead jagged/blocky. This is seen in the first picture as well. In still image or slow scenes I've seen the bitrate drop as low as 119kbps! Artifacts immediately become apparent. This is with OBS VAPPI HEVC CBR 50,000kbps. Banding is even more obvious but the banding lines themselves aren't so jagged. mpv-shot0001

You said the encoder handles the quality level. The problem is that it is very willing to quickly drop the bitrate down to ~200kbps. It would be nice if this could be addressed or if the user had more control and could use VBR or CBR at a specified bitrate.

dec05eba commented 2 months ago

I wont add an option to select those quality options right now, I might do that in the future. I'll add that to my TODO list. Right now I increased the quality (qp) and added 10 bit option which will reduce this issue a lot: https://github.com/flathub/com.dec05eba.gpu_screen_recorder/pull/142 but also in general I dont accept feature requests as stated here: https://git.dec05eba.com/?p=about . If people want a feature they will have to contribute it themselves right now.

WesleyFister commented 2 months ago

Ah, sorry about that. I'll keep that in mind for the future. Hopefully, setting a better qp solves the extremely low bitrate problem in some scenes. This is a fantastic app, my only real issue with it is the fact that video quality can be all over the place sometimes.