Description of problem or question:
Hello developers,
I have a question, whether it would be possible to add a certain function. At the moment I use QSV because I find the topic very exciting, but the "QP" method is useless for my purposes because there is no option to define the maximum bit rate. The problem is that there are scenes in films or series in which the bit rate increases to 100Mbits or even 300Mbits (example HBO intro, where the logo is faded in with the oldschool noise). My best option so far is the VBR method, but I always have to appreciate it.
Now to my question. Is there a possibility, if necessary, of having the value determined by yourself? I thought that you might enter a percentage value, such as 60%. When you start the encode, the video bit rate is somehow analyzed and displayed in the log. Wouldn't it be possible afterwards to dynamically enter 60% of the value of the VBR value with a small method?
The background is that you have, for example, a series with 13 episodes, but the average bit rate is different everywhere. It is possible that sequence 1 is 8000 kbits and sequence 2 is only 3500 kbits. If I now enter 5000 kbits as the value for all episodes, that's unfortunately stupid because some episodes are larger than the source in the end.
As I said before, the QP method would be perfect, but it's kind of buggy. 80% of the film or series works as it should, but the outliers cause serious problems, so that playback is no longer possible or the entire video even breaks off and my player gets stuck.
Therefore two options would make sense. Either to have the average bit rate calculated dynamically with percent, so that the output file is never larger, or with the QP method, somehow build in a possibility to limit the maximum bit rate.
Best Regards
[QSV] - VBR Feature Request / QP Max Bitrate Limit
-
- Posts: 14
- Joined: Wed Aug 11, 2021 9:59 am
Re: [QSV] - VBR Feature Request / QP Max Bitrate Limit
A percentage with pre-analysis of... whatever... isn't going to happen.
vbv limits may be possible if the encoder supports them.
vbv limits may be possible if the encoder supports them.
-
- Posts: 14
- Joined: Wed Aug 11, 2021 9:59 am
Re: [QSV] - VBR Feature Request / QP Max Bitrate Limit
Perhaps a developer can give feedback on whether a limitation of the maximum bitrate is possible with the QP method or explain how these high bit rates arise in certain scenes or how i can avoid them.
- JohnAStebbins
- HandBrake Team
- Posts: 5726
- Joined: Sat Feb 09, 2008 7:21 pm
Re: [QSV] - VBR Feature Request / QP Max Bitrate Limit
As mduell pointed out, the best way to control bitrate spikes when using a quality metric for encoding is through vbv-maxrate and vbv-bufsize settings. These settings are specifically designed for this purpose. QP (like RF) will not limit bitrate. QP is a quality metric. The encoder will apply whatever bitrate is necessary to achieve that metric unless some other setting (like VBV) prevents it.
Encoder "level" can also be used to indirectly set VBV values. For h.264 a table of the VBV values applied for a give level can be found here https://help.encoding.com/knowledge-bas ... 64-levels/
For x264, documentation of these settings can be found here http://www.chaneru.com/Roku/HLS/X264_Settings.htm
Encoder "level" can also be used to indirectly set VBV values. For h.264 a table of the VBV values applied for a give level can be found here https://help.encoding.com/knowledge-bas ... 64-levels/
For x264, documentation of these settings can be found here http://www.chaneru.com/Roku/HLS/X264_Settings.htm
Re: [QSV] - VBR Feature Request / QP Max Bitrate Limit
OP is using QSV, not x264.JohnAStebbins wrote: ↑Tue Oct 19, 2021 1:58 pmFor x264, documentation of these settings can be found here http://www.chaneru.com/Roku/HLS/X264_Settings.htm
- JohnAStebbins
- HandBrake Team
- Posts: 5726
- Joined: Sat Feb 09, 2008 7:21 pm
Re: [QSV] - VBR Feature Request / QP Max Bitrate Limit
QSV does support VBV, but sadly not in combination with CQP nor ICQ (QSV's CRF-like rate control), unless it changed recently.
https://handbrake.fr/docs/en/latest/tec ... o-qsv.html
I don't think x264/x265 support CQP+VBV either, but CRF+VBV is indeed an option there.
https://handbrake.fr/docs/en/latest/tec ... o-qsv.html
I don't think x264/x265 support CQP+VBV either, but CRF+VBV is indeed an option there.
-
- Posts: 14
- Joined: Wed Aug 11, 2021 9:59 am
Re: [QSV] - VBR Feature Request / QP Max Bitrate Limit
I think it's a shame but also a very big problem at the same time. That's why I asked for a "method" that can pass the bitrate as an average percentage as a parameter in the GUI. If there is no other option, ICQ is unfortunately not an option for me if the bitrate is sometimes 10 times greater than in the original file. I mean, is this a mistake in the analysis or how can this happen?
- JohnAStebbins
- HandBrake Team
- Posts: 5726
- Joined: Sat Feb 09, 2008 7:21 pm
Re: [QSV] - VBR Feature Request / QP Max Bitrate Limit
The compression algorithm knows nothing about the bitrate or quality of the original file. In fact, the original file is uncompressed before being passed to the encoder. The encoder sees only raw uncompressed frames. Strongly compressed frames often have compression artefacts that do not re-compress well. I.e. the encoder will try to preserve those artefacts. Compression artefacts do not conform well to the models used by the encoder that try to predict what a more natural scene would look like and how it might evolve over a sequence of frames. So, if you are using a higher quality metric than the original file was encoded with, the encoder is going to be preserving more detail than was actually present in the compressed video.JustEncode wrote: ↑Wed Oct 20, 2021 2:20 pm I mean, is this a mistake in the analysis or how can this happen?