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. |
29th March 2017, 21:24 | #5121 | Link | |
Registered User
Join Date: Jun 2016
Posts: 116
|
Quote:
Give the other options a try it'll be a little faster. Don't worry about max merge, ref 6 will improve the quality and ctu 32 & qg-size 16 will speed it up. Last edited by brumsky; 29th March 2017 at 21:39. Reason: Updated for clarifcation |
|
29th March 2017, 21:38 | #5122 | Link | |
Registered User
Join Date: Jun 2016
Posts: 116
|
Quote:
CTU 32 is absolutely faster than ctu 64 especially for non-AVX2 CPUs like the 3700 - hence why I asked what CPU he has. I never said qg-size has to be ctu/2. I said that is what I like to do. it is a compression\speed trade off. This is the first I've ever heard of ref > 4 can be over any level. The levels 4 & 4.1 are for other things like bitrates & resolutions. You're thinking of ref > 8 which the encoder generates a error and exits, unless you specify --allow-non-conformance. Taken from the docs: Note that x265 allows up to 16 L0 references but the HEVC specification only allows a maximum of 8 total reference frames. So if you have B frames enabled only 7 L0 refs are valid and if you have --b-pyramid enabled (which is enabled by default in all presets), then only 6 L0 refs are the maximum allowed by the HEVC specification. If x265 detects that the total reference count is greater than 8, it will issue a warning that the resulting stream is non-compliant and it signals the stream as profile NONE and level NONE and will abort the encode unless --allow-non-conformance it specified. Compliant HEVC decoders may refuse to decode such Read this for a quick review on Levels. https://en.wikipedia.org/wiki/High_E...ers_and_levels |
|
30th March 2017, 08:40 | #5123 | Link |
Registered User
Join Date: Jul 2015
Posts: 706
|
Recently one thing I am wondering. When converting yuv 422 10bit for the preset veryslow I have a darker film. For x264 10bit (selur) is fine.
Too bad, apparently the codec does so, but from the curiosity I changed the preset medium and it is correct. Interesting. |
30th March 2017, 12:23 | #5124 | Link | |
Registered User
Join Date: Feb 2015
Posts: 326
|
Quote:
|
|
30th March 2017, 13:10 | #5125 | Link |
Registered User
Join Date: Jul 2015
Posts: 706
|
Code:
ffmpeg.exe -loglevel error -i rgb.avi -an -f yuv4mpegpipe -vf scale=1920:1080:in_color_matrix=rgb:in_range=pc:out_color_matrix=bt2020_nc:out_range=pc,format=yuv422p10le -strict -1 - | x265-10b.exe --y4m --input-csp i422 --input-depth 10 --output-depth 10 --preset medium/veryslow --fps 29.970 --keyint 60 --info --no-open-gop --no-hrd --bitrate 6000 --colormatrix bt2020nc --range full --limit-tu 0 --output "output.h265" - Codec:http://msystem.waw.pl/x265/x265-2.3+25-6e1edaf_gcc63.7z |
30th March 2017, 19:15 | #5127 | Link |
Registered User
Join Date: Feb 2015
Posts: 326
|
In my tests movie with --preset medium has bitrate 6005.89 kb/s, with preset veryslow 5180.42 kb/s. My movie is from 6 jpeg (each is repeated 10 times) and there is no problem with quality.
I think that your problem maybe is related with special source -- could you copy encoders outputs (my is for example) Code:
f:\speed\422>ffmpeg.exe -loglevel error -i img%02d.jpg -an -f yuv4mpegpipe -vf scale=1920:1080:in_color_matrix=rgb:in_range=pc:o ut_color_matrix=bt2020_nc:out_range=pc,format=yuv422p10le -strict -1 - | x265-10b.exe --y4m --input-csp i422 --fps 8 --input-d epth 10 --output-depth 10 --preset medium --keyint 60 --info --no-open-gop --no-hrd --bitrate 6000 --colormatrix bt2020nc --rang e full --limit-tu 0 --output "om.hevc" - y4m [info]: 1920x1080 fps 8000/1000 i422p10 sar 9:10 unknown frame count raw [info]: output file: om.hevc x265 [info]: HEVC encoder version 2.3+25-6e1edafd6dc7 x265 [info]: build info [Windows][GCC 6.3.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX x265 [info]: Main 4:2:2 10 profile, Level-4 (Main tier) x265 [info]: Thread pool created using 4 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 2 / wpp(17 rows) 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 / 2 x265 [info]: Keyframe min / max / scenecut / bias: 6 / 60 / 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 / on / on x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1 x265 [info]: Rate Control / qCompress : ABR-6000 kbps / 0.60 x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing x265 [info]: tools: lslices=6 deblock sao x265 [info]: frame I: 6, Avg QP:8.44 kb/s: 59906.54 x265 [info]: frame P: 18, Avg QP:15.30 kb/s: 28.33 x265 [info]: frame B: 36, Avg QP:18.50 kb/s: 11.23 x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0% x265 [info]: consecutive B-frames: 45.8% 12.5% 8.3% 12.5% 20.8% encoded 60 frames in 13.26s (4.52 fps), 6005.89 kb/s, Avg QP:16.53 f:\speed\422>ffmpeg.exe -loglevel error -i img%02d.jpg -an -f yuv4mpegpipe -vf scale=1920:1080:in_color_matrix=rgb:in_range=pc:o ut_color_matrix=bt2020_nc:out_range=pc,format=yuv422p10le -strict -1 - | x265-10b.exe --y4m --input-csp i422 --fps 8 --input-d epth 10 --output-depth 10 --preset veryslow --keyint 60 --info --no-open-gop --no-hrd --bitrate 6000 --colormatrix bt2020nc --ra nge full --limit-tu 0 --output "ov.hevc" - y4m [info]: 1920x1080 fps 8000/1000 i422p10 sar 9:10 unknown frame count raw [info]: output file: ov.hevc x265 [info]: HEVC encoder version 2.3+25-6e1edafd6dc7 x265 [info]: build info [Windows][GCC 6.3.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX x265 [info]: Main 4:2:2 10 profile, Level-4 (Main tier) x265 [info]: Thread pool created using 4 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 2 / wpp(17 rows) x265 [info]: Coding QT: max CU size, min CU size : 64 / 8 x265 [info]: Residual QT: max TU size, max depth : 32 / 3 inter / 3 intra x265 [info]: ME / range / subpel / merge : star / 57 / 4 / 4 x265 [info]: Keyframe min / max / scenecut / bias: 6 / 60 / 40 / 5.00 x265 [info]: Lookahead / bframes / badapt : 40 / 8 / 2 x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 1 x265 [info]: References / ref-limit cu / depth : 5 / off / on x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1 x265 [info]: Rate Control / qCompress : ABR-6000 kbps / 0.60 x265 [info]: tools: rect amp limit-modes rd=6 psy-rd=2.00 rdoq=2 psy-rdoq=1.00 x265 [info]: tools: rskip signhide tmvp b-intra strong-intra-smoothing deblock x265 [info]: tools: sao x265 [info]: frame I: 6, Avg QP:9.72 kb/s: 51056.41 x265 [info]: frame P: 10, Avg QP:14.63 kb/s: 401.45 x265 [info]: frame B: 44, Avg QP:19.23 kb/s: 10.73 x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0% x265 [info]: Weighted B-Frames: Y:0.0% UV:0.0% x265 [info]: consecutive B-frames: 50.0% 0.0% 0.0% 25.0% 0.0% 0.0% 0.0% 0.0% 25.0% encoded 60 frames in 55.98s (1.07 fps), 5180.42 kb/s, Avg QP:17.51 |
31st March 2017, 06:00 | #5129 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
--tune grain omits --rskip. Try adding that one back and see what happens both performance and quality-wise. I use it with --tune grain and have not noticed any difference in the quality of the result.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
31st March 2017, 11:01 | #5131 | Link |
Registered User
Join Date: Jan 2014
Posts: 123
|
Thanks for the tip. That certainly speeds things up, but my original question remains. Say for argument, with the same bitrate set, which of the two options - 2-pass or --tune grain (1-pass) - is likely to deliver the best quality improvement over 1-pass (without --tune grain)? Put another way, does 2-pass deliver anything like the quality improvement benefit ascribed to --tune grain? If it doesn't, then I could resort to just using --tune grain with or without --rskip.
|
31st March 2017, 12:05 | #5132 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
|
For 1-pass, you better don't set a bitrate, but a quality level (CRF) instead. A 1-pass encoding with constant/average bitrate will not distribute the quality optimally.
Grain tuning changes the behaviour of the encoder in several ways. It moves the focus towards elements with higher frequencies, taking available bitrate from the lower frequency parts of the image – which are usually responsible for the base quality of the whole frame. If you want to keep the bitrate in the same range as without, enabling grain tuning will probably give you more details (including noise) at the cost of more compression artifacts. 2-pass encoding is only important if you want to approach a specific size or stay below a maximum bitrate (in conjunction with VBV parameters). If you have no size or bitrate restrictions, there is no need for it. Just complying to VBV restrictions is even possible in a 1-pass encoding mode. 2-pass encoding is no alternative to grain tuning; the encoder behaves differently. A 1-pass CRF encoding and a 2-pass encoding with the same final size will have almost the same quality distribution; grain tuning will look differently to both of them. Last edited by LigH; 31st March 2017 at 12:07. |
31st March 2017, 12:36 | #5133 | Link | |
Registered User
Join Date: Jan 2014
Posts: 123
|
Quote:
Until recently I gave been recompressing using ABR with H264 limited to --threads 4, and my understanding is that 2-pass with H264 does not deliver any significant quality improvement over single pass. However I have read that 2-pass encoding can give up to 18% quality improvement over a single pass with H265, so is that right? |
|
31st March 2017, 12:59 | #5134 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
|
1-pass CRF and 2-pass VBR with the same target size will have very similar results. This will be true for both x264 and x265 encoders. I am not sure if x265 will behave noticably different than x264 when comparing a 1-pass CRF result with a 2-pass VBR result of the same size (and I don't understand how you would measure a quality difference to be 18%, as quality is subjective) ... but I am quite sure that for both encoders, a 1-pass ABR encode will not have an optimal quality distribution, as it is rather focused on a less varying bitrate (e.g. useful for the constraints of a limited bandwidth and limited decoding buffer).
|
31st March 2017, 14:54 | #5135 | Link | |
Registered User
Join Date: Jan 2014
Posts: 123
|
Quote:
|
|
1st April 2017, 19:17 | #5136 | Link |
Guest
Posts: n/a
|
If you're doing 2 pass encodes, I would suggest that you try our new --multi-pass-opt-distortion option. Without this option, x265 will simply normalize quality on a frame-by-frame basis. With --multi-pass-opt-distortion, x265 will also adjust quality within each frame, on a block-by-block basis, by analyzing the quality of each encoded block from the first pass compared to the source video, increasing the quality of blocks with abnormally high distortion, borrowing bits from blocks with below-average distortion (higher than average quality). So, basically, --multi-pass-opt-distortion is a finer-grained version of 2 pass, where we are leveling quality spatially as well as temporally. We look forward to your feedback.
|
1st April 2017, 19:22 | #5137 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Just wondering, are there pending quality improvements in the 10-bit lambda tables? I have a longish queue of stuff to process but I'd like to hold them if there is something in the pipeline for the near future.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
2nd April 2017, 16:31 | #5140 | Link |
Registered User
Join Date: Feb 2007
Location: Sweden
Posts: 483
|
x265 v2.3+28-08a05ca9fd16 (MSYS/MinGW, GCC 6.3.0, 32 & 64bit 8/10/12bit multilib EXEs)
x265 [info]: HEVC encoder version 2.3+28-08a05ca9fd16 x265 [info]: build info [Windows][GCC 6.3.0][32 bit/64 bit] 8bit+10bit+12bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2 Code:
https://bitbucket.org/multicoreware/x265/commits/branch/default |
|
|