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. |
|
|
Thread Tools | Search this Thread | Display Modes |
7th October 2013, 01:52 | #221 | Link |
Registered User
Join Date: Sep 2004
Posts: 29
|
Hi Asmodian,
here's my little avisynth script. I can get this to work with CCE 2.5, but CCE SP3 won't work, nor will Tmpgenc with it. I need to go RGB to use the Virtualdub DeLogo plugin with Avisynth, then back to YUY2 for avisynth to use ResampleHQ. Also a question. One person said that the Dither plugin gave a sharper output to ResampleHQ. Is this so? I'd like to try it and compare encodes with it. What would be an equivalent Dither script I could use, if someone could suggest one? Thanks. LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ColorMatrix.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\NicAudio.dll") mpeg2source("O:\The Runaways - School Days (RAGE SD).d2v", info=3) converttorgb32() LoadVirtualDubPlugin("C:\VirtualDubMod_1_5_10_2_All_inclusive\plugins\delogo.vdf", "delogo") delogo(1,"","C:/Delogo/Mask Files/Deblend.bmp", "C:/Delogo/Mask Files/Alpha.bmp", "c:/Delogo/Mask Files/Color.bmp", "C:/Delogo/Mask Files/Repair.bmp", 15, 40, 1, 0) crop(98,2,-94,-0) ResampleHQ(width=720, height=576, dstcolorspace="YUY2", srcmatrix="TV.601", kernel="spline36", chroma_kernel="spline36") ConvertToYUY2 |
12th October 2013, 21:34 | #222 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
|
You are going back to YUY2 after ResampleHQ but that is ok as ResampleHQ supports RGB color spaces.
Maybe the one person who thought Dither is sharper was in the context of YV12 or YUY2? Dither is "sharper" than ResampleHQ because dithering is not currently supported for YV12 and YUY2 in ResampleHQ. Dithering is mostly destroyed by DCT compression. Here is an example Dither script to implement a ResampleHQ like resize. Like with ResampleHQ I suggest you only use liner light resize when downsampling. Code:
Dither_convert_8_to_16() Dither_y_gamma_to_linear() Dither_resize16(1280, 720) Dither_y_linear_to_gamma() DitherPost() |
27th October 2013, 08:24 | #223 | Link |
Registered User
Join Date: Sep 2004
Posts: 29
|
Thanks, but putting "dither" in the script, gives me "DitherPost: Input Must Be Planar." I have no idea what that means. Also, can someone PLEASE explain why ResampleHQ won't work with Tmpgenc but works fine with old version of cinema craft encoder? When I try and frameserve the script to Tmpgenc, I get a line in red letters "ResampleHQ Internal Error:". The latest version of CCE won't work either. I'm at a loss. Is there something extra I need to put in the script so Tmpgenc will work? Thanks. Also, I don't think ResampleHQ supports RGB color space. If I put "RGB" instead of "YUY2" in the script. It won't work. Has ResampleHQ been updated to work with RGB color space now? Thanks.
Last edited by astronob; 27th October 2013 at 08:31. |
27th October 2013, 08:50 | #224 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
YUY2 is not a planar colorspace, Y, U and V components are interleaved and packed in pairs of pixels. You can convert first your clip with ConvertToYV16(), which is the same as YUY2 but in a planar form.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
15th May 2015, 19:34 | #228 | Link |
Registered User
Join Date: Jun 2007
Posts: 414
|
This projected seems to be dormant since 2011, but there was a newer source code posted and since version 8 did not include a 64-bit plugin I decided to build it. I can't promise it will be stable as it was never released by the creator, but it does appear to be working. I included a compile of the x86 version too, but I would trust version 8 over this one.
Download |
15th May 2015, 19:42 | #229 | Link | |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
Quote:
|
|
15th May 2015, 19:51 | #230 | Link |
Registered User
Join Date: Apr 2012
Location: Germany
Posts: 153
|
Spline100 has the best compressability which is awesome for youtube.
Also I like the ringing free scaling by Spline100 in general edit: oh I thought it was the SplineResize Thread instead of ResampleHQ. sorry. edit 2: But I can add something to this thread as well: The documentation of ResampleHQ says youtube uses tv.601 But thats wrong. They use tv.709. Last edited by De-M-oN; 15th May 2015 at 22:51. |
29th March 2021, 05:06 | #233 | Link | |
Registered User
Join Date: Jul 2018
Posts: 1,041
|
Quote:
With ConvertYUVtoLinearRGB() Do_resample() ConvertLinearRGBtoYUV() "What is the source matrix value for 4k?" It depends on content source. May be any of 601/709/2020 for SDR. Try to look in metadata if available. Last edited by DTL; 29th March 2021 at 05:10. |
|
20th July 2021, 10:36 | #235 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Quote:
|
|
20th July 2021, 14:23 | #236 | Link |
Registered User
Join Date: Jul 2013
Posts: 38
|
I confused something. Thanks for the explanation. What is the correct script for HDR gamma-aware resize?
My Idea: z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l",resample_filter="spline36",resample_filter_uv="spline36",approximate_gamma=false) Spline36Resize(1920,1080) z_ConvertFormat(pixel_type="YUV422P10",colorspace_op="rgb:linear:2020:l=>2020ncl:st2084:2020:l",resample_filter="spline36",resample_filter_uv="spline36",approximate_gamma=false) Last edited by joearmstrong; 20th July 2021 at 15:01. |
20th July 2021, 15:10 | #237 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,718
|
I think the HDRTools plugin makes it even easier.
z_ConvertFormat(chromaloc_op="top_left=>mpeg2") ConvertYUVtoLinearRGB(color=1, outputmode=2) Spline36Resize(1920,1080) ConvertLinearRGBtoYUV(color=1, outputmode=2) z_ConvertFormat(chromaloc_op="mpeg2=>top_left") It should return a 16-bit YV12 clip you can feed to the encoder. I think the chroma location should also be changed before and after resizing because the standard resizer does not use the UHD one.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
21st July 2021, 01:20 | #238 | Link | ||
Registered User
Join Date: Jul 2018
Posts: 447
|
Quote:
Quote:
|
||
21st July 2021, 05:47 | #239 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Quote:
Is that the correct way of doing it? |
|
21st July 2021, 09:10 | #240 | Link |
Registered User
Join Date: Jul 2018
Posts: 447
|
Yes, the syntax is correct.
"approximate_gamma=false" will dramatically decrease the speed and probably doesn't worth it. For UHD scaling if there is no chromaloc property, chromaloc_op="top_left=>top_left" should be added to both lines. Scaling in linear light could easily lead to increased/created haloing. The chance is very high using spline36. Last edited by StvG; 21st July 2021 at 10:21. Reason: typo |
Thread Tools | Search this Thread |
Display Modes | |
|
|