Log in

View Full Version : Question about blending


yesmanitsbearman
17th October 2015, 10:47
Hi everyone,

Wanted to ask the experts here if there's any close to perfect way to fix this clip: click (http://www.filedropper.com/sample_9)

What I have tried so far:

1.
y = o.yadif(mode=1,order=1)
qtgmc = o.QTGMC(Preset="Ultra Fast",rep2=4,SLmode=1,SLrad=1)
qtgmc.Srestore(frate=25,dclip=y)

2.
Srestore(omode="pp3")
TDecimate()

3.
ExBlend(q, Mode=2)

johnmeyer
17th October 2015, 16:33
Someone converted a 24p movie to 30p. I don't think you will make it look any better by trying to undo that step. Whatever you do, you don't want to convert it to 25 fps (your first attempt). Just spend $4 and rent the movie. This isn't some rare or unusual film or movie that isn't available anywhere else. I'd provide some code if I thought it would do you any good, but it won't. If it were a one-of-a-kind movie and this was the only copy in the world, then I'd spend some more time tweaking SRestore.

yesmanitsbearman
17th October 2015, 17:50
Hey,

Thanks for the help. This is a not very popular TV show, that's only out in one region and I do have the discs, hence why I want to get it right, there is and unlikely will be another release

johnmeyer
17th October 2015, 17:55
I actually spent 10-15 minutes trying to get SRestore to work, but with no luck. I also tried this old script from Didée:

Import("C:\Program Files\AviSynth 2.5\plugins\srestore.avs")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Deflicker.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")

my_frame_rate = 23.976
width = 720
heigh = 480

setmtmode(5,6)
AVISource("e:\fs.avi").killaudio().ConvertToYV12(interlaced=true)
assumeBFF().assumefps(29.97)
setmtmode(2)
# remove combed frames by Didée
bob(-.2,.6)
SRestore(frate=my_frame_rate)
requestlinear()

rest = last

calm = rest.temporalsoften(1,255,255,32,2).merge(rest,0.25)#.repair(rest,1).removegrain(11)
calm = calm.temporalsoften(1,255,255,16,2).merge(calm,0.25)
LOP = calm.bicubicresize(width/4,height/4).bicubicresize(width,height,1,0)
HIP = rest.bicubicresize(width/4,height/4).bicubicresize(width,height,1,0)
HIP = mt_makediff(rest,HIP)
mix = LOP.mt_adddiff(HIP,U=2,V=2)
sup1=rest.msuper(levels=1)
sup2=mix.removegrain(11).msuper()
bv2=sup2.manalyse(isb=true, delta=2,blksize=16,overlap=4,DCT=1)
bv1=sup2.manalyse(isb=true, delta=1,blksize=16,overlap=4,DCT=1)
fv1=sup2.manalyse(isb=false,delta=1,blksize=16,overlap=4,DCT=1)
fv2=sup2.manalyse(isb=false,delta=2,blksize=16,overlap=4,DCT=1)
rest.mdegrain2(sup1,bv1,fv1,bv2,fv2,thSAD=200)

output = ColorYUV(autogain=true, autowhite=true).deflicker()

return output
Perhaps you can tweak it and get better results. It did help a little, and it did get it back to 23.976.

[edit]I just researched to find what this script was intended to do, and it probably isn't the right thing for your situation. I go back to my previous recommendation that you work on tweaking the SRestore settings.

wonkey_monkey
17th October 2015, 22:08
Whatever you do, you don't want to convert it to 25 fps (your first attempt).

Thanks for the help. This is a not very popular TV show

If it's a TV show, then yeah, you (probably) do want to convert to 25 fps.

Sharc
17th October 2015, 22:53
The pattern looks like 4 good frames followed by 2 blended frames, cyclic repeated, all progressive. So most probably its a poor 25 to 30 fps conversion.
I tried with SRestore and tdecimate, but no luck. Still one blended frame out of 5 at 25 fps.

johnmeyer
17th October 2015, 22:59
If it's a TV show, then yeah, you (probably) do want to convert to 25 fps.But wasn't the TV show originally shot on film (24 fps)? Even if converted to PAL using the usual "trick" of changing frame rate to 25 fps, without adding frames, and then changing the audio to match, the original is still 24 fps.

wonkey_monkey
17th October 2015, 23:31
But wasn't the TV show originally shot on film (24 fps)? Even if converted to PAL using the usual "trick" of changing frame rate to 25 fps, without adding frames, and then changing the audio to match, the original is still 24 fps.

It's Irish, so it was probably made in and for PAL land. Even if it was shot on film - which is unlikely for anything made in the last 10 years or more, and in any case it looks more like digital video - it would be more likely to have been film shot at 25 fps.

The pattern looks like 4 good frames followed by 2 blended frames, cyclic repeated, all progressive. So most probably its a poor 25 to 30 fps conversion.
I tried with SRestore and tdecimate, but no luck. Still one blended frame out of 5 at 25 fps.

It's probably the two blended frames in a row that srestore can't handle. I suspect it's internal logic doesn't allow for that possibility.

StainlessS
18th October 2015, 00:06
Wanted to ask the experts here if there's any close to perfect way to fix this clip: click (http://www.filedropper.com/sample_9)


I'm getting a "File not found on server".

Sharc
18th October 2015, 09:11
I'm getting a "File not found on server".
You can find it here:
http://www.mediafire.com/watch/gebeby6p6k264ae/sample.VOB

yesmanitsbearman
18th October 2015, 09:13
I'm getting a "File not found on server".

Uploaded to a different host click (http://www4.zippyshare.com/v/5e2HseRS/file.html)

Woops a bit late I guess, thank you Sharc

StainlessS
18th October 2015, 18:33
Thank you guys, got it.

ajk
19th October 2015, 10:32
It's simple enough to extract the missing/blended frame using just built-in Overlay() commands, "subtract" and "add" modes.

ExBlend should be a good tool for this, if it can handle this particular pattern (not entirely clear to me, just by looking at the docs).

http://ajk.pp.fi/avisynth/unblended-thumb.jpg (http://ajk.pp.fi/avisynth/unblended.jpg)

StainlessS
19th October 2015, 13:38
I tried ExBlend() in PAL mode, was not terribly successful.

Sharc
19th October 2015, 14:10
How about
FixBlendIVTC()
tdecimate(cycle=6) #gives 24.975 fps
AssumeFPS(25) #speedup to PAL
Maybe with some additional filter for cleaning up the deblended frames.

yesmanitsbearman
21st October 2015, 12:51
Gave that a try finally on the whole of footage, high motion scenes look pretty bad (like a cat running)