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 11th July 2018, 11:43   #6181  |  Link
RainyDog
Registered User
 
Join Date: May 2009
Posts: 184
Quote:
Originally Posted by LigH View Post
Just in the same command line.

Code:
x265 --preset ... --no-slow-firstpass --ref 4 --rd 3 ...
First the "meta options" which change several parameters at once, then atomic options which override these changes.
Thanks LigH.

Yeah I do that anyway as I always make quite a few tweaks to the standard presets. But what if I want to specify --rd 3 only for the fast 1st pass but use --rd 5 for the slow 2nd pass?

My thoughts are that --rd 3 will provide a much more suitable analysis than --rd 2 for the 1st pass and use psy-rdoq.
RainyDog is offline   Reply With Quote
Old 11th July 2018, 11:51   #6182  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Just do it; compare --rd 2 / 3 / 5 in 1st pass (and always 5 in last) among each other, tell us if you see any difference. I doubt. You will be sure afterwards.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 11th July 2018, 13:37   #6183  |  Link
RainyDog
Registered User
 
Join Date: May 2009
Posts: 184
Quote:
Originally Posted by LigH View Post
Just do it; compare --rd 2 / 3 / 5 in 1st pass (and always 5 in last) among each other, tell us if you see any difference. I doubt. You will be sure afterwards.
Well, I would... If I knew how to specify the --rd level and ref's in the 1st pass. That's what I was hoping you could tell me

Would it be :-

x265 --preset slow --no-slow-firstpass --pass 1 --ref 4 --rd 3(or 5) --pass 2... followed by the remainder of my manually set options.
RainyDog is offline   Reply With Quote
Old 11th July 2018, 13:45   #6184  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
No. You have to complete the 1st pass before you run the 2nd.

So first, run
Code:
x265 --preset slow --pass 1 --no-slow-firstpass --ref 4 --rd 3 ...
until it finished, to produce mainly a statistics file (if it writes also a video file, then this is surely not yet optimally encoded). Then run
Code:
x265 --preset slow --pass 2 --ref 4 --rd 5 ...
and now you have your resulting video file.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 11th July 2018, 15:46   #6185  |  Link
IgorC
Registered User
 
Join Date: Apr 2004
Posts: 1,315
An interesting article about compression/performance ratio of x265's presets

http://x265.org/performance-energy-c...analysis-x265/
IgorC is offline   Reply With Quote
Old 11th July 2018, 21:28   #6186  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
Quote:
Originally Posted by LigH View Post
No. You have to complete the 1st pass before you run the 2nd.

So first, run
Code:
x265 --preset slow --pass 1 --no-slow-firstpass --ref 4 --rd 3 ...
until it finished, to produce mainly a statistics file (if it writes also a video file, then this is surely not yet optimally encoded). Then run
Code:
x265 --preset slow --pass 2 --ref 4 --rd 5 ...
and now you have your resulting video file.
--dynamic-rd could also be an interesting feature to use in tuning quality/speed. In theory it would allow for faster encoding for easy parts of the video, only switching to higher subme etcetera for the harder bits.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th July 2018, 12:19   #6187  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
Quote:
Originally Posted by IgorC View Post
An interesting article about compression/performance ratio of x265's presets

http://x265.org/performance-energy-c...analysis-x265/
Thank you for posting this.

I feel quite confirmed in my personal findings, i.e. --preset slow being the sweetspot for great quality at a still reasonable encoding speed, since the jump to slower is already immense, while the benefit to quality is practically non-existent in my eyes.
jd17 is offline   Reply With Quote
Old 12th July 2018, 12:43   #6188  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
There's also at least the value of --max-merge being raised in the slower presets which (at least in my opinion) affect by degrading quality. It will smooth things more --> lower bitrate.
__________________
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 July 2018, 16:15   #6189  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
Quote:
Originally Posted by Boulder View Post
There's also at least the value of --max-merge being raised in the slower presets which (at least in my opinion) affect by degrading quality. It will smooth things more --> lower bitrate.
The key thing about a first pass is that it has to maintain roughly proportional rate control and similar frame/slice type decisions. If it is just 15% less efficient, no biggie. But if it’s efficiency gap varies a lot throughout the clip, than it just isn’t an accurate initial effort to refine.

So a no-slow-firstpass should focus on features that don’t have highly variable impact based on content. Things looking different is probably a good proxy for that, so if you see max-merge changing the character of the encore significantly, you’d probably want to have it st the same value in both passes.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 13th July 2018, 17:34   #6190  |  Link
imhh11
Registered User
 
Join Date: Jul 2016
Posts: 171
Hi, thanks to all the developers.

UHD-BD are encoded at level 5.1 but when I select that level, I get this warning.
Should I ignore the warning or just use 5.0 which isn't uhdbd compliant ?





Also, is there anything in my setting that I should modify in order to retain grain better?

Thank you and sorry for my English
imhh11 is offline   Reply With Quote
Old 13th July 2018, 17:54   #6191  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Better grain retention = add --no-sao and --no-strong-intra-smoothing.
__________________
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 13th July 2018, 19:52   #6192  |  Link
imhh11
Registered User
 
Join Date: Jul 2016
Posts: 171
Quote:
Originally Posted by Boulder View Post
Better grain retention = add --no-sao and --no-strong-intra-smoothing.
thanks, I'll try that.


EDIT. Wow its working well . still not perfect but way better than before.

http://screenshotcomparison.com/comparison/116849

http://screenshotcomparison.com/comparison/116846

http://screenshotcomparison.com/comparison/116847



and never mind about my first question, added --vbv-bufsize 160000 --vbv-maxrate 160000 and no more warning.

Last edited by imhh11; 13th July 2018 at 23:43.
imhh11 is offline   Reply With Quote
Old 14th July 2018, 00:56   #6193  |  Link
Capella Systems
Registered User
 
Join Date: Feb 2018
Posts: 2
Quote:
Originally Posted by benwaggoner View Post
--dynamic-rd could also be an interesting feature to use in tuning quality/speed. In theory it would allow for faster encoding for easy parts of the video, only switching to higher subme etcetera for the harder bits.
We have implemented this in our transcoding software (Cambria FTC) on top of x265 and it works quite well - a lot of videos are mostly easy to encode and the 80/20 rule is in our favor here.
Capella Systems is offline   Reply With Quote
Old 14th July 2018, 09:56   #6194  |  Link
RainyDog
Registered User
 
Join Date: May 2009
Posts: 184
Quote:
Originally Posted by benwaggoner View Post
--dynamic-rd could also be an interesting feature to use in tuning quality/speed. In theory it would allow for faster encoding for easy parts of the video, only switching to higher subme etcetera for the harder bits.
But doesn't --dynamic-rd only affect the RD level and only become applicable when VBV rate control is enabled?

Quote:
Increases the RD level at points where quality drops due to VBV rate control enforcement. The number of CUs for which the RD is reconfigured is determined based on the strength. Strength 1 gives the best FPS, strength 4 gives the best SSIM. Strength 0 switches this feature off. Default: 0.

Effective for RD levels 4 and below.
RainyDog is offline   Reply With Quote
Old 14th July 2018, 09:58   #6195  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by imhh11 View Post
and never mind about my first question, added --vbv-bufsize 160000 --vbv-maxrate 160000 and no more warning.
If you are going to watch the result on a PC or a modern HTPC/media player, I think you can safely skip specifying the decoder level and leave the VBV buffer things out. They can only lower the quality of the result.

For better quality including grain retention, I also recommend testing raising qcomp. Try values between 0.6 and 0.8. The bitrate will rise as well though.
__________________
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 14th July 2018, 17:56   #6196  |  Link
imhh11
Registered User
 
Join Date: Jul 2016
Posts: 171
Quote:
Originally Posted by Boulder View Post
If you are going to watch the result on a PC or a modern HTPC/media player, I think you can safely skip specifying the decoder level and leave the VBV buffer things out. They can only lower the quality of the result.

For better quality including grain retention, I also recommend testing raising qcomp. Try values between 0.6 and 0.8. The bitrate will rise as well though.
yes, I'm watching it on an HTPC /gtx1070.

Thank you so much for your recommendations, I'm already blown away by the difference.
imhh11 is offline   Reply With Quote
Old 14th July 2018, 22:50   #6197  |  Link
uneedme
Registered User
 
Join Date: Sep 2007
Posts: 41
Hello Dudes,

I have tried to encode a video...

From 5 mins and on, the quality is getting worse and worse steadily(it is like auto crf downgrade). and then I split the source video into pieces and encoded them again. Every outputs are good then.

with the same params, I dont know why......

I suspect "--psy-rd 3.2" is the cause or it is a bug?......Or some wrong commands-combinations cause the chaos...

Cheers.


--crf 18.6 -m 2 --me 1 --rd 5 --rc-lookahead 120 --merange 114 --bframes 6 --ref 6 --min-keyint 23 --keyint 240 --max-merge 5 --tu-intra-depth 3 --tu-inter-depth 2 --aq-motion --qg-size 16 --no-sao --no-strong-intra-smoothing --psy-rd 3.2 --scenecut 80 --deblock -1:3 --aq-mode 2 --qcomp 0.8 --aq-strength 0.8 --colorprim bt709 --colormatrix bt709 --transfer bt709 --input-res 1862x768 --fps 24000/1001 --input-depth 10 -D 10 -o "1" --rc-grain --input -

Last edited by uneedme; 14th July 2018 at 23:11.
uneedme is offline   Reply With Quote
Old 14th July 2018, 23:19   #6198  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
remove --aq-motion and try again
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 20th July 2018, 15:36   #6199  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
x265 2.8+47-e2759ae31c36

several fixes related to HDR10+ LLC JSON and dependencies between effects of options
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 20th July 2018, 15:40   #6200  |  Link
alex1399
Registered User
 
Join Date: Jun 2018
Posts: 56
I've got some 60fps video materials with wrongly encoded frame-rate which has lots of duplicated frames.
Encoding those video tends to exceed the bits per second budget.
1. remove duplicated frame
2. increase qcomp
3. set tu-inter-depth=4:tu-intra-depth=4
The 1. and 2. don't perform well, those "still" frames seems to compromised by the poorly unstable sampling rate and ghosting artifacts.
The 3. is interesting.
Instead, how to set x265 parameters to act just like a corrected frame-rate video but farther Intra-coded (I) frames and high level hierarchy Bi-directional predicted (B) frames?
alex1399 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:25.


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