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. |
19th November 2019, 17:24 | #7201 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
While encoding 4K content might take only 2x the bitrate as 1080p, doing grain is much more linear. 80 Mbps 4K is only twice that of Blu-ray 1080p. There are cases of grain that is quite literally impossible to encode without perceptible artifacts. Heck, just encoding a flat gray slide with JUST grain on it can be very challenging. And that grain, even in lossless, can be quite distracting to a viewer. There's certainly way more fine detail grain on the Blade Runner Blu-ray than Ridley Scott ever saw when he was working on it, due to perf screens, dimmer projectors, etcetera. And in HDR, it's also way brighter grain than would have been seen before. One risk with SMPTE 2100 HDR is that any filters that assume gamma instead of linear light will do weird high contrast things in high luma, since the code values have much bigger jumps in luma than 709 gamma had. Conversely, low luma might not get enough filtering if processed assuming 709. |
|
20th November 2019, 11:50 | #7202 | Link |
Registered User
Join Date: Dec 2014
Posts: 240
|
i have a strange problem backuping my Hobbs and Shaw UHD... It has HDR10+ and when i extract HDR10+ metadata (tried all version of hdr10plus_parser, extracting from raw HEVC stream) and use it for encode mediainfo is like this...
source: Code:
Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2 Maximum Content Light Level : 1000 cd/m2 Maximum Frame-Average Light Level : 419 cd/m2 Code:
Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1 Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2 Maximum Content Light Level : 1000 cd/m2 Maximum Frame-Average Light Level : 419 cd/m2
__________________
AMD Ryzen 9 5950X, 32GB DDR4-3200 CL16, RTX 3060, 2TB NVMe PCIE4.0, NAS with 8x16TB HDD |
20th November 2019, 20:34 | #7203 | Link | |
Registered User
Join Date: Oct 2007
Posts: 385
|
Quote:
https://forum.doom9.org/showthread.php?t=175947&page=5 I think this happens when the hdr10+ json isn't quite right. Last edited by mini-moose; 20th November 2019 at 20:42. |
|
20th November 2019, 20:36 | #7204 | Link | |
Registered User
Join Date: May 2018
Posts: 49
|
Quote:
With very grainy animated sources, it's quite apparent that RDOQ exaggerates grain coarseness even at the default value of 1.0. It serves a purpose for sure (it's great at maintaining/approximating the motion), I'm just careful with it; it can make a right mess of flat scenes if the grain is intermittent. I've had really good results with CTU 64 and QG 64 in most animated content, grainy or otherwise. I can absolutely see why CTU 64 is the default; I don't find it to cause any difficulties whatsoever with grain retention. Quite the opposite. The curious thing with The Fog is that the bit rate falls drastically in the troublesome scenes. Seems like an authoring error. |
|
22nd November 2019, 02:52 | #7205 | Link |
Registered User
Join Date: Jan 2019
Location: Russia
Posts: 105
|
What about turning psy-rdoq off? It gives worse results than 0.5? And what values you use for grainy movies? I use psy-rd 2.0 psy-rdoq 1.2 for movies, but I'm still not sure about that, still looking for optimal values.
Last edited by redbtn; 22nd November 2019 at 02:55. |
23rd November 2019, 04:54 | #7206 | Link | |
Registered User
Join Date: May 2018
Posts: 49
|
Quote:
You'll have to experiment; most of my testing was done on grainy animation so I don't know how that plays out on live action. On the grainiest of animated content, my values are around Psy-rd 4.0, Psy-rdoq 0.20, AQ-strength 0.7, Deblocking -4:-1, Aq mode 1, CRF 19.5. You'll also need to get your deblocking strength down to around -4 (though -3 is often sufficient). The other values are somewhere in between the slow and slower preset but with rect disabled. Edit: If the source has extremely fine grain, more like dither, I've seen better results from disabling RDOQ entirely (Level 0) and pushing Psy-rd as high as 4.50. RDOQ just seems to make a mess; I don't know why. Edit 2: --selective-sao 1 is generally speaking safe enough for grain retention. Last edited by markiemarcus; 7th December 2019 at 15:24. |
|
23rd November 2019, 17:30 | #7207 | Link | |
Registered User
Join Date: Jul 2014
Posts: 115
|
Quote:
|
|
28th November 2019, 19:27 | #7208 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
What is going on here.
Using 2pass encoding: 1st pass: Code:
i:\Hybrid\64bit\ffmpeg.exe -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -vf scale=out_range=pc -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | i:\Hybrid\64bit\x265.exe --preset slow --log-level 2 --input - --output-depth 10 --y4m --profile main10 --ctu 32 --no-hme --merange 26 --no-rect --max-merge 2 --tskip --no-open-gop --opt-ref-list-length-pps --bframes 5 --rc-lookahead 40 --pass 1 --slow-firstpass --bitrate 4000 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --fast-intra --psy-rd 2.20 --psy-rdoq 1.20 --splitrd-skip --deblock=-2:-2 --selective-sao 2 --limit-sao --no-repeat-headers --range limited --colormatrix bt709 --stats "E:\Temp\result_new.stats" --output "E:\Temp\result_new.265" y4m [info]: 640x352 fps 25/1 i420p10 sar 1:1 unknown frame count raw [info]: output file: E:\Temp\result_new.265 x265 [info]: HEVC encoder version 3.2+15-04db2bfee5d6 x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x265 [info]: Main 10 profile, Level-3 (Main tier) x265 [info]: Thread pool created using 16 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 4 / wpp(11 rows) x265 [warning]: Source height < 720p; disabling lookahead-slices x265 [info]: Coding QT: max CU size, min CU size : 32 / 8 x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra x265 [info]: ME / range / subpel / merge : star / 26 / 3 / 2 x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00 x265 [info]: Cb/Cr QP Offset : -2 / -2 x265 [info]: Lookahead / bframes / badapt : 40 / 5 / 2 x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0 x265 [info]: References / ref-limit cu / depth : 4 / on / on x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1 x265 [info]: Rate Control / qCompress : ABR-4000 kbps / 0.60 x265 [info]: tools: limit-modes rd=4 psy-rd=2.20 rdoq=2 psy-rdoq=1.20 rskip x265 [info]: tools: splitrd-skip tskip signhide tmvp fast-intra x265 [info]: tools: strong-intra-smoothing deblock(tC=-2:B=-2) sao x265 [info]: tools: selective-sao stats-write x265 [info]: frame I: 3, Avg QP:6.61 kb/s: 6660.13 x265 [info]: frame P: 82, Avg QP:4.37 kb/s: 9294.05 x265 [info]: frame B: 344, Avg QP:8.83 kb/s: 2552.47 x265 [info]: Weighted P-Frames: Y:2.4% UV:1.2% x265 [info]: consecutive B-frames: 4.7% 0.0% 18.8% 7.1% 1.2% 68.2% encoded 429 frames in 11.25s (38.14 fps), 3869.80 kb/s, Avg QP:7.96 Code:
i:\Hybrid\64bit\ffmpeg.exe -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -vf scale=out_range=pc -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | i:\Hybrid\64bit\x265.exe --preset slow --log-level 2 --input - --output-depth 10 --y4m --profile main10 --ctu 32 --no-hme --merange 26 --no-rect --max-merge 2 --tskip --no-open-gop --opt-ref-list-length-pps --bframes 5 --rc-lookahead 40 --pass 2 --bitrate 4000 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --fast-intra --psy-rd 2.20 --psy-rdoq 1.20 --splitrd-skip --deblock=-2:-2 --selective-sao 2 --limit-sao --no-repeat-headers --range limited --colormatrix bt709 --stats "E:\Temp\result_new.stats" --no-dynamic-refine --refine-ctu-distortion 0 --output "E:\Output\result_new.265" raw [info]: output file: E:\Output\result_new.265 x265 [info]: HEVC encoder version 3.2+15-04db2bfee5d6 x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x265 [info]: Main 10 profile, Level-3 (Main tier) x265 [info]: Thread pool created using 16 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 4 / wpp(11 rows) x265 [warning]: Source height < 720p; disabling lookahead-slices x265 [error]: different scenecut setting than first pass (40 vs 40) x265 [error]: failed to open encoder[/code] x265 [error]: different scenecut setting than first pass (40 vs 40) 40 isn't 40 ?!? When using a FullHD samples the line with the warning disappears, but the error remains. Tried multiple sample, with different characteristics, error stays the same, so this does not seem to be source related. => Does anyone see that I did wrong, or is this a bug? Cu Selur |
28th November 2019, 19:45 | #7209 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Seems like 2pass is broken or I'm really overlooking something.
Even using a simple settings I end up with the 'different scenecut setting than first pass (40 vs 40)'-error. Code:
I:\Hybrid\64bit>ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | x265 --preset medium --input - --output-depth 10 --y4m --profile main10 --pass 1 --slow-firstpass --bitrate 1500 --range limited --colormatrix bt470bg --stats "E:\Temp\test_19_40_50_2910_01.stats" --output "E:\Temp\test.265" y4m [info]: 640x352 fps 25/1 i420p10 sar 1:1 unknown frame count raw [info]: output file: E:\Temp\test.265 x265 [info]: HEVC encoder version 3.2+15-04db2bfee5d6 x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x265 [info]: Main 10 profile, Level-2.1 (Main tier) x265 [info]: Thread pool created using 16 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 4 / wpp(6 rows) x265 [warning]: Source height < 720p; disabling lookahead-slices x265 [info]: Coding QT: max CU size, min CU size : 64 / 8 x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 3 x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00 x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2 x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0 x265 [info]: References / ref-limit cu / depth : 3 / off / on x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1 x265 [info]: Rate Control / qCompress : ABR-1500 kbps / 0.60 x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip signhide tmvp b-intra x265 [info]: tools: strong-intra-smoothing deblock sao stats-write x265 [info]: frame I: 3, Avg QP:13.44 kb/s: 3999.20 x265 [info]: frame P: 119, Avg QP:10.20 kb/s: 3036.26 x265 [info]: frame B: 307, Avg QP:14.84 kb/s: 782.98 x265 [info]: Weighted P-Frames: Y:0.8% UV:0.8% x265 [info]: consecutive B-frames: 2.5% 0.0% 58.2% 22.1% 17.2% encoded 429 frames in 10.47s (40.97 fps), 1430.51 kb/s, Avg QP:13.54 I:\Hybrid\64bit>ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | x265 --preset medium --input - --output-depth 10 --y4m --profile main10 --pass 2 --bitrate 1500 --range limited --colormatrix bt470bg --stats "E:\Temp\test_19_40_50_2910_01.stats" --output "E:\Temp\19_40_50_2910_03.265" y4m [info]: 640x352 fps 25/1 i420p10 sar 1:1 unknown frame count raw [info]: output file: E:\Temp\19_40_50_2910_03.265 x265 [info]: HEVC encoder version 3.2+15-04db2bfee5d6 x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x265 [info]: Main 10 profile, Level-2.1 (Main tier) x265 [info]: Thread pool created using 16 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 4 / wpp(6 rows) x265 [warning]: Source height < 720p; disabling lookahead-slices x265 [error]: different scenecut setting than first pass (40 vs 40) x265 [error]: failed to open encoder |
28th November 2019, 20:30 | #7210 | Link | |
Registered User
Join Date: Jan 2019
Location: Russia
Posts: 105
|
Quote:
Possible the same issue. |
|
28th November 2019, 22:09 | #7211 | Link |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
x265.exe 3.2+17-4a29e0c5bfaf
Download: http://www.mediafire.com/file/ieswxu...5bfaf.rar/file FWIW... Code:
In file included from D:/KOMPILES/MCW/x265/source/encoder/encoder.cpp:27: D:/KOMPILES/MCW/x265/source/encoder/encoder.cpp: In member function 'void x265::Encoder::destroy()': D:/KOMPILES/MCW/x265/source/common/common.h:222:37: warning: macro expands to multiple statements [-Wmultistatement-macros] 222 | #define X265_FREE_ZERO(ptr) x265_free(ptr); (ptr) = NULL | ^~~~~~~~~ D:/KOMPILES/MCW/x265/source/encoder/encoder.cpp:882:12: note: in expansion of macro 'X265_FREE_ZERO' 882 | X265_FREE_ZERO(m_edgePic); | ^~~~~~~~~~~~~~ D:/KOMPILES/MCW/x265/source/encoder/encoder.cpp:881:9: note: some parts of macro expansion are not guarded by this 'if' clause 881 | if(m_edgePic != NULL) | ^~ |
29th November 2019, 04:32 | #7212 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
found an issue about 2pass crashing (https://bitbucket.org/multicoreware/...ure-with-32-15)
-> scenecut-aware-qp=0 (default) fails scenecut-aware-qp=1 works hopefully they will fix this soon,.... |
30th November 2019, 17:44 | #7215 | Link |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
x265.exe 3.2+18-f0fe46ce379d
(64-bit, multilib, GCC 9.2.0) http://www.mediafire.com/file/bqmxz9...e379d.rar/file |
1st December 2019, 12:51 | #7216 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
Some new stuff there I see, has anyone made any tests? Once again there are no use cases available from the devs.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
3rd December 2019, 19:32 | #7217 | Link |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
Pooja Venkatesan committed a4e060a
2019-09-11 Add option hme-range to modify search range for HME levels L0, L1 and L2. https://bitbucket.org/multicoreware/...49f3ba8b63ac5a Download the .EXE from: http://msystem.waw.pl/x265/ |
7th December 2019, 14:08 | #7218 | Link |
Registered User
Join Date: Apr 2017
Posts: 63
|
Artifacts
those are my current parameters for 1080p encoding and I'll use between CRF 18 to 22, depending on the source material
--preset slow --vbv-maxrate 20000 --deblock=-6:-6 --no-strong-intra-smoothing --amp --aq-strength 1.25 --qcomp 0.7 --no-deblock --no-sao --rskip --output-depth 10 in general I get good results but once in a while there are artifacts, particular in dark areas, looking like this: (in this case it was CRF 22) two questions: any suggestions on improving my parameters in general? Is there a parameter which would improve in particular on that (besides a lower CRF value of course)? cheers, roland |
7th December 2019, 15:01 | #7219 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
--aq-mode 3 is meant to battle issues with dark areas of the frame. You may want to tune the strength down though, the bitrate will most likely shoot through the roof
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
7th December 2019, 15:20 | #7220 | Link | |
Registered User
Join Date: May 2018
Posts: 49
|
Quote:
Additionally, I have yet to see any real detail benefit to no-strong-intra-smoothing. I'd also avoid disabling deblocking and, if grain retention is still a priority, use some light deblocking instead. I've had good results with -4: -1 and -3: -3, with the former being slightly better IMO. --selective-sao 1 also seems to work well from my testing, subjectively better than disabling it entirely IMO. Last edited by markiemarcus; 7th December 2019 at 15:41. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|