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 28th October 2019, 10:55   #7141  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
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 || microenc
microchip8 is offline   Reply With Quote
Old 28th October 2019, 13:12   #7142  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
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   #7143  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
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   #7144  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 32
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   #7145  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
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   #7146  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 32
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   #7147  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
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   #7148  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
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   #7149  |  Link
birdie
Artem S. Tashkinov
 
birdie's Avatar
 
Join Date: Dec 2006
Posts: 337
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   #7150  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 105
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   #7151  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 32
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
Old 2nd November 2019, 19:33   #7152  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Quote:
Originally Posted by Boulder View Post
You could try --frame-threads 1 to limit encoding to one frame at a time.
Yeah, I'd do this if I were the person you answered to, since this also increases the picture-quality of the encode.

Last edited by Forteen88; 2nd November 2019 at 19:38.
Forteen88 is offline   Reply With Quote
Old 3rd November 2019, 19:19   #7153  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 105
Quote:
Originally Posted by Blue_MiSfit View Post
At those rates you may very well get better results with AVC, to be honest.
I've done tests, 1080p with bitrate 22mb, x264 10bit (placebo, subme 11, bframes 8, etc) and x265 10bit (slow, no-rect, subme 4, bframes 8 and some other tweaks). In the end I get almost the same encoding speed. And x265 looks much better. I don't know why many people say that at high bitrate x264 beats x265.

Last edited by redbtn; 3rd November 2019 at 19:32.
redbtn is offline   Reply With Quote
Old 3rd November 2019, 23:01   #7154  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Quote:
Originally Posted by redbtn View Post
I've done tests, 1080p with bitrate 22mb, x264 10bit (placebo, subme 11, bframes 8, etc) and x265 10bit (slow, no-rect, subme 4, bframes 8 and some other tweaks). In the end I get almost the same encoding speed. And x265 looks much better. I don't know why many people say that at high bitrate x264 beats x265.
BS. 22 Mbps is insanelly high for 1080p. That's basicaly a blu-ray teoritory. You are lieing saying that x265 looks MUCH BETTER.
Atak_Snajpera is offline   Reply With Quote
Old 3rd November 2019, 23:31   #7155  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 105
Quote:
Originally Posted by Atak_Snajpera View Post
BS. 22 Mbps is insanelly high for 1080p. That's basicaly a blu-ray teoritory. You are lieing saying that x265 looks MUCH BETTER.
I know that 22 is very high for 1080p, I did it specially for test. After encode I upscaled FHD to UHD and compared them. I don't say that x265 MUCH better, but it significantly better at preserving small details. And I can definitely say it's not worse anyway.
redbtn is offline   Reply With Quote
Old 4th November 2019, 20:45   #7156  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
It's definitely not impossible that x265 would produce better results than x264 at 22 Mbps for 1080p. I think it's fair to say that for MOST content the difference would be quite negligible, especially at the same encoding speed. Even if you can get a small improvement when encoding several times slower, is it really worth it?

In many use cases, probably not. But for some? Absolutely.
Blue_MiSfit is offline   Reply With Quote
Old 4th November 2019, 22:53   #7157  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 105
Quote:
Originally Posted by Blue_MiSfit View Post
It's definitely not impossible that x265 would produce better results than x264 at 22 Mbps for 1080p. I think it's fair to say that for MOST content the difference would be quite negligible, especially at the same encoding speed. Even if you can get a small improvement when encoding several times slower, is it really worth it?

In many use cases, probably not. But for some? Absolutely.
Yes, you are right, it absolutely impossible notice the difference at 22mb between x264 and x265 just by watching video. Like I said, I upscaled screens to 4K for noticing difference.
But IMO, if x265 better at low bitrates and better at high bitrates, I don't see why I should use x264 at any cases.
redbtn is offline   Reply With Quote
Old 5th November 2019, 09:30   #7158  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 666
I'm getting this warning. I'm trying to test the new frame duplication switch:

x265 [warning]: Frame-duplication require NAL HRD and VBV parameters. Disabling frame duplication

How do I address this?
__________________
Asus ProArt Z790 - 13th Gen Intel i9 - RTX 3080 - DDR5 64GB Predator - LG OLED C9 - Yamaha A3030 - Windows 11 x64 - PotPlayerr - Lav - MadVR
Magik Mark is offline   Reply With Quote
Old 5th November 2019, 09:36   #7159  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by Magik Mark View Post
I'm getting this warning. I'm trying to test the new frame duplication switch:

x265 [warning]: Frame-duplication require NAL HRD and VBV parameters. Disabling frame duplication

How do I address this?
--hrd --vbv-maxrate <value> --vbv-bufsize <value>
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 6th November 2019, 04:31   #7160  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 666
Quote:
Originally Posted by froggy1 View Post
--hrd --vbv-maxrate <value> --vbv-bufsize <value>
What value shall I use?
__________________
Asus ProArt Z790 - 13th Gen Intel i9 - RTX 3080 - DDR5 64GB Predator - LG OLED C9 - Yamaha A3030 - Windows 11 x64 - PotPlayerr - Lav - MadVR
Magik Mark 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 06:11.


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