Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#9781 | Link | |
Registered User
Join Date: Aug 2024
Posts: 583
|
Quote:
![]() Code:
import vapoursynth as vs core=vs.core i=core.imwri.Read('a.png').resize.Bicubic(format=vs.YUV420P8,matrix=1) f1=core.std.BlankClip(i,color=[16,16,16]) f1=core.std.Merge(i,f1,0.9) f2=i f3=f2.std.FlipHorizontal() clip=f1*30+f2*9+f3*30 #69 clip.set_output() Example encoding commandline: Code:
vspipe aa.vpy -c y4m - | x265 --input - --y4m -b0 -o aa.265 (Again this does not mean the bug will only be triggered when bframes=0) I guess most images will work, but you can use this lovely nostalgic wallpaper: ![]() A patch was submitted: https://mailman.videolan.org/piperma...ay/014363.html and you can see the process of figuring out the fix at https://github.com/Mr-Z-2697/x265-ex...e/E-2025-05-12 Last edited by Z2697; 12th May 2025 at 23:46. |
|
![]() |
![]() |
![]() |
#9782 | Link | ||
Lost my old account :(
Join Date: Jul 2017
Posts: 374
|
Quote:
Quote:
Last edited by excellentswordfight; 13th May 2025 at 08:40. |
||
![]() |
![]() |
![]() |
#9783 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 5,031
|
Quote:
It's somewhat more complex as AVX-512 also came with some better permute instructions and such that could allow for more efficient algorithm design, as did ARM's SIMD for bigger registers. How much improvement could be gained via better instructions versus just more width is highly architecture and algorithm dependent. |
|
![]() |
![]() |
![]() |
#9785 | Link | |
Registered User
Join Date: Jan 2025
Posts: 74
|
Quote:
Specify an upper limit to the rate factor which may be assigned to any given frame (ensuring a max QP). This is dangerous when CRF is used in combination with VBV as it may result in buffer underruns. Default disabled --crf-min <0..51.0> Specify a lower limit to the rate factor which may be assigned to any given frame (ensuring a min compression factor).
__________________
Main Systems:- Threadripper 7970X on Asus Pro WS TRX50-Sage WiFi Ryzen 9 9950X3D on MSI Carbon X670E Ryzen 9 7950X on Gigabyte Aorus Elite B650 Intel 13900KF on MSI Tomahawk B660 |
|
![]() |
![]() |
![]() |
#9786 | Link |
Registered User
Join Date: Aug 2024
Posts: 583
|
While qpmax is "global", crfmax is only effective when used together with VBV (and of course CRF itself, hence CRF + VBV aka "capped CRF").
BTW, Read The Manual. BTW (A huge one) VBV is non-deterministic (when it's engaged), VBV + const-vbv is deterministic (without significant quality drawback, if any, it's hard to do comparison because of the non-deterministic), but const-vbv is not enabled by default. VBV + const-vbv + qpmax/crfmax (when "hit" by) + rskip=1 is non-deterministic again, use rskip=0 or 2 with this combination makes it deterministic again. I guess that's related to how rskip=1 is doing skip decision using the RD cost, with 0 you don't skip and 2 is using edge density, which is independent from the RD stuff. Last edited by Z2697; 18th May 2025 at 22:56. |
![]() |
![]() |
![]() |
#9789 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,257
|
The "rate factor" is a codec-specific internal metric of the HEVC algorithm, a kind of magnitude of difference between the original video and the reconstructed video, just calculated during the lossy compression, without actually reconstructing and subtracting. You may imagine the codec adding details to a coarse encoding result until a threshold of quality is passed. But the RF may vary for different GOP frame types (e.g. B frames may have a slightly bigger RF than P frames than I frames due to a dependency hierarchy) or due to an encoding mode trying to achieve a less variable bitrate for streaming instead of archival use or VBV restrictions. The two mentioned parameters force the RF in an explicit range and overrule the optimal RF calculated by quality or bitrate based decisions.
I bet Ben "Video Kenobi" Waggoner knows a lot more than me about that... Last edited by LigH; 18th May 2025 at 16:23. |
![]() |
![]() |
![]() |
#9790 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,967
|
Quote:
I mean: I know that even setting a CRF, the bitrate can fluctuate a lot but I can't understand if there are no restraints but the vbv values. In a few words: imposing qp-min and max gives less or more "freedom" to x265 encoder?
__________________
@turment on Telegram |
|
![]() |
![]() |
![]() |
#9791 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,257
|
I believe to remember that some Presets / Tunings may limit the RF range. A maximum of 51 may be counterproductive to some uses. Don't count on me here, I would have to search the sources to be sure.
|
![]() |
![]() |
![]() |
#9792 | Link | |
Registered User
Join Date: Aug 2024
Posts: 583
|
Quote:
(IDK how crf-min will work because... does VBV also increase bitrate?(apart from the "decrease over limit bitrate" we all know it does) otherwise why should we worry about minimum RF anyway?(I'm reluctant to call it CRF(constant rate factor) because it's certainly not constant anymore unless the limit is so high that it's never touched)) Last edited by Z2697; 18th May 2025 at 23:07. |
|
![]() |
![]() |
![]() |
#9793 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 5,031
|
Quote:
qp-max will cap the maximum compression. I've never used it myself for anything. I'd be wary of it, because the encoder could get into states where it couldn't maintain VBV if qp-max is too low. |
|
![]() |
![]() |
![]() |
#9794 | Link |
Registered User
Join Date: Aug 2024
Posts: 583
|
VBV in x265 and x264 is a mess, and can well blow up quite easily (in x264 it's a little better, but still awful), I'd suggest stay away from it, especially as a way of reducing file size, unless you are limited by some target device and/or transmitting media (e.g. bluray)
("blow up" in image quality, the buffer itself is not that easy to break) |
![]() |
![]() |
![]() |
#9795 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 5,031
|
Quote:
Hence 2-pass, lookahead rate control, and lots of other mechanisms to maintain optimal quality with VBV on. |
|
![]() |
![]() |
![]() |
#9796 | Link | ||
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 5,031
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#9797 | Link |
Registered User
Join Date: Feb 2007
Location: Sweden
Posts: 495
|
x265 v4.1+168-1e993ee
https://www.mediafire.com/file/aru29lv3c52vhmr
__________________
Do NOT re-post any of my Mediafire links. Download & re-host the content(s) if you want to share it somewhere else. |
![]() |
![]() |
![]() |
#9798 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,257
|
VBV does not only limit a maximum bitrate. In case of optical media it also limits a minimum bitrate because reading too slowly may cause loss of tracking, and filling the decoding buffer with more than one GOP causes the "buffer underrun"...
|
![]() |
![]() |
![]() |
#9799 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 5,031
|
Quote:
As is streaming to a lesser degree. People who just encode files for local playback don't know how easy they have it ![]() |
|
![]() |
![]() |
![]() |
#9800 | Link | |
Registered User
Join Date: Feb 2022
Posts: 190
|
Quote:
Tracking is guaranteed at all time with the usual PMT, PAT and PSI repetitions in the transport stream. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|