Happy Friday! and thanks in advance for any help. I'm trying for the first time to downscale a 4K 2060p HEVC 10bit video to 2K 1080p AVC 10bit but am having trouble. The script
works as it should, but as soon as I activate the resize line MeGUI crashes. I've spent half a day searching for a solution without any success. I'm thinking it's an issue with the HEVC source but, to be honest, I've no idea .Code:# Set DAR in encoder to 1920 : 817. The following line is for automatic signalling global MeGUI_darx = 1920 global MeGUI_dary = 817 LoadPlugin("PathToLSMASHSource.dll") LWLibavVideoSource("TestClip[2160p].mkv", format="YUV420P8") SetFilterMTMode("Default_MT_Mode",2) SMDegrain(TR=3,ThSAD=500,RefineMotion=True,Plane=0,Chroma=False,n16=True,n16_Out=True) ### Spline36Resize(1920,817).Sharpen(0.2) ### FastLineDarkenMod4() F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0) PreFetch(5)
Here's a short clip[New].
Thanks again for any help .
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 33
Thread
-
Last edited by LouieChuckyMerry; 6th May 2023 at 15:04.
-
Typical delivery format video, with 4:2:0 chroma sampling has to be mod2 sizes, width and height
-
-
4x Less pixels to denoise. 4x better performance.
Why Would you denoise pixels just to discard them in next step VIA resizing?Last edited by Atak_Snajpera; 5th May 2023 at 16:12.
-
-
so, instead of Spline36Resize(1920,817) use either Spline36Resize(1920,818) or Spline36Resize(1920,816)
users currently on my ignore list: deadrats, Stears555 -
-
davexnet: No error code of any kind, MeGUI simply disappears.
_____________
Here's the MediaInfo for the video:
Code:Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5@High Codec ID : V_MPEGH/ISO/HEVC Duration : 1 h 50 min Bit rate : 20.6 Mb/s Width : 3 840 pixels Height : 1 634 pixels Display aspect ratio : 2.35:1 Frame rate mode : Constant Frame rate : 23.976 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 10 bits Bits/(Pixel*Frame) : 0.137 Stream size : 15.9 GiB (85%) Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709
-
@LouieChuckMerry, the video on your "Here's a short clip" link in your post #1 is as Jagabo says:
Code:General Unique ID : 298982791378727529867026321803490179530 (0xE0EDFDB73D8DEB7D37532C65EA2D39CA) Complete name : C:\Users\bb19\Downloads\TestClip[2160p].mkv Format : Matroska Format version : Version 4 File size : 14.4 MiB Duration : 5 s 89 ms Overall bit rate : 23.8 Mb/s Frame rate : 23.976 FPS Encoded date : 2023-05-05 19:28:48 UTC Writing application : mkvmerge v68.0.0 ('The Curtain') 64-bit Writing library : libebml v1.4.2 + libmatroska v1.6.4 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings : CABAC / 5 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 5 frames Codec ID : V_MPEG4/ISO/AVC Duration : 5 s 89 ms Bit rate : 23.7 Mb/s Width : 1 920 pixels Height : 808 pixels Display aspect ratio : 2.40:1 Frame rate mode : Constant Frame rate : 23.976 (23976/1000) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive
-
I would create a manual script in Notepad, and see if it opens in VIrtualdub2 or AVSPmod
See if it performs as expected.
As was mentioned previously, the clip posted in the first post above, is not what you're describing.
It's neither HEVC, 10-bit nor 4K -
ALL: I'm really sorry and not sure why my uploaded clip is not as the source (I did wonder why a five second section cut from a source using MKVToolNix registered as a five-plus minutes file in MediaInfo). I'll make a more accurate clip as soon as I can, thanks for your patience.
-
That's total BS. Simple Spline36Resize filter does not need denoised pixels to be accurate. Besides when you downscale you already perform denoising because 4 pixels will be averaged to just 1 pixel. What you do is extremely inefficient. Your time , your electricity bill and your placebo effect...
-
That's total BS.
It's easier/more accurate to properly clean (denoise, deblock, derainbow,..) in the native resolution, especially if you upscale afterward.
If you !downscale!, depending on the noise and artifacts in the source, it can be fine to resize first, and it will be beneficial to the processing speed.users currently on my ignore list: deadrats, Stears555 -
But we are NOT upscaling! We are downscaling. No need to waste time for pixels which will be discarded anyway and then butchered by H.264/AVC compression algorithms.
Last edited by Atak_Snajpera; 6th May 2023 at 03:23.
-
True, but the general advice isn't BS. + depending on the nature of the source, downscaling can unnecessarily change the nature of artifacts&co and thus hinder proper cleaning.
So your advice isn't really that good of a general advice either.
=> it always dependsusers currently on my ignore list: deadrats, Stears555 -
it is obvious what I meant if you read his post
As explained to me at Doom9 by several people, removing noise first allows for better accuracy on the resize. -
Not, to me. To me, that seems more like a not so well phrased statement. And it's more about the quality of the resize than the accuracy.
So I agree, to disagree and think your blatantThat's total BS.users currently on my ignore list: deadrats, Stears555 -
I agree with Selur. Saying "That's total BS." is wrong.
If you denoise before upscale is always better. If you denoise before downscale it can produce better results or it can be transparent with respect to a denoise after downscale.
Then, if you denoise before you're never wrong, and it is always the best blind choice. Eventually, you may loose resources efficiency and electricity bill in downscaling under certain conditions, but is marginal and neglettable. -
When you downscale from 4K to FHD you are averaging 4 pixels to 1 pixel.
Example
This means that you do not have to use aggressive denoising settings later in the script. More aggressive settings in SMdegrain may introduce ghosting artefacts. Simple!Last edited by Atak_Snajpera; 6th May 2023 at 05:49.
-
If one if the four gray pixel is noise, it will be included in the average pixel while it should be not, and it will be not possible to remove it later after downscale.
There are other cases where this do not apply.
Simple!
P.S. SMdegrain perform its best feature as a temporal denoiser, meaning that it looks to denoise between frames and not inside same frame, like TemporalDegrain2. Choose a pure spatial denoiser for your example -
You live in perfect world where SMDegrain can ALWAYS detect noise perfectly. Averaged pixels will be less visible to our eyes so what is your problem? Besides lossy codecs like x264/x265 will destroy your fine pixels anyways by further "averaging" those pixels.
Stop living in placebo bubble and do not waste energy. -
so what is your problem?
Besides x264/x265 will destroy your fine pixels anyways by further "averaging" those pixels.
Stop living in placebo world and do not waste energy. -
Have you ever heard about term "Diminishing returns"
https://en.wikipedia.org/wiki/Diminishing_returns
I'm talking about common sense. You just like placebo effect. -
Have you ever heard about term "Diminishing returns"
I'm talking about common sense. You just like placebo effect. -
ALL: I used Avidemux to cut the clip and it seems OK; the link in my original post has been edited.
_____________
This script:
Code:# Set DAR in encoder to 1920 : 816. The following line is for automatic signalling global MeGUI_darx = 1920 global MeGUI_dary = 816 LoadPlugin("PathToLSMASHSource.dll") LWLibavVideoSource("TestClip[2160p].mkv", format="YUV420P8") SetFilterMTMode("Default_MT_Mode",2) SMDegrain(TR=3,ThSAD=500,RefineMotion=True,Plane=0,Chroma=False,n16=True,n16_Out=True) Spline36Resize(1920,816).Sharpen(0.2) ### FastLineDarkenMod4() F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0) PreFetch(5)
_____________
Atak_Snajpera: For what it's worth, when I began trying to learn AviSynth I wanted to know the "best" way to order things and wound up at Doom9. After much helpful input I settled on:
Code:# Deinterlace # Color Conversion # Color Adjustment # Crop # Denoise # Resize # Sharpen # Deband # Dither
Last edited by LouieChuckyMerry; 7th May 2023 at 13:54. Reason: Typo
-
Try mClean instead of SMDegrain.
Cu Selur
Ps.: SCUNet, isn't bad to remove such noise: https://imgsli.com/MTc2NTM4 (but it's probably too slow and would require Vapoursynth)users currently on my ignore list: deadrats, Stears555
Similar Threads
-
Multi Rate HEVC Encodes for 720p/1080p/2160p
By mukeshsinh in forum Newbie / General discussionsReplies: 0Last Post: 29th Jul 2021, 08:22 -
Best Way To Downscale 1080p 30fps Sports Video to 720p for Bluray?
By AndersonJames in forum RestorationReplies: 10Last Post: 18th Jun 2020, 13:25 -
Best FFmpeg command for downscaling h264 video from 2160p 1080p?
By jorax68528 in forum Video ConversionReplies: 3Last Post: 12th May 2020, 18:52 -
How do I downscale a 4K video to 1080p Bluray quality?
By SomeoneNeutral in forum Authoring (Blu-ray)Replies: 3Last Post: 18th Sep 2019, 18:13 -
Why AVC looks better than 10-bit HEVC with same CRF
By vash1 in forum Newbie / General discussionsReplies: 5Last Post: 22nd Nov 2018, 06:53