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 24th June 2019, 18:57   #561  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
One last thing, how to crop visually? I want to crop after resize and not before.
The crop dialog uses the source filter as source because it's usually best to crop after the source filter.

Nobody ever requested to change it to use all filters before/until crop instead, it should be considered to change this I guess.
stax76 is offline  
Old 24th June 2019, 19:33   #562  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
I was thinking because depending of what output mod you have 4 or 8 or 16, it makes more sense to crop after resize to achieve your output mod.

After the resize you can crop less and keep some black lines to match your output mod. Before resizing you don't know how much to crop.
Atlantis is offline  
Old 24th June 2019, 20:16   #563  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Maybe create an issue on the tracker, there is a chance that at some time somebody likes to implement this.
stax76 is offline  
Old 25th June 2019, 09:33   #564  |  Link
Natty
Noob
 
Join Date: Mar 2017
Posts: 221
you can drag and drop crop filter to be after resize filter
Natty is offline  
Old 26th June 2019, 14:56   #565  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 90
Since a yuv420 source only has half resolution for the chroma information, how would one resize a 4K yuv420 source to 2K yuv444 in a way that it only resizes the luma and keeps the resolution of the chroma?
Would it work if i just convert the yuv420 to yuv444 before resizing?
K.i.N.G is offline  
Old 26th June 2019, 17:43   #566  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
@K.i.N.G
Assuming that StaxRip uses avisynth (think it does), then maybe below of use

Code:
Colorbars(pixel_type="YV12")
ConvertBits(10)
###
U=UtoY
V=VtoY
Y=Spline36Resize(Width /2,Height/2).ConvertToYUV444   # convertToY/Y8 is currently broken [EDIT: for non 8 bit]:- https://forum.doom9.org/showthread.p...85#post1877985 
YtoUV(U,V,Y)
info
Mainly pointing out the problem with convertToY/Y8, and a way around the problem.

EDIT: Not sure if technically correct to just re-use raw UV without some kind of chroma shift for YUV444, maybe post in Avisynth usage to find out.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 27th June 2019 at 01:17.
StainlessS is offline  
Old 27th June 2019, 18:13   #567  |  Link
Revan654
Registered User
 
Revan654's Avatar
 
Join Date: May 2004
Posts: 324
Not sure what magic has happened from 3.0 to 3.1. But Encoding has doubled, My speed went from 20fps to 40fps on my last encoding.

----

Also The Pipeline has tweaked a bit, Anytime a new Build Number is Pushed in the Source code it will also build a new version.
Revan654 is offline  
Old 27th June 2019, 20:31   #568  |  Link
Revan654
Registered User
 
Revan654's Avatar
 
Join Date: May 2004
Posts: 324
Staxrip 2.0.2.4

Quote:

Tweaked the VUI Code, If video you import video has Metadata for ColorSpace.
It Will AutoSelect the proper values.
Slight Tweak to HDR VUI as well.
Updated x265 & Nvencc Encoder Settings.
x265 will now Targets 3.1.
Tweaked the VS startup filters.
Included Two versions of exe file, One targets 4.7.2 framework and other
targets the newer 4.8 framework.
Updated FFMpeg, NVEnc, QSVEnc, x265, MKVTool, MTN and few other Files.
Link: https://ci.appveyor.com/project/Revan654/staxrip
Link: https://github.com/Revan654/staxrip/...es/tag/2.0.2.4
Link: https://github.com/staxrip/staxrip/releases/tag/2.0.2.4

Some Small Tweaks and Fixed the VUI Import Function for Non-HDR Content(If the Video you Import has ColorSpace Metadata). It will apply the VUI automatically(Only x265 / x264 Was Tested).
Revan654 is offline  
Old 27th June 2019, 22:42   #569  |  Link
Natty
Noob
 
Join Date: Mar 2017
Posts: 221
thanks revan, i will test it tomorrow
Natty is offline  
Old 27th June 2019, 22:57   #570  |  Link
MrBrownCow
Registered User
 
Join Date: Feb 2019
Posts: 29
I'm still trying to get the DGHDRtoSDR dll installed. I made some progress when I saw on another forum thread that you need to put the dll in the AviSynth+ directory. I think I have that loaded now but still get the below error. Can anyone tell me what I might be missing here?

Error: "Script error: the named argument "tm" to DGHDRtoSDR had the wrong type"
https://imgur.com/a/ljCkc6Y

Profile change:
https://imgur.com/a/v496oNf

Code:
AVSMeter 2.9.0 (x64) - Copyright (c) 2012-2019, Groucho2004

VersionString:              AviSynth+ 0.1 (r2772, MT, x86_64)
VersionNumber:              2.60
File / Product version:     0.1.0.0 / 0.1.0.0
Interface Version:          5
Multi-threading support:    Yes
Avisynth.dll location:      C:\WINDOWS\SYSTEM32\avisynth.dll
Avisynth.dll time stamp:    2018-12-20, 20:55:16 (UTC)
PluginDir2_5 (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64
PluginDir+   (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64+


[CPP 2.6 Plugins (64 Bit)]
C:\Program Files (x86)\AviSynth+\plugins64+\ConvertStacked.dll  [2018-12-20]
C:\Program Files (x86)\AviSynth+\plugins64+\DGHDRtoSDR.dll  [1.0.0.12]
C:\Program Files (x86)\AviSynth+\plugins64+\DirectShowSource.dll  [2018-12-20]
C:\Program Files (x86)\AviSynth+\plugins64+\ImageSeq.dll  [2018-12-20]
C:\Program Files (x86)\AviSynth+\plugins64+\Shibatch.dll  [2018-12-20]
C:\Program Files (x86)\AviSynth+\plugins64+\TimeStretch.dll  [2018-12-20]
C:\Program Files (x86)\AviSynth+\plugins64+\VDubFilter.dll  [2018-12-20]
C:\Program Files (x86)\AviSynth+\plugins64\DGHDRtoSDR.dll  [1.0.0.12]

[Scripts (AVSI)]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.avsi  [2016-07-05]

[Uncategorized files]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.txt  [2016-07-05]

Last edited by MrBrownCow; 27th June 2019 at 23:32.
MrBrownCow is offline  
Old 27th June 2019, 23:16   #571  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
@MrBrownCow

Try changing

Code:
tm="gamma"
to

Code:
tm=1.0
When you use quotes then AviSynth creates a string type but the filter expects the tm parameter to be of type float.

from the filter docs:

Quote:
tm=1.0 Strength of tonemapping. Reduce this towards 0.0 to smoothly transition
to blowout (clipping) of highlights. This value controls a LERP between Reinhard
tonemapping and no tonemapping. Default is 1.0.

Last edited by stax76; 27th June 2019 at 23:22.
stax76 is offline  
Old 27th June 2019, 23:19   #572  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
tm is now a float. Somebody or something is generating parameters for an earlier verion of DGHDRtoSDR.

BTW, you should obscure your download names to avoid running afoul of forum rule 6.
videoh is offline  
Old 27th June 2019, 23:27   #573  |  Link
MrBrownCow
Registered User
 
Join Date: Feb 2019
Posts: 29
Quote:
Originally Posted by stax76 View Post
@MrBrownCow

Try changing

Code:
tm="gamma"
to

Code:
tm=1.0
When you use quotes then AviSynth creates a string type but the filter expects the tm parameter to be of type float.

from the filter docs:

Thank you. I was just looking at the txt file associated to DGHDRtoSDR and saw some of the default settings. I changed it to this:

Code:
HDRtoSDR = DGHDRtoSDR(impl="255",tm=1.0,light=300,gamma=0.42,fulldepth=true,r=1.0,g=1.0,b=1.15)
then restarted staxrip, tried again and i get this script error now:

DGHDRtoSDR: input must be CS_YUV420P16
MrBrownCow is offline  
Old 27th June 2019, 23:33   #574  |  Link
MrBrownCow
Registered User
 
Join Date: Feb 2019
Posts: 29
Quote:
Originally Posted by videoh View Post
tm is now a float. Somebody or something is generating parameters for an earlier verion of DGHDRtoSDR.

BTW, you should obscure your download names to avoid running afoul of forum rule 6.
Thank you, updated my post to hopefully comply with rule 6
MrBrownCow is offline  
Old 27th June 2019, 23:35   #575  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
@MrBrownCow

To make it a little easier for us better post the full script as text and obscure the file path if necessary.

Last edited by stax76; 27th June 2019 at 23:41.
stax76 is offline  
Old 27th June 2019, 23:51   #576  |  Link
MrBrownCow
Registered User
 
Join Date: Feb 2019
Posts: 29
Quote:
Originally Posted by stax76 View Post
@MrBrownCow

To make it a little easier for us better post the full script as text and obscure the file path if necessary.
I only had this in the profile section:

Code:
[Misc]
Histogram = Histogram("levels", Bits=$select:msg:Select BitDepth;8;10;12$)
MTMode | Prefetch = Prefetch($enter_text:Enter the Number of Threads to Use$)
MTMode | Set Max Memory = SetMemoryMax($enter_text:Enter the Maximum Memory Avisynth Can use$)
MTMode | Set Threads = threads=$enter_text:Enter The Number of Threads to Use$
MTMode | SetMTMode Filter = SetFilterMTMode("$enter_text:Enter The FilterName$",$enter_text:Enter Mode You Wish to Use$)
SplitVertical = Splitvertical=True
HDRtoSDR = DGHDRtoSDR(impl="255",tm=1.0,fulldepth=true,light=300,gamma=0.42,r=1.0,g=1.0,b=1.15)
I dont have any script yet so I guess thats my issue. Looking at the DGHDRtoSDR_1.12.txt document it gives some sample scripts but I dont have too much experience with this. Do I need to make a powershell script with this info somehow for this to work?
MrBrownCow is offline  
Old 27th June 2019, 23:56   #577  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
You can choose 'Preview Code' in the filters menu to get the full avs/vs script.
stax76 is offline  
Old 28th June 2019, 00:06   #578  |  Link
MrBrownCow
Registered User
 
Join Date: Feb 2019
Posts: 29
Quote:
Originally Posted by stax76 View Post
You can choose 'Preview Code' in the filters menu to get the full avs/vs script.
Code:
LoadPlugin("C:\StaxRip-x64-2.0.2.3-test\Apps\Plugins\avs\ffms2\ffms2.dll")
FFVideoSource("C:\The Matrix 2160p.mkv", colorspace = "YV12", \
              cachefile = "C:\The Matrix 2160p_temp\The Matrix 2160p.ffindex")
DGHDRtoSDR(impl="255",tm=1.0,fulldepth=true,light=300,gamma=0.42,r=1.0,g=1.0,b=1.15)
I'm guessing I need to refrence the other dll files somehow like the example notes?

Code:
Here is a typical Avisynth+ script using default parameters:

loadplugin("dgdecodenv.dll")
loadplugin("dghdrtosdr.dll")
DGSource("hdr_sample.dgi",fulldepth=true)
DGHDRtoSDR()
prefetch(6)
MrBrownCow is offline  
Old 28th June 2019, 00:19   #579  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
DGHDRtoSDR: input must be CS_YUV420P16
I think you need some format conversion, I don't remember it because I gave up encoding, ConvertBits() maybe.

http://avisynth.nl/index.php/ConvertBits
stax76 is offline  
Old 28th June 2019, 01:50   #580  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Thank you for the guidance, stax76!

MrBrownCow, your source filter must deliver high bit depth (i.e., greater than 8-bit; most HDR is 10-bit). DGSource() does that when fulldepth=true. If you have another source filter delivering high bit depth it may be necessary to convert its output to YUV420P16 using an Avisynth conversion function (e.g., if the source filter delivers 10-bit).

For FFVideoSource you definitely do not want colorspace = "YV12", because that is only 8-bit.

Last edited by videoh; 28th June 2019 at 02:00.
videoh 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 14:41.


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