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.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th July 2020, 19:23   #7681  |  Link
Barough
Registered User
 
Barough's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 480
x265 v3.4+11-gee5a266a1 (32 & 64-bit 8/10/12bit Multilib Windows Binaries) (GCC 10.1.0)
Code:
https://bitbucket.org/multicoreware/x265_git/commits/branch/master

https://bitbucket.org/multicoreware/x265_git/commits/ee5a266a1055222faff6c319c7589ddcbef3f9d1
Barough is offline   Reply With Quote
Old 5th July 2020, 12:48   #7682  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Have anyone an idea, how i can change the Info string in the sourcefiles of the Encoder? For Example, it likes so:

Code:
Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 26 min
Bit rate                                 : 7 441 kb/s
Width                                    : 3 840 pixels
Height                                   : 1 608 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.050
Stream size                              : 4.50 GiB (65%)
Writing library                          : x265 3.2: QfG-Edition
Encoding settings                        : Encoded-by-QfG / CRF=16.0 / High-Quality
Default                                  : Yes
Forced                                   : No
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: 1000 cd/m2
Maximum Content Light Level              : 712 cd/m2
Maximum Frame-Average Light Level        : 355 cd/m2
Thanks the guy, who can tell me this.
-QfG- is offline   Reply With Quote
Old 6th July 2020, 07:15   #7683  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,751
Compile your own x265.exe after changing its C/C++ sources accordingly.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 6th July 2020, 07:47   #7684  |  Link
charliebaby
Registered User
 
charliebaby's Avatar
 
Join Date: Jun 2020
Posts: 37
Quote:
Originally Posted by -QfG- View Post
Have anyone an idea, how i can change the Info string in the sourcefiles of the Encoder? For Example, it likes so:

Code:
Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 26 min
Bit rate                                 : 7 441 kb/s
Width                                    : 3 840 pixels
Height                                   : 1 608 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.050
Stream size                              : 4.50 GiB (65%)
Writing library                          : x265 3.2: QfG-Edition
Encoding settings                        : Encoded-by-QfG / CRF=16.0 / High-Quality
Default                                  : Yes
Forced                                   : No
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: 1000 cd/m2
Maximum Content Light Level              : 712 cd/m2
Maximum Frame-Average Light Level        : 355 cd/m2
Thanks the guy, who can tell me this.
don't put a pool and see if it works otherwise you have to try --pool 16 or 8,8
__________________
charliebaby is offline   Reply With Quote
Old 6th July 2020, 10:02   #7685  |  Link
theincognito
Registered User
 
Join Date: May 2014
Posts: 15
Quote:
Originally Posted by LigH View Post
Compile your own x265.exe after changing its C/C++ sources accordingly.
I use MSVC/ICC builds interchangeably on my intel cpu with avx2 and they seem to be faster for me than GCC builds.

I am planning to buy a Ryzen 7 3rd gen. Which type of build will be the best for it? Any idea? Thanks in advance
theincognito is offline   Reply With Quote
Old 6th July 2020, 10:17   #7686  |  Link
theincognito
Registered User
 
Join Date: May 2014
Posts: 15
And...

One more thing. Anyone here tried aq-mode 4 and got results? Or could explain to me the use case for it? I read the official docs, and to be honest, didn't understand it.
theincognito is offline   Reply With Quote
Old 6th July 2020, 10:21   #7687  |  Link
charliebaby
Registered User
 
charliebaby's Avatar
 
Join Date: Jun 2020
Posts: 37
Quote:
Originally Posted by theincognito View Post
I use MSVC/ICC builds interchangeably on my intel cpu with avx2 and they seem to be faster for me than GCC builds.

I am planning to buy a Ryzen 7 3rd gen. Which type of build will be the best for it? Any idea? Thanks in advance
I have a 2990wx threadripper and the best for me is the GCC 6.30

here : http://www.mediafire.com/file/p4rf0s...2_x64.zip/file

__________________
charliebaby is offline   Reply With Quote
Old 6th July 2020, 11:09   #7688  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,751
Since my last reply, at least two answers posted here seem to have no obvious relation to the questions they quoted...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 6th July 2020, 19:17   #7689  |  Link
theincognito
Registered User
 
Join Date: May 2014
Posts: 15
Quote:
Originally Posted by charliebaby View Post
I have a 2990wx threadripper and the best for me is the GCC 6.30

here : http://www.mediafire.com/file/p4rf0s...2_x64.zip/file

Thanks a lot
theincognito is offline   Reply With Quote
Old 6th July 2020, 19:26   #7690  |  Link
theincognito
Registered User
 
Join Date: May 2014
Posts: 15
Quote:
Originally Posted by LigH View Post
Since my last reply, at least two answers posted here seem to have no obvious relation to the questions they quoted...
Can you help me with the below?

Quote:
Originally Posted by theincognito View Post
And...

One more thing. Anyone here tried aq-mode 4 and got results? Or could explain to me the use case for it? I read the official docs, and to be honest, didn't understand it.
theincognito is offline   Reply With Quote
Old 6th July 2020, 19:33   #7691  |  Link
charliebaby
Registered User
 
charliebaby's Avatar
 
Join Date: Jun 2020
Posts: 37
Quote:
Originally Posted by theincognito View Post
Can you help me with the below?
AQ-Mode 1 is the Best dont not change :-)
__________________
charliebaby is offline   Reply With Quote
Old 9th July 2020, 16:06   #7692  |  Link
charliebaby
Registered User
 
charliebaby's Avatar
 
Join Date: Jun 2020
Posts: 37
x265-3.4+12 VS2019 + GCC 10.1

http://www.mediafire.com/file/iniffp...geff9.zip/file
__________________
charliebaby is offline   Reply With Quote
Old 10th July 2020, 22:20   #7693  |  Link
vpupkind
Registered User
 
Join Date: Jul 2007
Posts: 60
Quote:
Originally Posted by theincognito View Post
And...

One more thing. Anyone here tried aq-mode 4 and got results? Or could explain to me the use case for it? I read the official docs, and to be honest, didn't understand it.
The premise is that the human visual system is less sensitive to edges than flat areas. The approach is known to work, but needs a ton of tuning.
vpupkind is offline   Reply With Quote
Old 10th July 2020, 23:50   #7694  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by vpupkind View Post
The premise is that the human visual system is less sensitive to edges than flat areas. The approach is known to work, but needs a ton of tuning.
It's actually the other way around: we are much more sensitive to edges (transitions) than to flat areas without any detail. Those are better encoded as frequencies than as spatial pixel values, which is why all lossy still and video codecs use some sort of sine/cosine/wavelet transform.

For adaptive quantization, it's more that the human eye can see errors in frequencies a lot more clearly in smooth areas than textured ones, because that creates edges that weren't there before. Blocking and ringing are a lot easier to see in an area where there shouldn't be detail at all. A bunch of foliage can have slight frequency errors which get masked by all the edges and detail already there.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 11th July 2020, 09:18   #7695  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
I find that all those special edge related AQ modes generally mess any noisy flat areas of the image, causing the floating wall of noise defect I strongly dislike. I don't know if tuning the strength helps but mode 1 still works best for me. Strength 0.8-1.0, lower for noisier material, higher for clean.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...

Last edited by Boulder; 11th July 2020 at 09:26.
Boulder is offline   Reply With Quote
Old 11th July 2020, 13:24   #7696  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Quote:
Originally Posted by Boulder View Post
I find that all those special edge related AQ modes generally mess any noisy flat areas of the image, causing the floating wall of noise defect I strongly dislike. I don't know if tuning the strength helps but mode 1 still works best for me. Strength 0.8-1.0, lower for noisier material, higher for clean.
But --tune animation
which is clean (I assume that they mean clean) cartoon, sets (among other things),
--aq-strength 0.4

Last edited by Forteen88; 11th July 2020 at 15:20. Reason: clarification
Forteen88 is offline   Reply With Quote
Old 11th July 2020, 14:03   #7697  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
If I'm not entirely mistaken, the whole idea of aq-strength is to adjust the amount of bits shifted from more complex blocks (like ones with edges etc.) to simple ones (like a flat background).

From an old x264 thread:

High AQ strength retains more gradients but produces ringing.
Low AQ strength preserves edges but produces banding.

My theory here is that the random noise itself is complex and could actually be harder to compress than something with clear edges and detail. Lowering the strength should not cause excessive banding as the flat areas with noise already attract bits and are not really flat in terms of the encoder. In some tests I did, lowering the strength from 1.0 to 0.8 can cause the bitrate to drop around 10% with other settings remaining the same.

With animation and cartoons, aq-mode 2 could well work because they are very different beasts compared to normal, real-life footage.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 11th July 2020, 15:27   #7698  |  Link
markiemarcus
Registered User
 
Join Date: May 2018
Posts: 49
Quote:
Originally Posted by Boulder View Post
With animation and cartoons, aq-mode 2 could well work because they are very different beasts compared to normal, real-life footage.
In my experience, Aq mode 2 is indeed more forgiving in animation and typically results in less ringing. The difference can be very pronounced with SAO disabled. You can get decent results with Aq mode 1, but finding the optimal aq strength is both a massive pain and essential IMO.

Aq mode 4 also works well, but it's also quite a bit slower.
markiemarcus is offline   Reply With Quote
Old 11th July 2020, 20:04   #7699  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Netflix's Sol Levante is the first creative commons licensed 4K HDR anime-style animation I've seen yet, and makes for some very interesting aq-mode and aq-strength testing.

https://netflixtechblog.com/bringing...e-fa68105067cd

And don't forget --hevc-aq, aka --aq-mode 5. I suspect, but have not demonstrated, it could be quite good for line-art style animation.

While lines are blurring a lot in the computer-assisted era, the classic differential attributes of cel animation are:
  • No motion blur
  • extremely sharp lines demarcating areas of extremely flat color
  • Many repeat frames and areas that are identical between many frames

Just look a the --log-level 2 .csv of natural image and cel content and you'll see how different the distribution of block sizes and types is.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th July 2020, 16:22   #7700  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Can someone tell me how to properly use the 2pass options 'analysis-save' and 'analysis-load' ?

I tried with:
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 zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0  -f yuv4mpegpipe - | "I:\Hybrid\64bit\x265.exe" --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --pass 1 --slow-firstpass --bitrate 1500 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --limit-refs 0 --ssim-rd --psy-rd 2.50 --rdoq-level 2 --psy-rdoq 10.00 --aq-mode 0 --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix bt470bg --stats "E:\Temp\test_generated.stats" --analysis-save "E:\Temp\test_generated.analysis" --analysis-reuse-level 6 --no-multi-pass-opt-analysis --output "E:\Temp\test.265"
for the 2pass 1st pass, which seems to run fine:
Code:
 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.4+7-g38774073d
 x265 [info]: build info [Windows][GCC 10.1.0][64 bit] 10bit
 x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
 x265 [warning]: analysis-load-reuse-level can be set only when analysis-load is enabled. Resetting analysis-load-reuse-level to 0.
 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]: Cb/Cr QP Offset                     : -2 / -2
 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 / off
 x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
 x265 [info]: Rate Control / qCompress            : ABR-1500 kbps / 0.60
 x265 [info]: tools: limit-modes rd=3 ssim-rd psy-rd=2.50 rdoq=2 psy-rdoq=10.00
 x265 [info]: tools: rskip mode=1 signhide tmvp b-intra strong-intra-smoothing
 x265 [info]: tools: deblock(tC=-1:B=-1) sao stats-write
 x265 [info]: frame I:      3, Avg QP:16.35  kb/s: 3518.73
 x265 [info]: frame P:    120, Avg QP:13.21  kb/s: 3109.91
 x265 [info]: frame B:    306, Avg QP:17.58  kb/s: 770.49
 x265 [info]: Weighted P-Frames: Y:0.8% UV:0.8%
 x265 [info]: consecutive B-frames: 3.3% 0.0% 58.5% 21.1% 17.1%
 encoded 429 frames in 15.97s (26.86 fps), 1444.09 kb/s, Avg QP:16.35
Not sure about the:
Code:
 x265 [warning]: analysis-load-reuse-level can be set only when analysis-load is enabled. Resetting analysis-load-reuse-level to 0.
Then I started a 2pass 2nd pass with:
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 zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0  -f yuv4mpegpipe - |  "I:\Hybrid\64bit\x265.exe" --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --pass 2 --bitrate 1500 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --limit-refs 0 --ssim-rd --psy-rd 2.50 --rdoq-level 2 --psy-rdoq 10.00 --aq-mode 0 --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix bt470bg --stats "E:\Temp\test_generated.stats" --analysis-load "E:\Temp\test_generated.analysis" --analysis-reuse-level 6 --no-multi-pass-opt-analysis --no-dynamic-refine --refine-ctu-distortion 1 --output "E:\Temp\2020-07-12@16_54_18_4110_03.265"
which starts fine:
Code:
y4m  [info]: 640x352 fps 25/1 i420p10 sar 1:1 unknown frame count
 raw  [info]: output file: E:\Temp\2020-07-12@16_54_18_4110_03.265
 x265 [info]: HEVC encoder version 3.4+7-g38774073d
 x265 [info]: build info [Windows][GCC 10.1.0][64 bit] 10bit
 x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
 x265 [warning]: analysis-save-reuse-level can be set only when analysis-save is enabled. Resetting analysis-save-reuse-level to 0.
 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]: Cb/Cr QP Offset                     : -2 / -2
 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 / off
 x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
 x265 [info]: Rate Control / qCompress            : ABR-1500 kbps / 0.60
 x265 [info]: tools: limit-modes rd=3 ssim-rd psy-rd=2.50 rdoq=2 psy-rdoq=10.00
 x265 [info]: tools: rskip mode=1 signhide tmvp b-intra strong-intra-smoothing
 x265 [info]: tools: deblock(tC=-1:B=-1) sao stats-read
but then nothing happens.
x265 is running, but seemingly not doing anything.

Also tried with HEVC "encoder version 3.4+12-geff904199" same effect.

-> Can someone tell me how to properly use the 2pass options 'analysis-save' and 'analysis-load' ?

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.