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 6th June 2020, 21:44   #7641  |  Link
Patman
Registered User
 
Patman's Avatar
 
Join Date: Jan 2015
Posts: 262
Quote:
Originally Posted by burnix View Post
Patman. Can you build an ffmpeg x64 with it ????

Thanks
Here
Patman is offline   Reply With Quote
Old 7th June 2020, 08:35   #7642  |  Link
burnix
Registered User
 
Join Date: Jan 2003
Posts: 44
You're the best.
I'm going to try now, and after i'm going to sell on internet all crappy computer and server to make a real decent computer and work on ffmpeg compil.

Thanks man.
burnix is offline   Reply With Quote
Old 8th June 2020, 20:08   #7643  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 79
I have been stuggling for months with ugly distortions (smearing that kinda looks like motion blur with banding) in fast moving scenes and finally found out that x265's CUTree is to blame.
Turning it off solves it, but the bitrate blows up when trying to keep the same overal quality in other scenes.

Is there any way to make CUTree 'less agressive' or set it to 50% for example or some threshold parameter?

Last edited by K.i.N.G; 8th June 2020 at 22:49.
K.i.N.G is offline   Reply With Quote
Old 8th June 2020, 21:44   #7644  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,696
try a lower ctu value maybe? What resolution + bitrate are you targeting?
Blue_MiSfit is offline   Reply With Quote
Old 8th June 2020, 22:48   #7645  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 79
Quote:
Originally Posted by Blue_MiSfit View Post
try a lower ctu value maybe? What resolution + bitrate are you targeting?
4K Bitrate depends on source, but the current footage is decent quality with little grain (which i'd like to keep).
For this footage, lets say arround 15K since its for streaming.

I restarted the encode with --ctu 32 (instead of --ctu 64)

Last edited by K.i.N.G; 9th June 2020 at 00:15.
K.i.N.G is offline   Reply With Quote
Old 9th June 2020, 19:37   #7646  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 79
Lowering the CTU size to 32 (--ctu 32) doesnt really seem to help
K.i.N.G is offline   Reply With Quote
Old 10th June 2020, 05:15   #7647  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,847
By your description, it looks like the infamous onion artifacts. Have you tried --rd 6 with --rd-refine?
__________________
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 10th June 2020, 06:28   #7648  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,220
Does increasing qcomp reduce the cutree effect? Similar to how increasing qcomp reduced mbtree effect in x264 ?
poisondeathray is offline   Reply With Quote
Old 10th June 2020, 11:55   #7649  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 79
Quote:
Originally Posted by Boulder View Post
By your description, it looks like the infamous onion artifacts. Have you tried --rd 6 with --rd-refine?
I have not.
I will make sure to try those out next after this encode, which will run for a few days.

Quote:
Originally Posted by poisondeathray View Post
Does increasing qcomp reduce the cutree effect? Similar to how increasing qcomp reduced mbtree effect in x264 ?
I can confirm it does.
Normally I raise the qcomp to something like 0.70-0.75 and raise the CRF by 0.5 which 'fixes' it to more acceptable levels.

Though... I always wondered if there was another (more efficient) way to control CUTree's strength/agressiveness more directly... (if I understand correctly qcomp controls a lot more than just things that are influenced by cutree). Hence my question here.

Last edited by K.i.N.G; 10th June 2020 at 12:37.
K.i.N.G is offline   Reply With Quote
Old 10th June 2020, 16:06   #7650  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,847
Quote:
Originally Posted by K.i.N.G View Post
I have not.
I will make sure to try those out next after this encode, which will run for a few days.
And then it will run even slower
Quote:
Though... I always wondered if there was another (more efficient) way to control CUTree's strength/agressiveness more directly... (if I understand correctly qcomp controls a lot more than just things that are influenced by cutree). Hence my question here.
I wouldn't be surprised if aq-mode also played a part here as in my opinion they are related, and the default mode 2 is something I will not use based on my tests. I'm still using mode 1 with strength 0.8-1.0 depending on the source. Higher for cleaner sources.
__________________
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 10th June 2020, 17:16   #7651  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,242
Quote:
Originally Posted by Boulder View Post
I wouldn't be surprised if aq-mode also played a part here as in my opinion they are related, and the default mode 2 is something I will not use based on my tests. I'm still using mode 1 with strength 0.8-1.0 depending on the source. Higher for cleaner sources.
I note from the x265 dev list that an --auto-aq mode is in development. Maybe we'll be able to stop sweating aq-mode someday.

> This patch does the following:
> 1. Automatically decides the AQ Mode for each frame, using its scene
> statistics, such as luma intensity and edge density.
> 2. Add option "--auto-aq" to enable auto detection of AQ Mode per frame.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 10th June 2020, 23:20   #7652  |  Link
fauxreaper
Registered User
 
Join Date: Oct 2014
Posts: 18
CUTree granularity depends on CU depth recursion. --rskip 0 or 2 reduces onion effect. More early exits from CU recursion = bigger CUs = higher chances of wrong CU propagation and artifacts in motion.

x265 RDO loves to skip blocks, and CUTree artifacts are a consequence of this. Decreasing max-merge also helps, reducing artifacts and skipped blocks. Sometimes even setting bframes=0 decrease artifacts in motion.

Last edited by fauxreaper; 10th June 2020 at 23:29.
fauxreaper is offline   Reply With Quote
Old 11th June 2020, 06:29   #7653  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,847
Quote:
Originally Posted by fauxreaper View Post
Decreasing max-merge also helps, reducing artifacts and skipped blocks.
I've never understood why max-merge gets increased in the slower and supposedly higher quality profiles. I always have it at '2'.
__________________
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 June 2020, 09:42   #7654  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,847
Quote:
Originally Posted by fauxreaper View Post
CUTree granularity depends on CU depth recursion. --rskip 0 or 2 reduces onion effect. More early exits from CU recursion = bigger CUs = higher chances of wrong CU propagation and artifacts in motion.

x265 RDO loves to skip blocks
I did a little test with a UHD source, downscaled to 1440p. Interesting results, and easy to see that skips and merges are happening more with the default rskip setting compared to mode 2. I didn't do any visual comparions to find any onion artifacts yet.

Code:
	                rskip 1	rskip 2
 Intra 64x64 DC	        0,00 %	0,00 %
 Intra 64x64 Planar	0,00 %	0,00 %
 Intra 64x64 Ang	0,00 %	0,00 %
 Intra 32x32 DC	        2,03 %	1,24 %
 Intra 32x32 Planar	1,21 %	0,79 %
 Intra 32x32 Ang	9,08 %	3,61 %
 Intra 16x16 DC	        0,92 %	0,36 %
 Intra 16x16 Planar	0,43 %	0,15 %
 Intra 16x16 Ang	8,00 %	2,46 %
 Intra 8x8 DC	        0,25 %	0,14 %
 Intra 8x8 Planar	0,06 %	0,04 %
 Intra 8x8 Ang	        3,75 %	1,61 %
 4x4	                0,45 %	0,44 %
 Inter 64x64	        6,50 %	49,71 %
 Inter 64x64 (Rect)	0,29 %	15,61 %
 Inter 32x32	        19,90 %	6,50 %
 Inter 32x32 (Rect)	1,05 %	0,91 %
 Inter 16x16	        16,78 %	4,27 %
 Inter 16x16 (Rect)	0,91 %	0,05 %
 Inter 8x8	        6,65 %	2,21 %
 Inter 8x8 (Rect)	0,83 %	0,30 %
 Skip 64x64	        0,00 %	0,00 %
 Skip 32x32	        0,81 %	0,24 %
 Skip 16x16	        3,73 %	1,04 %
 Skip 8x8    	        4,27 %	1,91 %
 Merge 64x64	        0,27 %	1,63 %
 Merge 32x32	        2,49 %	0,82 %
 Merge 16x16	        4,86 %	1,67 %
 Merge 8x8	        4,47 %	2,27 %
__________________
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 12th June 2020, 05:20   #7655  |  Link
Greenhorn
Registered User
 
Join Date: Apr 2018
Posts: 23
the comparatively enormous number of 64x64 blocks with rskip 2 to me, though-- from a total of 6.79% (normal + rect) to 65.33% (normal + rect)!

Is there any way to get CU-type in a more readable format than setting csv-log-level=1 and viewing the generated file in an Excel/CSV viewer? Would greatly help with some comparison's I've been doing for myself.
Greenhorn is offline   Reply With Quote
Old 12th June 2020, 05:45   #7656  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,847
Quote:
Originally Posted by Greenhorn View Post
the comparatively enormous number of 64x64 blocks with rskip 2 to me, though-- from a total of 6.79% (normal + rect) to 65.33% (normal + rect)!
That puzzled me as well. Disabling early exits seems to favour bigger CUs in this case. Maybe it's something related to this test clip being HDR, so the image is quite flat compared to the graded result (edit: correctly displayed HDR) on the TV. Plenty of action, but plenty of plain white looking areas when I play the result back on my SDR display.

I checked a couple of frames where I found some onion artifacting -- happened to be next to edges -- and rskip 2 did fix them. So it's definitely helpful.

Quote:
Is there any way to get CU-type in a more readable format than setting csv-log-level=1 and viewing the generated file in an Excel/CSV viewer? Would greatly help with some comparison's I've been doing for myself.
I'm afraid not. That is something I'd like to see as well, averages like I put there and also information regarding refs. All those you can see with x264 so I don't know why the statistics were not considered for x265. If I was a coder, I would definitely submit a patch for it.
__________________
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; 12th June 2020 at 08:52.
Boulder is offline   Reply With Quote
Old 12th June 2020, 14:11   #7657  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 79
Thanks for all the suggestions guys!
I will try them out as soon as I can.

Quote:
Originally Posted by Boulder View Post
I've never understood why max-merge gets increased in the slower and supposedly higher quality profiles. I always have it at '2'.
Funny you should mention this, as i always wondered why I seem to get less of these 'artifacts' when encoding at lower presets. Will have a look at max-merge.

Quote:
Originally Posted by Boulder View Post
I checked a couple of frames where I found some onion artifacting -- happened to be next to edges -- and rskip 2 did fix them. So it's definitely helpful.
Will try this too.

Last edited by K.i.N.G; 12th June 2020 at 14:57.
K.i.N.G is offline   Reply With Quote
Old 12th June 2020, 15:26   #7658  |  Link
vpupkind
Registered User
 
Join Date: Jul 2007
Posts: 30
Quote:
Originally Posted by Greenhorn View Post
the comparatively enormous number of 64x64 blocks with rskip 2 to me, though-- from a total of 6.79% (normal + rect) to 65.33% (normal + rect)!
Do you see the difference in file size or average quantizer as well?
vpupkind is offline   Reply With Quote
Old 12th June 2020, 16:33   #7659  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,242
Quote:
Originally Posted by vpupkind View Post
Do you see the difference in file size or average quantizer as well?
Or visually?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th June 2020, 20:25   #7660  |  Link
Greenhorn
Registered User
 
Join Date: Apr 2018
Posts: 23
I just meant to say it surprised me, but forgot a word. For most of the stuff I've tried it one (just my personal collection, nothing terribly interesting) rskip 2 produces slightly larger but very similar looking encodes, so realizing that it was making such different files on a basic level was a jolt.

IDK how it behaves when you have studio-grade clean/detailed sources, but for me rskip mode 2 needs an annoying amount of tuning, because with the default edge threshold some clips are a little better than with mode 2, while others just fall apart entirely.
Greenhorn 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 13:29.


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