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 23rd December 2018, 05:39   #6541  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 32
What can SAO do? Does it improve quality/file size?
I'm targeting good quality with reasonable bitrate (5-6000 kbps for 1080p10, BD remux source) with CRF 21. Thanks!
nghiabeo20 is offline   Reply With Quote
Old 23rd December 2018, 13:42   #6542  |  Link
excellentswordfight
Lost my old account :(
 
Join Date: Jul 2017
Posts: 322
Quote:
Originally Posted by nghiabeo20 View Post
What can SAO do? Does it improve quality/file size?
I'm targeting good quality with reasonable bitrate (5-6000 kbps for 1080p10, BD remux source) with CRF 21. Thanks!
Yes, SAO increases efficiency/compression. But it usually does it with the drawback of an slight reduction in fine detail. So its pretty great for low bitrate encodings and animation, but not so much if you wanna keep most of the detail.

Its best if you test it for yourself, and see what settings gives you the best results, but if you target that bitrate range I whould say that you might wanna turn it off.

And btw, I think crf21 will end up at a much lower bitrate for most content if you dont us tune grain or something similar. I get arround those numbers with crf18.
excellentswordfight is offline   Reply With Quote
Old 23rd December 2018, 16:46   #6543  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 32
Quote:
Originally Posted by excellentswordfight View Post
Yes, SAO increases efficiency/compression. But it usually does it with the drawback of an slight reduction in fine detail. So its pretty great for low bitrate encodings and animation, but not so much if you wanna keep most of the detail.

Its best if you test it for yourself, and see what settings gives you the best results, but if you target that bitrate range I whould say that you might wanna turn it off.

And btw, I think crf21 will end up at a much lower bitrate for most content if you dont us tune grain or something similar. I get arround those numbers with crf18.
Maybe I'm doing something wrong. All I edit from the veryslow preset is these commands

Code:
bframes=6:subme=3:rd=5:qcomp=0.75:no-sao:deblock=-2:-2
however CRF 22 10bit without any tuning gives me a whopping 8500kbps for a 30s test clip from my The Hundred-Foot Journey bluray!

Last edited by nghiabeo20; 23rd December 2018 at 16:56.
nghiabeo20 is offline   Reply With Quote
Old 23rd December 2018, 16:59   #6544  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
The bitrate depends a huge deal on the content. Grainy or noisy stuff requires much more than some clean CGI content.
__________________
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 24th December 2018, 00:24   #6545  |  Link
excellentswordfight
Lost my old account :(
 
Join Date: Jul 2017
Posts: 322
Quote:
Originally Posted by nghiabeo20 View Post
Maybe I'm doing something wrong. All I edit from the veryslow preset is these commands

Code:
bframes=6:subme=3:rd=5:qcomp=0.75:no-sao:deblock=-2:-2
however CRF 22 10bit without any tuning gives me a whopping 8500kbps for a 30s test clip from my The Hundred-Foot Journey bluray!
As boulder said, thats very source dependant. And a 30s sample might not be representative either. But with that said i think your qcomp setting plays a role here (maybe deblock as well).
excellentswordfight is offline   Reply With Quote
Old 24th December 2018, 04:17   #6546  |  Link
singhkays
Registered User
 
Join Date: Aug 2018
Posts: 18
Can anybody give any advice if there is any benefit by taking the following approaches? and is either one of the splitting methods preferred?
  1. Split a video file on keyframes
  2. Split a video file based on the shots (i.e. different camera angles)

other than the obvious ability to parallelize the encoding task
singhkays is offline   Reply With Quote
Old 24th December 2018, 08:09   #6547  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
other than the obvious ability to parallelize the encoding task
Aside from further parallelizing the encoding more there is no reason to split a source unless you want to.
When having the split a source for parallelizing the encoding I would prefer to split 'a video file based on the shots' since the source simply might have key frames placed in a fixed interval not caring about coding efficiency. That said splitting on key frames is easier.
But splitting on key frames in respect to scenes and using the segmented encoding feature of x265 is probably the best easy to implement way. Ideally you wound split at the points where the encoder would want to set key frame for coding efficiency.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 24th December 2018, 23:28   #6548  |  Link
singhkays
Registered User
 
Join Date: Aug 2018
Posts: 18
Quote:
Originally Posted by Selur View Post
But splitting on key frames in respect to scenes and using the segmented encoding feature of x265 is probably the best easy to implement way. Ideally you wound split at the points where the encoder would want to set key frame for coding efficiency.
Thank for the advice. I have specific question on the below

Quote:
splitting on key frames in respect to scenes
How would this work? Should I split on keyframes within the scenes?

Quote:
segmented encoding feature of x265
I haven't heard about this. How does this feature work?

Quote:
Ideally you wound split at the points where the encoder would want to set key frame for coding efficiency
How do I figure out where the encoder wants to set key frames? I thought that was a user controlled option i.e. keyint
singhkays is offline   Reply With Quote
Old 27th December 2018, 13:32   #6549  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
To whom this may interest...
latest revision(s) cannot be compiled under MinGW-w64 && MSYS(2).
Some recent changes prevent the libraries from being linked to the command-line .EXE.
filler56789 is offline   Reply With Quote
Old 27th December 2018, 14:32   #6550  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
Quote:
Originally Posted by filler56789 View Post
Some recent changes prevent the libraries from being linked to the command-line .EXE.
Multilib builds are broken (and builds with ENABLE_HDR10_PLUS too).
Simplest solution:
Code:
diff -r 537bba0b7fdc source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Dec 27 11:56:52 2018 +0530
+++ b/source/encoder/encoder.cpp	Thu Dec 27 14:25:51 2018 +0100
@@ -69,7 +69,7 @@
     int doviProfileId;
 }DolbyVisionProfileSpec;
 
-DolbyVisionProfileSpec dovi[] =
+static DolbyVisionProfileSpec dovi[] =
 {
     { 1, 1, 1, 1, 1, 5, 1,  2, 2, 2, 50 },
     { 1, 1, 1, 1, 1, 5, 0, 16, 9, 9, 81 },
diff -r 537bba0b7fdc source/x265.cpp
--- a/source/x265.cpp	Thu Dec 27 11:56:52 2018 +0530
+++ b/source/x265.cpp	Thu Dec 27 14:25:51 2018 +0100
@@ -690,7 +690,7 @@
                 args[argCount++] = token;
                 token = strtok(NULL, " ");
             }
-            args[argCount] = '\0';
+            args[argCount] = NULL;
             CLIOptions cliopt;
             if (cliopt.parseZoneParam(argCount, args,param, i))
             {
Ma is offline   Reply With Quote
Old 27th December 2018, 15:46   #6551  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
^ Thanks for answering.

Quote:
Originally Posted by Ma View Post
Multilib builds are broken (and builds with ENABLE_HDR10_PLUS too).
OUCH! :-/ So I will have to wait.

Quote:
Simplest solution:
Code:
diff -r 537bba0b7fdc source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Dec 27 11:56:52 2018 +0530
+++ b/source/encoder/encoder.cpp	Thu Dec 27 14:25:51 2018 +0100
@@ -69,7 +69,7 @@
     int doviProfileId;
 }DolbyVisionProfileSpec;
 
-DolbyVisionProfileSpec dovi[] =
+static DolbyVisionProfileSpec dovi[] =
 {
     { 1, 1, 1, 1, 1, 5, 1,  2, 2, 2, 50 },
     { 1, 1, 1, 1, 1, 5, 0, 16, 9, 9, 81 },
diff -r 537bba0b7fdc source/x265.cpp
--- a/source/x265.cpp	Thu Dec 27 11:56:52 2018 +0530
+++ b/source/x265.cpp	Thu Dec 27 14:25:51 2018 +0100
@@ -690,7 +690,7 @@
                 args[argCount++] = token;
                 token = strtok(NULL, " ");
             }
-            args[argCount] = '\0';
+            args[argCount] = NULL;
             CLIOptions cliopt;
             if (cliopt.parseZoneParam(argCount, args,param, i))
             {
Since I didn't know the multilib builds are impossible for the time being,
the old error message

(something about "invalid conversion from char to char*")

just went replaced with a new one :-/
filler56789 is offline   Reply With Quote
Old 28th December 2018, 07:36   #6552  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Hi,
Quote:
Introduce --tune animation option
--psy-rd 0.4
--aq-strength 0.4
--deblock 1:1
--bframes increased by 2
Sorry if it's a silly question but Bframes increased by 2, means +2 from the default parameter which is 4 Bframes according to the doc, so it will be --bframes 6, or from 0 so it will be --bframes 2 ?

Thank you
Yanak is offline   Reply With Quote
Old 28th December 2018, 08:23   #6553  |  Link
Wishbringer
Silent Reader
 
Wishbringer's Avatar
 
Join Date: Dec 2003
Location: Germany
Posts: 295
Or from bframes you give per commandline?
What has a higher priority?
I expect: +2 from preset, except explicit given by command, then the manual value
Wishbringer is offline   Reply With Quote
Old 28th December 2018, 09:06   #6554  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
You will usually first use a preset, then a tuning (so the "animation" tuning will add 2 to the number of B frames of your preset); but if you also add an explicit bframes parameter later in the command line, it will supersede previously calculated values.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 28th December 2018, 10:21   #6555  |  Link
RainyDog
Registered User
 
Join Date: May 2009
Posts: 184
Looks like we have a new AQ mode in x265 2.9+28

Quote:
It scales the quantization step size according to the spatial activity of one coding unit relative to frame average spatial activity. This AQ method utilizes the minimum variance of sub-unit in each coding unit to represent the coding units spatial complexity.
Quote:
Default 1.0.

**Range of values:** 0.0 to 3.0

+.. option:: --hevc-aq
+
+ Enable adaptive quantization
+ It scales the quantization step size according to the spatial activity of one
+ coding unit relative to frame average spatial activity. This AQ method utilizes
+ the minimum variance of sub-unit in each coding unit to represent the coding
+ unit’s spatial complexity.
+
+.. option:: --qp-adaptation-range
+
+ Delta-QP range by QP adaptation based on a psycho-visual model.
+
+ Default 1.0.
+ **Range of values:** 1.0 to 6.0
RainyDog is offline   Reply With Quote
Old 28th December 2018, 12:57   #6556  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Seems interesting. It would be nice to hear of the cases which this new method targets.
__________________
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 December 2018, 14:10   #6557  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by Wolfberry View Post
libiomp5md.dll seems to be a dependency as I get a missing file warning. Where can I get that one (and others which may also be needed)?
__________________
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 December 2018, 19:42   #6558  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Quote:
Originally Posted by Boulder View Post
libiomp5md.dll seems to be a dependency as I get a missing file warning. Where can I get that one (and others which may also be needed)?
"libiomp5md.dll is from the Intel C compiler".
More info here, https://stackoverflow.com/questions/...ll-even-though

Last edited by Forteen88; 28th December 2018 at 23:27.
Forteen88 is offline   Reply With Quote
Old 28th December 2018, 23:50   #6559  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
I found this statement about Intel C++:
***
If you want to link against the static OpenMP RTL, you must add /Qopenmp-link:static, which is a new switch for 11.0. So to produce a purely static executable, compile/link with /MT /Qopenmp-link:static
***
Ma is offline   Reply With Quote
Old 29th December 2018, 00:25   #6560  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
@Ma
Thanks for the information.
Without /Qopenmp, /MT should be fine.
With /Qopenmp, /Qopenmp-link:static needs to be used to produce a purely static executable.
__________________
Monochrome Anomaly
Wolfberry 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 19:15.


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