Bug 357153 - Increasing "Video quality" number in render panel actually reduces quality + increases compression
Summary: Increasing "Video quality" number in render panel actually reduces quality + ...
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-25 17:13 UTC by Kubuntiac
Modified: 2022-01-23 00:36 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
fritzibaby: timeline_corruption+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kubuntiac 2015-12-25 17:13:29 UTC
When using at least some output codecs, increasing the "video quality" number actually does the reverse, instead ramping up compression (and lowering video quality).

Reproducible: Always

Steps to Reproduce:
1. Place a sample video clip on the timeline
2. Choose render > MP4 > H265 HEVC and render
3. Increase the "video quality" number and render again

Actual Results:  
Video quality is degraded, and the file size decreases

Expected Results:  
Video quality increases along with the file size

While this is fairly simple, it still managed to take quite a lot of time out of my day, as I experimented with different codecs and higher and higher quality settings to try and improve the quality, before I realized it was doing the opposite of what was expected.
Comment 1 Jean-Baptiste Mardelle 2015-12-25 20:42:08 UTC
Yes, the "less is better" logic comes from FFmpeg, where several quality parameter use a scale where 0 is the best possible quality and higher numbers degrade the quality.

I totally agree that this is highly counter-intuitive.

We plan to redesign the rendering widget to provide better defaults and a cleaner interface, and this issue should be handled by the redesign.
Comment 2 Unknown 2015-12-27 20:09:08 UTC
Thanks for pointing that out. And @JB, that's great to know about the changes in the render widget.
Comment 3 Kubuntiac 2015-12-27 20:15:44 UTC
The other thing that makes this even more confusing is that it seems that for some codecs a higher number is better, while for others a lower number is, but the only hint the user is given is the label of the widget. Even if it was labelled "Compression level" instead of "Video quality" it would make more sense (as one assumes that a higher number for compression equals lower size and quality).

I totally understand though about waiting for the redesign.

I'm also hoping that the redesign will make it easier to render to an arbitary set size / framerate / codec etc, instead of just using presets. For reference, the latest Pitivi does a good job with this in their render dialogue.
Comment 4 qubodup 2015-12-29 16:45:10 UTC
@Jesse if is there a way to contribute to the redesign for example by:
- Making a list of usability issues surrounding the render widget
- Reading a list of issues and making visual mockups of possible solutions
- Something else?
then please let us know how and where (mailing list, this ticket, another ticket, forum...)
Thanks!
Comment 5 Paul Konecny 2016-03-29 10:37:01 UTC
I reported the issue to Vincent when he did the initial rewrite (around the time of Cafe#2 I think)
and he changed the behaviour to correctly handle crf codecs because of that.
The problem is that codecs using a constant rate factor (crf), such as HEVC, VP9 or H.264, increase quality with a decreasing crf value (inverse logarithmic quality curve).
Codecs with a fixed bit rate increase quality with analogue to the bit rate value. 
At first crf codecs were handled like fixed codecs so increasing the value decreased quality dramatically and Vincent fixed that which is the behaviour that confused you. 

In my opinion it would be best to indicate what is changed when a certain codec is selected. 
For instance, when a codec using crf is detected show a text field reading "CRF:" before the Video value. 
On the other hand when a codec with a fixed bitrate is selected show "MBit/s:" instead. 
Cheers!
Comment 6 Evert Vorster 2016-04-21 13:37:34 UTC
Just a side comment here. 
With the slider now being the default, it's much less confusing. As a possible UI enhancement, we can either say: "less is better quality" in a tooltip, or maybe put arrows over the slider:

<== smaller, less quality ------- Bigger, better quality ======>
--------------------------------------------------------------------------------------
|##############                                                                    |
--------------------------------------------------------------------------------------

The way I think about it: The quality number is dB of loss that is acceptable.
Comment 7 Wegwerf 2016-08-12 15:54:10 UTC
Bump: the quality slider in itself is still confusing, as it doesn't tell its users whether left is better, or right is better (no pun on elections intended). I would like to suggest improving the existing "Quality" label and adding another label to the far end of the slider, such as:

Quality: smaller file <-----o--> better quality
Comment 8 Paul Konecny 2016-10-06 08:48:30 UTC
^This. 
And we have to be careful to wire the slider up differently for CRF and fixed bitrate codecs (FBR) respectively. 
CRF: Slider to better quality --> decrease CRF parameter in command line.
FBR: Slider to better qulaity --> increase Bitrate parameter in command line.
Comment 9 Alex 2021-05-03 05:18:58 UTC
As of 21.04.0, this is still a little confusing, but at least the basic view (with "More options" unchecked") is pretty intuitive, because the Quality slider is just "higher slider = higher quality". And this slider persists in the advanced view. I agree with the above comments though, "smaller file" on one end of the slider, and "better quality" on the other end is easier to understand.
Comment 10 Bug Janitor Service 2022-01-22 19:11:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/kdenlive/-/merge_requests/271
Comment 11 Julius Künzel 2022-01-23 00:36:09 UTC
Git commit d6910eacb8cda27adaf63afcec76e3391da4b2b7 by Julius Künzel, on behalf of Farid Abdelnour.
Committed on 23/01/2022 at 00:35.
Pushed by jlskuz into branch 'master'.

Try to improve alpha render quality

Should fix bad quality renders in videos with alpha profile.

Fixes #1075 
Related: bug 436879, bug 430093

M  +4    -6    data/profiles.xml

https://invent.kde.org/multimedia/kdenlive/commit/d6910eacb8cda27adaf63afcec76e3391da4b2b7