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 27th October 2019, 19:58   #7141  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,672
I find it usable at least in frame-by-frame checks. Make sure you have --limit-refs 3 and --limit-modes set to gain some performance back, but I think 'slow' already uses them.
__________________
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 27th October 2019, 21:03   #7142  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 991
.EXE 3.2+9-971180b is ready.

http://msystem.waw.pl/x265/

Last edited by filler56789; 27th October 2019 at 21:14.
filler56789 is offline   Reply With Quote
Old 27th October 2019, 21:51   #7143  |  Link
aymanalz
Registered User
 
Join Date: May 2015
Posts: 68
Quote:
Originally Posted by Boulder View Post
I find it usable at least in frame-by-frame checks. Make sure you have --limit-refs 3 and --limit-modes set to gain some performance back, but I think 'slow' already uses them.
I have set limits-refs 3 and limit modes, and yet I get a 41% increase in encode time.

Of all the settings in the "slow" preset, this is the one that causes the biggest speed hit for me. That's why I'm wondering if it is really worth it.
aymanalz is offline   Reply With Quote
Old 28th October 2019, 01:26   #7144  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 136
I'd like to know lowering --cbqpoffs -3 and --crqpoffs -3 makes x265 spend more bits to chroma taking them from luma, or it just lowers QP for chroma but don't touch luma?

Quote:
Originally Posted by aymanalz View Post


Of all the settings in the "slow" preset, this is the one that causes the biggest speed hit for me. That's why I'm wondering if it is really worth it.
I decided that it's not worth it, at least for me. My target bitrate 17-18mb for FHD. Maybe at lower bitrate it gives more quality, I don't know.

Last edited by redbtn; 28th October 2019 at 01:41.
redbtn is offline   Reply With Quote
Old 28th October 2019, 06:40   #7145  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,607
Quote:
Originally Posted by aymanalz View Post
I have set limits-refs 3 and limit modes, and yet I get a 41% increase in encode time.

Of all the settings in the "slow" preset, this is the one that causes the biggest speed hit for me. That's why I'm wondering if it is really worth it.
Not worth it. You won't notice a difference in moving frames, only still ones and not always

if you want to squeeze out a bit more quality and lower file size by a % or few, better use --hme=1 --hme-search=umh,umh,star
__________________
ffx264--ffhevc--ffxvid

AMD Ryzen 7 3700X
froggy1 is offline   Reply With Quote
Old 28th October 2019, 07:20   #7146  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,605
Quote:
Originally Posted by redbtn View Post
I decided that it's not worth it, at least for me. My target bitrate 17-18mb for FHD. Maybe at lower bitrate it gives more quality, I don't know.
At those rates you may very well get better results with AVC, to be honest.
Blue_MiSfit is offline   Reply With Quote
Old 28th October 2019, 08:04   #7147  |  Link
aymanalz
Registered User
 
Join Date: May 2015
Posts: 68
Quote:
Originally Posted by froggy1 View Post
Not worth it. You won't notice a difference in moving frames, only still ones and not always

if you want to squeeze out a bit more quality and lower file size by a % or few, better use --hme=1 --hme-search=umh,umh,star
Thanks. Ironically, I started off by using and tweaking your own settings posted in this thread, in which you had enabled rect.

Is --hme=1 beneficial for 1080p? I am targeting around 5-6 mbps.
aymanalz is offline   Reply With Quote
Old 28th October 2019, 09:19   #7148  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,672
Quote:
Originally Posted by Blue_MiSfit View Post
At those rates you may very well get better results with AVC, to be honest.
That's true. For a regular, non-grainy source, over 10 Mbps at 1080p is already quite a lot. My 720p encodes with rather sharp downsizing and very light denoising, I usually get bitrates around 3-7 Mbps at CRF 18. Some episodes of Dark Matter have been below 2 Mbps
__________________
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 28th October 2019, 09:41   #7149  |  Link
aymanalz
Registered User
 
Join Date: May 2015
Posts: 68
Quote:
Originally Posted by froggy1 View Post
Not worth it. You won't notice a difference in moving frames, only still ones and not always

if you want to squeeze out a bit more quality and lower file size by a % or few, better use --hme=1 --hme-search=umh,umh,star
I just did that, and found that the resulting speed decrease is almost exactly the same as having --rect enabled. ie, using rect or using --hme umh,umh,star causes exactly the same amount of fps loss.

So if --hme gives better quality improvement than --rect, the takeaway should be to use hme and eschew rect, for squeezing out more quality for bitrate. I question whether the "slow" preset should have --rect enabled by default.

I notice that with --hme enabled, the second pass is much faster than the first. I wonder why that is.
aymanalz is offline   Reply With Quote
Old 28th October 2019, 10:55   #7150  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,607
Quote:
Originally Posted by aymanalz View Post
Thanks. Ironically, I started off by using and tweaking your own settings posted in this thread, in which you had enabled rect.

Is --hme=1 beneficial for 1080p? I am targeting around 5-6 mbps.
I had it enabled as I was testing a few things

In my encoding, I no longer use it as it's slow here too. --hme seems to run faster here, at least for me on a Core i7 7700K on Linux

HME is a bit beneficial for 1080p. But it really shows its strength for 2160p and higher
__________________
ffx264--ffhevc--ffxvid

AMD Ryzen 7 3700X
froggy1 is offline   Reply With Quote
Old 28th October 2019, 13:12   #7151  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,672
In this case, VMAF could be useful in determining if it's worth it or not. Just need to make sure that the compared streams are decoded frame accurately so I would probably encode a sample clip, mux to mkv and index and decode with DGDecNV tools.
__________________
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 28th October 2019, 22:29   #7152  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,071
Quote:
Originally Posted by redbtn View Post
I'd like to know lowering --cbqpoffs -3 and --crqpoffs -3 makes x265 spend more bits to chroma taking them from luma, or it just lowers QP for chroma but don't touch luma?
If limited by --bitrate or VBV, luma QP will go up to compensate for the bits spent by lower QP chroma.

If doing CRF, it'll just make the file larger.

In general, those values will reduce compression efficiency of most content in most scenarios.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 1st November 2019, 03:41   #7153  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 29
Is there any option to limit CPU usage of x265 (used via ffmpeg)? I have time & patience, and I just want to limit x265 to 2 cores 4 threads, because I can't do anything when it consumes all 4 cores I have.
nghiabeo20 is offline   Reply With Quote
Old 1st November 2019, 06:50   #7154  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,672
Quote:
Originally Posted by nghiabeo20 View Post
Is there any option to limit CPU usage of x265 (used via ffmpeg)? I have time & patience, and I just want to limit x265 to 2 cores 4 threads, because I can't do anything when it consumes all 4 cores I have.
You could try --frame-threads 1 to limit encoding to one frame at a time.

If your only problem is that your computer becomes unusable, run the process at a lower priority. You can do that in command prompt by using "start /belownormal ...your encoder stuff here..."
__________________
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 1st November 2019, 11:01   #7155  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 29
Quote:
Originally Posted by Boulder View Post
You could try --frame-threads 1 to limit encoding to one frame at a time.

If your only problem is that your computer becomes unusable, run the process at a lower priority. You can do that in command prompt by using "start /belownormal ...your encoder stuff here..."
I use pools=4, and it does use only 4 threads of my 4C8T. Does it affect anything? I thought --frame-threads would severvely affect the performance.

Furthermore, I use htop to see CPU utilization. This is my third run, and the exact same 4 threads are used. Does it imply that ffmpeg only runs on those same 2 cores (or 4 cores) over and over? I know next to nothing about CPU architecture & organization, but if it implies so, does it have a long term effect on those cores? I thought that the OS should shuffle the workload among cores (between run), still I want to confirm.

Last edited by nghiabeo20; 1st November 2019 at 11:08.
nghiabeo20 is offline   Reply With Quote
Old 1st November 2019, 11:09   #7156  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,362
Quote:
Originally Posted by nghiabeo20 View Post
I use pools=4, and it does use only 4 threads of my 4C8T. Does it affect anything? I thought --frame-threads would severvely affect the performance.
Why don't you try runing x265 in idle priority? What you do is not optimal.
Atak_Snajpera is offline   Reply With Quote
Old 1st November 2019, 11:29   #7157  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,672
Quote:
Originally Posted by nghiabeo20 View Post
I thought that the OS should shuffle the workload among cores (between run), still I want to confirm.
The OS scheduler does do that, unless you set the process to use only specific cores (=CPU affinity). But as I and Atak_Snajpera said, set the process priority lower (idle or just below normal) and let the encoder use whatever resources are available to it after other processes.
__________________
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 1st November 2019, 11:51   #7158  |  Link
birdie
.
 
birdie's Avatar
 
Join Date: Dec 2006
Posts: 152
Quote:
Originally Posted by nghiabeo20 View Post
Is there any option to limit CPU usage of x265 (used via ffmpeg)? I have time & patience, and I just want to limit x265 to 2 cores 4 threads, because I can't do anything when it consumes all 4 cores I have.
Windows: https://blogs.msdn.microsoft.com/san...-affinity-set/

Linux: man taskset

OS X: You're f*cked.
birdie is offline   Reply With Quote
Old 1st November 2019, 14:45   #7159  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 136
If I want to get the same bitrate, which option is better for quality?
1) --no-cutree with higher CRF
2) --cutree with lower CRF
redbtn is offline   Reply With Quote
Old 1st November 2019, 18:21   #7160  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 29
Quote:
Originally Posted by Boulder View Post
The OS scheduler does do that, unless you set the process to use only specific cores (=CPU affinity). But as I and Atak_Snajpera said, set the process priority lower (idle or just below normal) and let the encoder use whatever resources are available to it after other processes.
Quote:
Originally Posted by Atak_Snajpera View Post
Why don't you try runing x265 in idle priority? What you do is not optimal.
It's a laptop, so I still don't want 90+% usage for an extended period of time. I'm saving money for a Ryzen rig anyway.

Quote:
Originally Posted by birdie View Post
Windows: https://blogs.msdn.microsoft.com/san...-affinity-set/

Linux: man taskset

OS X: You're f*cked.
Yes i'm a fucked TM user here.
nghiabeo20 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 23:27.


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