Dogway
6th September 2011, 19:31
Hello, I ripped a DVD guide of a game, it is interlaced so I thought on using QTGMC, but it was slow and results were far from desired. Then I thought about adding scanlines, and I think I'm almost there (I'm still open to suggestions), but the main concern is about the bob-flicker and certain "jumps" every few seconds, is this supposed to be correct?
Now after testing a bit it seems these "jumps" are something related to mpc-hc. I used a simple bob() and in avspmod there's flicker, then I preview the script in mpc-hc and even by frameskipping there's no flicker...
source 9Mb:
http://www.mediafire.com/?mfci31cc4uwzenj
separatefields
Deblock_QED(quant1=30, quant2=40)
LSFmod(defaults="slow",strength=50,edgemode=0,soothe=true,ss_x=1.0,ss_y=1.0)
raw=last
weave(interleave(last,mt_lut("26",u=2,v=2)))
SmoothContrast(0.2,sat=0,limit=true)
LumaMask(SmoothLevels(16,1.2,235,16,235,smooth=10,show=false,dither=100,limiter=0),raw.bob,black=64, white=255, brightfilt=false,show=false)
http://img689.imageshack.us/img689/7070/qtgmc.th.png (http://img689.imageshack.us/img689/7070/qtgmc.png)http://img171.imageshack.us/img171/5060/scanrw.th.png (http://img171.imageshack.us/img171/5060/scanrw.png)
creaothceann
6th September 2011, 20:10
If you're adding scanlines you can just throw away half the lines:
AssumeFrameBased.AssumeTFF.SeparateFields
SelectEven
Weave(Interleave(last, BlankClip(last)))
Dogway
6th September 2011, 20:17
Well, that's practically the same I just did, but removing selecteven (every field is unique), and adding some nice effects for scanline blending...
But the question is about bob-flicker, your code also shows the flicker.... is this ok?
Gavino
6th September 2011, 20:24
... BlankClip(last, last.FrameCount) ...
Note that BlankClip(last) already inherits the framecount, along with all the other properties of 'last'.
Dogway
7th September 2011, 10:22
well, I guess that if I want to get rid of the bob-flicker I'd need to use a motion compensated (qtgmc). At last I used Didée's code in this thread (http://forum.doom9.org/showthread.php?p=1432971#post1432971), so I don't have to use "weave" which causes the flicker. Result is not so as authentic but at least it's not so tiring to watch.
separatefields
Deblock_QED(quant1=30, quant2=40)
LSFmod(defaults="slow",strength=50,edgemode=0,soothe=true,ss_x=1.0,ss_y=1.0)
weave
QTGMC(tr2=3,preset="very slow",Lossless=2,sourcematch=3,sharpness=0.3,MatchEnhance=0.3,MatchPreset="Slow", MatchPreset2="Slow")
raw=last
scanrate=2
mt_lutxy(mt_lutspa(relative=false,expr="y "+string(scanrate)+" % 0.01 < 16 235 ?") ,"x 16 - y 16 - * 219 / 16 +",U=2,V=2)
SmoothContrast(0.2,sat=0,limit=true)
LumaMask(SmoothLevels(16,1.2,235,16,235,smooth=10,show=false,dither=100,limiter=0),raw,black=64, white=255, brightfilt=false,show=false)
RatioResize(4320/4739.0,"par")
http://img831.imageshack.us/img831/1383/348554.th.png (http://img831.imageshack.us/img831/1383/348554.png)
If anyone has any tip, I'd be very welcome. Still I haven't figured out why the bobbed source showed different in mpc-hc.
btw, for the people who wants to know how is the infix of RPN equations, or the opposite so you can modify it, use the next code (yes, don't know how I didn't try before):
a = mt_infix("y 2 % 0.01 < 16 235 ?")
# use mt_polish() for converting to polish notation from infix syntax
blankclip(length=1,width=1000,height=40)
subtitle(string(a),x=30,y=10)
EDIT: I refined and optimized the code a bit in the scanline creation lines and blending. I just tested over a raw screenshot:
PointResize(width,height*2)
LinearResize(576,height,linear=false,kernel="spline64",fh=1.0,fv=1.0,lsb_out=true)
r=selectevery(3,0)
g=selectevery(3,1)
b=selectevery(3,2)
Dither_convert_rgb_to_yuv(r,g,b,tv_range=true,lsb=false,mode=6,ampn=0.0,output="yv12")
mergeluma(blur(0.3,0.6))
raw=last
strength=128
scanrate=2
mt_lutxy(mt_lutspa(relative=false,expr="y "+string(scanrate)+" % 0.01 < "+string(strength)+" 235 ?"),"x 16 - y 16 - * 219 / 16 +",U=2,V=2)
# you can replace the next 2 lines with mt_merge(raw,raw.greyscale) for 8 bits merging
Dither_convert_8_to_16()
Dither_merge16_8(raw.Dither_convert_8_to_16(),raw.greyscale)
# Use ditherpost() for video or next line for RGB (still images)
Dither_convert_yuv_to_rgb(tv_range=true,output="rgb32",lsb_in=true,mode=6,ampn=0.0)
http://img26.imageshack.us/img26/66/sfiii3.th.png (http://img26.imageshack.us/img26/66/sfiii3.png)http://img571.imageshack.us/img571/5591/scanstill2.th.png (http://img571.imageshack.us/img571/5591/scanstill2.png)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.