I have a choppy xvid someone made from a video on demand - probably used a screen capture program set at 29.97 fps. I'd like to reencode it in, and while TDecimate (in Avisynth) improves it, there's still left-over dupes every couple seconds, causing a pause. I added TFM (which is probably unnecessary), and looked into the different TDecimate options but I havent hit on the right solution. Also tried Multidecimate with no luck.
+ Reply to Thread
Results 1 to 20 of 20
-
-
The sample appears to have originally been film-based progressive with 3:2 pulldown but has been incorrectly deinterlaced. Try the Srestore() plugin to restore it to progressive 23.972 FPS.
Last edited by sanlyn; 25th Mar 2014 at 11:03.
-
TDecimate(mode=2, rate=23.976) comes close. But there are still a few duplicate frames and skipped frames. You can probably get better results with a little fine tuning (maxndl, dupThresh, etc.).
Last edited by jagabo; 2nd Mar 2013 at 23:10.
-
it was the fine tuning I needed help with. I'd try AnimeIVTC but the plugin package is dead.
I thought there'd be an easier way to set TDecimate to delete the extra set of duplicates every couple seconds (at least that's what it looks like on the video which might not be apparent on the clip), but I tried some of the TDecimate settings without improvement. -
Well, the source clip is missing frames so you will never get perfect results. For example, between frames 119 and 121 there is a duplicate frame. The real frame 120 is missing. The same happens between frames 124 and 126. This is why there are still duplicate frames after TDecimate. To hit the right frame rate those duplicate frames must be left in to make up for the missing frames. You could decimate to a lower frame rate to remove the duplicates but you'll still have jerks at the missing frames. You could try using ReplaceFramesMC() (aka, RX()) to reconstruct the missing frames. But you'll have to locate the duplicate frames by hand.
Frames 96, 100, 156, 160 (after decimation) replaced with motion compensated frames.
import("C:\Program Files (x86)\AviSynth 2.5\plugins\ReplaceFramesMC.avs")
Code:AviSource("Short.avi") TDecimate(mode=2, rate=23.976) ReplaceFramesMC(96,1) ReplaceFramesMC(100,1) ReplaceFramesMC(156,1) ReplaceFramesMC(160,1)
Last edited by jagabo; 3rd Mar 2013 at 09:09.
-
thanks. As it's an xivd, I'll just live with the TDecimate version.
So this was suppose to be recorded from VOD (either from Amazon or Netflix), and usually people use screen capture programs. Can we say if the problem was caused by wrong capture setting? -
-
if I could find a reliable free screen capture program, I'd try it. In this case, the movie is no longer available on those sites. If we knew the problem was the wrong capture rate, I'd ask the guy with the xvid if he still had the VOD and would try a new setting.
Jagabo, the clip looks great, but even if it were dvd video and not xvid, it's not worth it to write a script itemizing missing frames every every couple seconds for a 90 minute movie. -
You can automatically fill in duplicates with motion interpolation using Mug Funky's "filldrops" or related filters
I would actually leave it 29.97 , it is the smoothest to my eyes. The other option is to use some sort of decimation then filldrops, or filldrops then some decimation resulting in 23.976. . Test it the options on some longer sequences
To tweak the results of detection, add show=true at the conditionalfilter line . 1.3 is usually a good value
AVISource()
Filldrops2()
function filldrops2 (clip c)
{
even = c
super_even=MSuper(even,pel=2)
vfe=manalyse(super_even,truemotion=true,isb=false, delta=1)
vbe=manalyse(super_even,truemotion=true,isb=true,d elta=1)
filldrops_e = mflowinter(even,super_even,vbe,vfe,time=50)
ConditionalFilter(even, filldrops_e, even, "YDifferenceFromPrevious()", "lessthan", "1.3")
} -
Interesting filter. Sample #1 has a speed up, slow down, jerkiness several times a second. It didn't really work in #3. It might be an acceptable automated compromise for the OP though.
I'm trying to figure out exactly what the filter does. I think it replaces duplicate frames with motion interpolated frames from the two surrounding frames?Last edited by jagabo; 3rd Mar 2013 at 10:33.
-
It detects duplicate pairs, motion interpolates the 2nd frame with an "inbetween" frame
His problem , however , is there are legitimate duplicates from telecine, and non legit duplicates (from dropped frames due to capture ) . This filter won't distinguish between which are legit which are not -
-
posion, if you saw the whole video, you'd see its unacceptable.
Seems like regular decimation should come first, followed by filldrops - assuming it's substituting a new field for a duplicate field.
I thought the first clip was the best of the three, but I still see a pause near the start. -
Yes, FillDrops2() is designed for use when you have captures with dropped frames -- where the capture device substituted a copy of the previous frame to fill in for the missing frame. In cases like that you have a sequence like:
1233567...
A second copy of frame 3 was substituted for the missing frame 4. When FillDrops2() sees the two copies of frame 3 it generates an in between frame between the first 3 and the following 5. Which comes close to what frame 4 would have looked like.
123(4)567
But after decimating your sample video you have some sequences like:
1235567...
In this case FillDrops2() replaces the second 5 with motions interpolated between 5 and 6. So you still have a jerk between frames 3 and 5, followed by "5.5" then 67...:
1235(5.5)67... -
huh.
After nominal decimation, the duplicate frame occurs (from what I see) once every couple seconds. Seems like the solution should be at our fingertips. -
poison, this filldrops concept should work with this, but it seems to stop working and go bonkers. I tried another clip, decimated it first, then ran that clip thru your script. It worked with the first pair if dupe frames, didnt quite catch the 2nd group, then started outputting very slow video.
-
Are they duplicate pairs , or triplicates ? This will only detect duplicates
Theoretically you shouldn't decimate it first because you are missing frames (unless the decimation was done manually). Script based decimation isn't always perfect here - If you throw out the wrong frame with the decimation before you fill in the missing frames, you will never get smooth motion
None of these scripts will work perfectly, because you are missing frames, and have telecine (legitimate duplicates) . Since it can't distinguish between between the 2 types of duplicates , you either have to do it manually as jagabo suggested, or accept this "half measure"
Filldrops and related filters are designed for video ie. 25 or 29.97 captures, where you have dropped frames that manifest as duplicates (and they are not supposed to have duplicates), not telecine
Without a better description or sample, I'm guessing you might need to tweak the conditional filter value (you might get false positives - it might replace "good frames", thinking that 2 different frames are the same, or you might get missed duplicates - if the detection value isn't sensitive enough) -
Last edited by jagabo; 4th Mar 2013 at 16:37.
-
Similar Threads
-
help with decimate
By davexnet in forum Newbie / General discussionsReplies: 3Last Post: 6th Apr 2012, 19:05 -
Decimate odd patterned duplicate frames in video
By raphaelt in forum Video ConversionReplies: 2Last Post: 2nd Feb 2011, 22:57 -
VirtualDub/Xvid question: YV12 vs. XVID FourCC in the xvidvfw.dll driver???
By KneeRow in forum Video ConversionReplies: 14Last Post: 1st Aug 2010, 13:35 -
Decimate advice
By pfxz in forum Video ConversionReplies: 5Last Post: 1st Aug 2008, 18:49 -
Weird I don't have XviD or DivX codec installed but I can see Xvid movies
By Talayero in forum Software PlayingReplies: 4Last Post: 5th Jun 2008, 11:47