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. |
4th February 2023, 13:17 | #1981 | Link | |
Registered User
Join Date: Jul 2018
Posts: 1,074
|
Quote:
|
|
4th February 2023, 16:20 | #1982 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
eg. Code:
colorbarshd(1920,1080) Code:
colorbarshd(1920,1080) deep_resize(1280,720, grain=0) |
|
4th February 2023, 18:46 | #1983 | Link | ||
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Quote:
The update to SceneStats with IQM is finished except for an issue on the accumulator that I have to fix, it's challenging me. Quote:
EDIT: ScenesPack updated, ex_autolevels() in GradePack also updated.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 4th February 2023 at 20:54. |
||
4th February 2023, 21:53 | #1984 | Link | |
Registered User
Join Date: Feb 2003
Posts: 107
|
Quote:
Code:
https://send.cm/d/K1aD spline36resize(960,720) to propSet("_FieldBased",0).deep_resize(960,720,grain=0,qual=2,gpuid=-1) |
|
4th February 2023, 22:01 | #1985 | Link | |
Registered User
Join Date: Feb 2003
Posts: 107
|
Quote:
Code:
https://send.cm/d/K1b5 |
|
4th February 2023, 22:12 | #1986 | Link | |||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
Also, you're upscaling "SD" to "HD", the usual convention is to apply colormatrix or similar transform from 601 to 709 , and flag the encode properly "HD" material by default uses 709 , "SD" by default 601 (some rare exceptions) . Some players will use 709 to convert to RGB for display for HD (height > 576), so video colors will look shifted if it uses the wrong matrix Quote:
Check your dependencies Quote:
Maybe try setting the matrix property propSet("_Matrix",1) #709 Last edited by poisondeathray; 4th February 2023 at 22:22. |
|||
5th February 2023, 00:17 | #1987 | Link | ||
Registered User
Join Date: Feb 2003
Posts: 107
|
Quote:
Here's screenshots of what I'm seeing. Spline36Resize Code:
https://send.cm/oo8tlpqk5ey7 Code:
https://send.cm/4izbhjbte3rw Quote:
I tried adding propSet("_Matrix",1) before deep_resize like you suggested and still get the error. |
||
5th February 2023, 01:06 | #1988 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Screenshots definitely show a 709 vs. 601 mismatch. But I cannot reproduce it with deep_resize and that script
How are you taking screenshots ? Is this a preview or encode ? How are you viewing it ? How is the RGB conversion being done ? Quote:
What avs+ version ? |
|
5th February 2023, 02:03 | #1989 | Link | ||
Registered User
Join Date: Feb 2003
Posts: 107
|
Quote:
Quote:
Code:
https://send.cm/ifax6um50ces |
||
5th February 2023, 02:30 | #1990 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
If you don't know what it's doing for the preview, you can explicitly control the conversion by addding ConvertToRGB(matrix="rec709"), or ConvertToRGB(matrix="rec601") (just don't forget to remove them when encoding) Quote:
Did you check the script in another application, such as mpchc, avspmod ? Maybe some specific issue with megui ? Last edited by poisondeathray; 5th February 2023 at 02:33. |
||
5th February 2023, 06:06 | #1991 | Link | ||
Registered User
Join Date: Feb 2003
Posts: 107
|
Quote:
I did use the Frame Properties tool in AvsPmod and the color primaries/matrix/tranfer are read as undefined until deep_resize is applied. Then they change to Rec.709. So I think what's happening in MeGUI is since the matrix properties are undefined it's just making an assumption based on frame size that the matrix is Rec.601 and using that to preview. But deep_resize explicitly sets the matrix properties to Rec.709 so when I apply that filter MeGUI changes it's preview matrix to match and that's why I'm seeing the difference. Now I'm wondering, is deep_resize actually converting the color primaries/matrixes/transfers to Rec.709 or is it just flagging it as that in the frame properties. If it's just flagging it wouldn't that lead to improper color display at playback. But also if it's actually converting it, I noticed that it still changes it to Rec.709 if downsizing 480p video. Wouldn't that be incorrect? Shouldn't it stay at Rec.601 in that case? Quote:
But it seems both problems were in the MeGui previewer, not deep_resize. Although in the first instance I think MeGui handled the matrix display correctly, make an assumption about matrix based on source frame dimensions until matrix is specified. I prefer that to the way AvsPmod does it. |
||
5th February 2023, 07:32 | #1992 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
Quote:
Avisynth can pass frame properties to some programs -e.g. ffmpeg - so it actually can affect the end result and tagging and other program behaviour. Beware of or learn the new behaviour. Some people like to clear the props before encoding, and/or after loading video - so one option is to clear some or all of the properties after the source filter, or set some or all of them specifically . Props are good and bad - but in some cases they can screw up the results if you're not careful - if a filter makes assumptions or uses values based on props. Sometimes videos are tagged incorrectly . A common one is "PAL" area distribution e.g. progressive content DVD's or BD's , that are encoded interlaced. Vapoursynth users are used to these "props" problems (props have been there a few years longer) but it has invaded avisynth now. Beware and there will be growing pains You should notify megui developers about the preview issue |
||
5th February 2023, 10:36 | #1993 | Link | |
21 years and counting...
Join Date: Oct 2002
Location: Germany
Posts: 716
|
Quote:
Also right now I'm trying with much smaller temporal radii which seems to reduce the effect, as expected, but at the cost of losing precision. Maybe a mix of denoising and leaving some residual noise is best here. It still beats that clean but wobbly look. |
|
5th February 2023, 12:15 | #1994 | Link | |
Registered User
Join Date: Jul 2018
Posts: 1,074
|
Quote:
Second part of solution may be combining first and second (shifted to half of grid step diagonally) clips with same method as overlapping blocks for denoise - you can use BlockOverlap plugin or Overlay with manually painted mixing mask (or may be masktools can help). But shifting diagonally 1/2 grid step for very dense grids for small blocks of denoise work good - leaving only 1/2 of blocksize uncovered regions near the very edges of frame. And shifting very large 'blocks' of stabilization with only something like 3x3 cutting grid may still leave large enough unfixed lines at the edges of the frame and may need more edges of frame workarounds. Next step may be pad original frame with 'stab blocksize/2' borders and so you can provide 2 sets of the stabilized clips to BlockOverlap covering all parts of original frame. BlockOverlap is https://forum.doom9.org/showthread.php?t=101307 and https://github.com/DTL2020/BlockOver...s/tag/v0.2-x64 x64 build. Last edited by DTL; 5th February 2023 at 12:29. |
|
5th February 2023, 15:56 | #1995 | Link | |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Quote:
Right now I'm playing with some ideas from Stab() using TemporalSoften to reduce the flicker further. An example: Code:
ffvideosource("noisy_original.mkv") propSet("_FieldBased",0) Stab() SceneStats("Range+Stats") pref = ex_autolevels() temp = Pref.TemporalSoften(5,255,0,25,2) # SC thr to 25 otherwise pans will stutter rep = temp.Repair(Pref.TemporalSoften(1, 255,0,25,2)) pref=ex_merge(rep, pref,MotionMask(rep,scale=10,sharpness=5)) SMDegrain(6, 1000, mode="TemporalSoften",prefilter=pref,LFR=false,RefineMotion=true) ex_unsharp(0.3) gr = 1 size = (720/2133.) * 3.3 GrainFactory3mod(g1str=7*gr,g2str=9*gr,g3str=7*gr,g1size=1.7*size,g2size=1.4*size,g3size=1.4*size,g1cstr=0.5*gr,g2cstr=0.3*gr,g3cstr=0.1*gr,temp_avg=1,tv_range=true)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 5th February 2023 at 17:26. |
|
5th February 2023, 19:06 | #1997 | Link | ||
Registered User
Join Date: Feb 2003
Posts: 107
|
Quote:
Quote:
The developer of megui hasn't been very active for a number of years now, unfortunately. It's still possible to update the various external supporting tools but the actual framework gui pretty much is what it is. |
||
5th February 2023, 20:44 | #1999 | Link | |
Registered User
Join Date: Feb 2003
Posts: 107
|
Quote:
So what's the best way to handle this? Should I clear props after deep_resize to not confuse anything further along in the chain? And just encode it as 601? Or since deep_resize is flagging the video as 709 and since most playback software/hardware will assume 709 based on the HD frame resolution, should I already be converting the colorspace & range myself when upscaling to 720p or higher? Adding this before deep_resize: Code:
ColorMatrix(mode="Rec.601->Rec.709",outputfr=true) |
|
5th February 2023, 21:13 | #2000 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
Quote:
I definitely would not encode and tag as 601. You have the highest chance of it playing correctly everywhere with the 601=>709 shift when going SD=>HD , and tagged as 709 in the encoder Personally , I clear and do everything manually , because there are many "growing pains" with avisynth frame props right now. I also clear before the pipe out, because some filters screw up the props right now. I flag in the encoder instead of relying if avisynth will pass props correctly . (Some encoders do not accept, so do). You decide what works "best" for you Yes, colormatrix, or zimg, or fmtc, or avisynthshader avsresize would look like Code:
z_convertformat(pixel_type=last.pixeltype, colorspace_op="170m:709:709:l=>709:709:709:l") |
||
Tags |
avisynth, dogway, filters, hbd, packs |
|
|