FDecimate returning frames out of order

Support for my Avisynth filters
Post Reply
AVIFandango
Posts: 2
Joined: Tue Dec 23, 2014 4:57 pm

FDecimate returning frames out of order

Post by AVIFandango » Tue Dec 23, 2014 5:49 pm

Hi,
I am using FDecimate as the first step in trying to improve a botched 8mm to VHS transfer (with no access to any other source material). The project was nearly done when I noticed a strange stutter in a few spots. I tracked it down to FDecimate returning a few frames out of order. I think this is caused by too high a threshold, but unfortunately the material is very noisy and there are some truly different frames with less difference then the average noise between duplicate frames. Still I would think it is always an error to generate out of sequence frames, and if anyone ever revises FDecimate it would be nice if this was prevented. (I recognize the need to serve up frames in random order might make this more difficult than it sounds). In the meantime, any other suggestions on how to decimate the duplicates? (I tried SRestore and SmartDecimate and FDecimate did a much better job than these tools once I determined the correct target framework by counting duplicates).
Rob

User avatar
admin
Site Admin
Posts: 4002
Joined: Thu Sep 09, 2010 3:08 pm

Re: FDecimate returning frames out of order

Post by admin » Tue Dec 23, 2014 5:56 pm

Would it be possible for you to post a link to your unprocessed source that illustrates your decimation problem?

AVIFandango
Posts: 2
Joined: Tue Dec 23, 2014 4:57 pm

Re: FDecimate returning frames out of order

Post by AVIFandango » Thu Dec 25, 2014 9:00 am

I can post a short video that shows the issue of out of order frames if you like, but in the meantime I have found another approach that works for my. I am now using multidecimate. In this case I am OK with the two-pass approach and it keeps the frames in order. Let me know if you would like me to post an example of the FDecimate issue (and where/how). Thanks!

tartaki
Posts: 4
Joined: Sun Jan 18, 2015 3:15 pm

Re: FDecimate returning frames out of order

Post by tartaki » Mon Jan 19, 2015 2:31 pm

I am having the same problem with FDecimate. Here is the sample:
test.mkv

This 30 fps video is jerky (result of srestore applied to an irregularly blended video) but you can clearly see linear motion (first a car, then children, car again, then a woman) - all frames are in order. The srestore's mode used was omode=6, so there are many identical frames, often more than 2 in a row.

I source this sample with DGSource and apply FDecimate(rate=24.0). The frames are out of order throughout.

User avatar
admin
Site Admin
Posts: 4002
Joined: Thu Sep 09, 2010 3:08 pm

Re: FDecimate returning frames out of order

Post by admin » Thu Jan 22, 2015 6:13 pm

FDecimate is broken and should not be used. I think ConvertFPS() should be fine, no?

tartaki
Posts: 4
Joined: Sun Jan 18, 2015 3:15 pm

Re: FDecimate returning frames out of order

Post by tartaki » Sun Jan 25, 2015 2:11 pm

Neither ConvertFPS nor ChangeFPS descriptions make any mention of decimating duplicate frames. Which most likely means extra frames would just get dropped in a regular fashion, "dumb" decimation. What I need (and anyone dealing with srestore and irregular blend) is exactly what FDecimate claims to achieve - decimating duplicates, as needed (if possible) to achieve a given fps. The test clip is practically guaranteed to have just enough duplicate frames to get 24 fps after decimation (I counted).

Looking at the code, I guess what's broken is the logic of which frames to keep, just a few lines. I could be wrong of course, I've never dealt with avisynth code before. My (naive) impression is that it might be possible to fix without too much effort (for someone who has a good grasp of how avisynth operates) - and perhaps add some fine tuning options for the cases when there is 3-4-5 duplicates in a row.

Irregular blending might not be the most common problem out there but it happens and FDecimate is a valuable tool for it.

User avatar
admin
Site Admin
Posts: 4002
Joined: Thu Sep 09, 2010 3:08 pm

Re: FDecimate returning frames out of order

Post by admin » Sun Jan 25, 2015 6:51 pm

Fair enough. I have your sample and I'll see if there is anything I can do about it.

Post Reply