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 > MPEG-4 Encoder GUIs

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 6th April 2020, 21:32   #1641  |  Link
Lynx_TWO
Registered User
 
Join Date: Aug 2005
Posts: 37
Here's some good settings for dynaudnorm when converting full dynamic range to laptop

After some analysis, I've arrived at some great settings when converting full dynamic range audio to something that's usable on a laptop:

Original audio was the first episode of Picard. Original audio specs after converting to Stereo, DPLII below:

True Peak: 0.0dB

Integrated Loudness [LKFS]: -23.6
(this is very quiet)

Max momentary [LKFS]: -8.8

Max Short-term [LKFS]: -12.7

Loudness range [LU]: 22.1 (WAY too dynamic for comfortable listening on any laptop)


After processing with dynamic audio normalization:


True Peak: +2.1dB
(technically this is not the best, but someone would need to integrate the ability to oversample or something to find true peak into dynaudionorm)

Integrated Loudness [LKFS]: -14.3
(very close to Spotify standards)

Max momentary [LKFS]: -4.6

Max Short-term [LKFS]: -6.5

Loudness range [LU]: 12.5 (usable and comfortable dynamic range)

Settings used to reach this result:

Frame Length: 145

Gaus filter win size: 31

Target Peak: 1.00
(when set lower, you'll get stronger peaks and less evenness in volume)

Max gain factor: 60.0
(20, 30, and 40 work well but result in a greater LU range and Integrated Loudness of -15, -14.8, and -14.4 respectively)

Compress factor: 30.0

I suspect there's likely a formula that could be applied for all the settings to reach optimal Integrated Loudness LKFS/LUFS, LU, and Max Momentary and Short-term LKFS/LUFS based on the original if we did enough testing and collected data on different tracks to find correlations...
Lynx_TWO is offline  
Old 7th April 2020, 00:19   #1642  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 391
Quote:
Originally Posted by Atlantis View Post
An interesting observation I have made with encoding x265 4K. Encoding with a lower CRF takes more time. CRF 21 is a little slower than CRF 22 and CRF 20 is significantly slower.

I would have thought that if you wanted a better quality and use less compression, it should be faster to encode but it is the opposite. So, it is interesting on how to decide which CRF to use. Not only it depends on the quality you want, you have to consider how slow the encoding will be. I'm thinking that for me 4K CRF 20 is a no go for me. Too slow.
With my settings I can encode a movie in about 15 - 19 hours depending on movie length.
jlw_4049 is offline  
Old 7th April 2020, 03:26   #1643  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
What's your settings?

I also get the same hours if I go with CRF 22 and depending on the video and filters I apply. With CRF21 and below it could easily take more than 24+ hours.
Atlantis is offline  
Old 7th April 2020, 04:08   #1644  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
2.1.0.5 Tools > Folders > Templates default command line is wrong

In 2.1.0.5 beta, Tools > Folders > Templates menu tries to open a wrong folder, TemplatesV2.





Of course I can manually fix this by changing the default command line from

Code:
"%settings_dir%TemplatesV2"
to

Code:
"%settings_dir%Templates"
but I just wanted to point out that the default command line is problematic.
JKyle is offline  
Old 7th April 2020, 15:25   #1645  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 666
Any advise on a good upscaler for fullHD to 4k?
__________________
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  
Old 7th April 2020, 15:58   #1646  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
Question, in StaxRip Remove Grain Repair is added something like this by default

FFVideoSource(".............
Processed = RemoveGrain()
Repair(Processed)
-------------------------------------------------
In the manual of RgTools it suggests using it in another way. Passing the untouched video like this

Unprocessed = FFVideoSource(".............
Processed = RemoveGrain(Unprocessed)
Repair(Processed, Unprocessed)
-------------------------------------------------

I have tested both scripts and I get 2 different results. The second method noted in the manual gives more details and seems better.

Anyone knows why? In the first method inserted by Staxrip, the unprocessed clip is not passed to Repair() function? Doesn't Repair() get the current clip by default if you don't mention it?
Atlantis is offline  
Old 7th April 2020, 18:42   #1647  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 391
Quote:
Originally Posted by Atlantis View Post
What's your settings?

I also get the same hours if I go with CRF 22 and depending on the video and filters I apply. With CRF21 and below it could easily take more than 24+ hours.
Keep in mind this is without a video loaded into the program. So all the color flags etc aren't there.

--crf 16 --level-idc 5.1 --output-depth 10 --vbv-bufsize 50000 --vbv-maxrate 60000 --bframes 8 --ref 5 --max-luma 1023 --hdr-opt --no-rect

This is set to a medium preset and my crf I adjust according to the size I want of my file. I test until it hits a bit-rate I like then I stick with that crf. Depending on the film it's as low as 9 all the way up to 19.

My file sizes are usually in the 15 to 20gb size depending on film.
jlw_4049 is offline  
Old 7th April 2020, 19:17   #1648  |  Link
Patman
Registered User
 
Patman's Avatar
 
Join Date: Jan 2015
Posts: 286
A request:

I have compiled the new x265.exe 3.3 + 18 (x265_git branch) and always get an error message when using the bit depth 10 bit and 12 bit. If you have the time and desire, please download and test x265.exe 3.3 + 19 (x265_hg branch), the error also occurs here. You can report briefly if possible.
__________________
Tools for StaxRip | x264 - x265
Patman is offline  
Old 7th April 2020, 21:02   #1649  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
Quote:
Originally Posted by jlw_4049 View Post
Depending on the film it's as low as 9 all the way up to 19.

My file sizes are usually in the 15 to 20gb size depending on film.
Wow, that's huge and it would take me several days to encode just 1 video like that.

What is your processor and memory?
Mine:
CPU : Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
GPU : NVIDIA GeForce GTX 980 Ti
Interestingly staxrip log does not include the memory.
RAM 64GB
Atlantis is offline  
Old 7th April 2020, 21:34   #1650  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
Quote:
Originally Posted by Patman View Post
A request:

I have compiled the new x265.exe 3.3 + 18 (x265_git branch) and always get an error message when using the bit depth 10 bit and 12 bit. If you have the time and desire, please download and test x265.exe 3.3 + 19 (x265_hg branch), the error also occurs here. You can report briefly if possible.
This is pretty weird.

I downloaded x265-3.3+19-1d2f556_gcc100-AVX2.7z, put the files in D:\Work\tmp\ and test-encoded a UHD HDR video via avs2pipe with the following command line:

Quote:
D:\Utilities\StaxRip\Apps\Support\avs2pipemod\avs2pipemod64.exe -y4mp "D:\Work\tmp\LG New York HDR UHD 4K Demo_temp\LG New York HDR UHD 4K Demo.avs" | D:\Work\tmp\x265-10b.exe --crf 27 --output-depth 10 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(12000000,500)" --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --frames 500 --y4m --output "D:\Work\tmp\LG New York HDR UHD 4K Demo_temp\LG New York HDR UHD 4K Demo_out.hevc" -
In PowerShell, it fails with this error message:

Code:
avs2pipemod[info]: writing 500 frames of 25/1 fps, 1280x720,
                   sar 0:0, YUV-420-planar-10bit progressive video.
avs2pipemod[info]: finished, wrote 500 frames [100%].
avs2pipemod[info]: total elapsed time is 93.899 sec.
Program 'x265-10b.exe' failed to run: Exception of type 'System.OutOfMemoryException' was thrown.At line:1 char:152
+ ... Demo.avs" | D:\Work\tmp\x265-10b.exe --crf 27 --output-depth 10 --mas ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ D:\Utilities\StaxRip\Apps\Support\avs2pipemod\avs2pipemod64.exe -y4mp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed
On the other hand, it does not produce any error but encodes the file successfully in the Command Prompt.

I ran the same encode using the x265 build by Patman, which does not produce any error run in StaxRip, but I get the same error in PowerShell as well.

What the heck is going on?

Well, this is something I wasn't aware of, but at least I can say that x265-3.3+19-1d2f556_gcc100-AVX2.7z is OK (at least the 10-bit version).

Last edited by JKyle; 7th April 2020 at 23:20.
JKyle is offline  
Old 7th April 2020, 23:18   #1651  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
And I tested the 12-bit version in a similar way, and got the same result.

So, it seems that x265-3.3+19-1d2f556_gcc100-AVX2.7z is OK.
JKyle is offline  
Old 8th April 2020, 07:39   #1652  |  Link
Patman
Registered User
 
Patman's Avatar
 
Join Date: Jan 2015
Posts: 286
Quote:
Originally Posted by JKyle View Post
And I tested the 12-bit version in a similar way, and got the same result.

So, it seems that x265-3.3+19-1d2f556_gcc100-AVX2.7z is OK.
Hey JKyle, thanks for your tests. Pls do the same with x265.exe (multilib version), not with x265-8b.exe, x265-10b.exe or x265-12b.exe. The x265.exe includes all bith depth. Thanks
__________________
Tools for StaxRip | x264 - x265
Patman is offline  
Old 8th April 2020, 16:59   #1653  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
Quote:
Originally Posted by Patman View Post
Pls do the same with x265.exe (multilib version), not with x265-8b.exe, x265-10b.exe or x265-12b.exe. The x265.exe includes all bith depth.
You were right. x265.exe returns errors with 10-bit and 12-bit encodes.

Code:
x265 [info]: HEVC encoder version 3.3+19-1d2f556ffb12
x265 [info]: build info [Windows][GCC 10.0.1][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [error]: internalBitDepth must match compiled bit depth
x265 [error]: x265_encoder_open() failed for Enc,
aborted at input frame 1, output frame 0
By contrast, your build - x265-3.3+10-g08d895bb6-gcc10.0.1 - chooses the appropriate bit depth in encoding.

Code:
x265 [info]: HEVC encoder version 3.3+10-g08d895bb6
x265 [info]: build info [Windows][GCC 10.0.1][64 bit] 12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 12 profile, Level-3.1 (Main tier)
x265 [info]: Thread pool created using 4 threads
...
I guess the main difference lies in adaptively choosing the right bit depth at the time of encoding.
Yours can but the official x265 cannot.

Last edited by JKyle; 8th April 2020 at 17:17.
JKyle is offline  
Old 8th April 2020, 18:39   #1654  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
An interesting observation I have made with encoding x265 4K. Encoding with a lower CRF takes more time. CRF 21 is a little slower than CRF 22 and CRF 20 is significantly slower.

I would have thought that if you wanted a better quality and use less compression, it should be faster to encode but it is the opposite. So, it is interesting on how to decide which CRF to use. Not only it depends on the quality you want, you have to consider how slow the encoding will be. I'm thinking that for me 4K CRF 20 is a no go for me. Too slow.
here is a benchmark:

https://forum.doom9.org/showthread.php?t=180438


Quote:
In 2.1.0.5 beta, Tools > Folders > Templates menu tries to open a wrong folder, TemplatesV2.
Will be fixed in the next build.

Quote:
In PowerShell, it fails with this error message:

On the other hand, it does not produce any error but encodes the file successfully in the Command Prompt.
Not every command line that works in cmd works also in ps, at least not without modification, piping to x265 does not work unless you do:

Code:
cmd /s /c --% "regular command line between this quotes"
https://docs.microsoft.com/en-us/pow...powershell-5.1

That is similar to what staxrip does, calling cmd /s /c "" with the dotnet Process class with shellex disabled, it uses CreateProcess in Win32.

I think it was quot27 who gave me this clue.

In the next build there are some terminal related improvements:

https://github.com/staxrip/staxrip/b...r/Changelog.md

Last edited by stax76; 8th April 2020 at 18:41.
stax76 is offline  
Old 8th April 2020, 19:23   #1655  |  Link
Patman
Registered User
 
Patman's Avatar
 
Join Date: Jan 2015
Posts: 286
Quote:
Originally Posted by stax76 View Post

That is similar to what staxrip does, calling cmd /s /c "" with the dotnet Process class with shellex disabled, it uses CreateProcess in Win32.

I think it was quot27 who gave me this clue.
I gave you the tipp too for SVT-AV1 encoder
__________________
Tools for StaxRip | x264 - x265
Patman is offline  
Old 8th April 2020, 19:31   #1656  |  Link
Patman
Registered User
 
Patman's Avatar
 
Join Date: Jan 2015
Posts: 286
Quote:
Originally Posted by JKyle View Post
I guess the main difference lies in adaptively choosing the right bit depth at the time of encoding.
Yours can but the official x265 cannot.
THX for testing JKyle, that's the point. I want to update my x265 builds, but with this known error i won't to build new versions. I hope the x265 devs can help with this problem. Till version x265-3.3+15 everything works fine, but after that version the error ocurrs. The offical build worked also fine till version 3.3+10. I hope other users can confirm this error.
__________________
Tools for StaxRip | x264 - x265

Last edited by Patman; 8th April 2020 at 19:35.
Patman is offline  
Old 8th April 2020, 20:27   #1657  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
Quote:
Originally Posted by stax76 View Post
Not every command line that works in cmd works also in ps, at least not without modification, piping to x265 does not work unless you do:

Code:
cmd /s /c --% "regular command line between this quotes"
https://docs.microsoft.com/en-us/pow...powershell-5.1
Now your tip wakes up my vague memory that PowerShell's piping is different from cmd's piping.

Thank you for the pointer.
JKyle is offline  
Old 8th April 2020, 20:33   #1658  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
BTW, chapterEditor is updated to 1.22:

https://www.videohelp.com/software/chapterEditor
JKyle is offline  
Old 8th April 2020, 21:03   #1659  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by Patman View Post
I gave you the tipp too for SVT-AV1 encoder
Recently yes, and also thanks for the command line example.

Quote:
BTW, chapterEditor is updated to 1.22:
Thanks, bookmarked.
stax76 is offline  
Old 9th April 2020, 06:44   #1660  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 391
Quote:
Originally Posted by Atlantis View Post
Wow, that's huge and it would take me several days to encode just 1 video like that.

What is your processor and memory?
Mine:
CPU : Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
GPU : NVIDIA GeForce GTX 980 Ti
Interestingly staxrip log does not include the memory.
RAM 64GB
My encoding rig is a Ryzen 1700 stock speeds. It does pretty good!

For encoding 4K you pretty much are going to be encoding for ever regardless.
jlw_4049 is offline  
Closed Thread

Tags
aac, hdr, hevc, nvenc, staxrip, x264, x265

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 15:31.


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