Log in

View Full Version : AVI Conversion: 720p/59.94 to 720p/23.976


easy2Bcheesy
15th December 2006, 21:46
Hi there,

What's the deal with converting a 720p/59.94fps AVI file into a 720p/23.976 file? I took an arbitrary clip from the file and used VirtualDub to convert the file into 23.976fps and it's definitely lost frames in the conversion and looks very jerky. 29.97fps on the other hand looks absolutely fine - but I know that this was shot on film and is native 23.976fps.

Is there an AviSynth script that could help? Is there something inherently wrong in using VirtualDub's framerate conversion?

The clip itself is an HD capture I've taken myself straight from the receiver via component, so if that's the case, would I have to clip the file precisely to the very first frame in order to get the pulldown right?

Any help much appreciated.

Guest
15th December 2006, 22:40
Assuming it is film sourced, you can try decimating by two and then decimating by 5, e.g.:

SelectEven()
Decimate(5)

easy2Bcheesy
16th December 2006, 15:54
I'm looking at the captures and there's no clear pattern I can see with regards repeated frames, no matter if I capture at 29.97fps or 59.94fps.

Here's a sample of the sequence of 26 unique frames taken from a 59.94fps capture:

aaabbcccddeeeffgghhhiijjjkklllmmmooppqqrrrsssttuuvvvwwxxxxyyzz

And a similar sequence from a 29.97fps capture:

aabcdeefghiijklmmnoppqrsttuuvvxxyz

LockoNH
16th December 2006, 16:11
FDecimate(rate=23.976,threshold=3)

I used this on a recording of 'Lost' and it worked pretty well. I'm a noob though, someone else might have a better way.

easy2Bcheesy
16th December 2006, 17:32
On a small clip, specially cut to what seems to be the very beginning of the 24fps output, it seemed to work pretty good. Just pointing the script to my original capture produces a jerkathon.

So again I wonder whether would I have to clip the file precisely to the very first frame in order to get the pulldown right?

LockoNH
16th December 2006, 21:37
Some programs simply don't have a consistent pattern, and there isn't anyplace to clip the file that will put you on the right path.

Guest
17th December 2006, 02:30
Did you try my suggestion:

SelectEven()
Decimate(5)

Zep
17th December 2006, 04:25
On a small clip, specially cut to what seems to be the very beginning of the 24fps output, it seemed to work pretty good. Just pointing the script to my original capture produces a jerkathon.

So again I wonder whether would I have to clip the file precisely to the very first frame in order to get the pulldown right?

neuron2's suggestion should work on 99% of the time. if it does not then you simply have a wacky source.

I ran into this problem with a few shows on ABC over the years and i ended up using neuron2's multidecimate and it did a decent job unless the source was really really random with dupes. In that case the best thing to do is run multi passes yourself of normal decimate and slowly get rid of the dupes. more on each pass. (it is sorta doing a multidecimate by hand i guess you could say lol)

remember though that the jerkiness comes from cutting out a good NON DUPE frame by mistake. So always err on th side of just leaving some dupes in and having a higher FPS.

easy2Bcheesy
17th December 2006, 08:16
Yes I tried that script and it didn't work. If I understand the script correctly (ie get rid of every other frame, then every fifth), based on my sample, it would have produced the following results.

aabceefgijjkmmoprsstvwxxz

As you can see, lots of dupes, and lots of individual frames lost.

In terms of using Decimate(5) on a 29.97fps clip, that would produce the following:

aabceefgiijkmmnopqrstuuvxxyz

So yes, the source is obviously wacky...

foxyshadis
17th December 2006, 14:20
TDecimate has cycle and cycleR settings, and it should be able to cope with large cycles (such as removing 60 of every 100) to prevent your goofy cycles from messing it up too much. You run the risk of a single static scene getting savaged while the dups you want get off scot free (which may be what happened the last attempt), but it has code that tries to prevent that.

To make the decimator's life easier, if setting noise thresholds isn't helping, you might use the Dup() plugin beforehand.

easy2Bcheesy
17th December 2006, 14:31
Thanks, I'm currently recapturing as I've observed that my Audigy 2 ZS seems to be conflicting with the operation of the capture card.

I'll recapture and have another go.

Guest
17th December 2006, 14:51
Yes I tried that script and it didn't work. If I understand the script correctly (ie get rid of every other frame, then every fifth), based on my sample, it would have produced the following results.

aabceefgijjkmmoprsstvwxxz No, your sample will give:

abcdefghijklmopqrstuvwxy

I am suggesting that given the nature of your source, this may be close to the best you can achieve. I'll be watching to see if you can do it better. :)

LockoNH
17th December 2006, 15:24
maybe upload sample and let us take a crack?

easy2Bcheesy
17th December 2006, 21:36
OK, so I did a VDub direct stream copy cut exactly to the beginning of a unique frame, lasting about 10 seconds. I tried Neuron2's method and there were two distinct jumps. I tried FDecimate and the clip looked pretty much perfect to my eyes.

So it looks as though the trick is to cut the clip correctly. Not easy when the footage fades in from black. So how can I cut correctly? Find a clean unique frame and count back x number of frames into the blackness?

LockoNH
18th December 2006, 01:47
I don't think you would have to cut the clip anywhere specific, FDecimate doesn't follow a set pattern from a starting point, instead it compares each frame to the previous one, and then throws the frame out if it is a duplicate of the previous one (based on the threshold of difference)