I'm trying to convert film that was encoded at 25fps back to its original framerate as it's loaded with duplicate frames. It's progressive, not interlaced. I've looked at the footage and it has a consistent pattern: ABBABBB A = every 22nd frame is duplicated (making the 23rd frame a copy) B = every 24th frame is duplicated (making the 25th frame a copy) I want to remove every duplicate frame based on that pattern, but I have no idea how to go about this. Does anyone know what command I should use for this with ffmpeg or avisynth?
StainlessS: I feel stupid writing this, but I get the impression you solved my problem entirely, but I'm too clueless to know how to implement it (in my defense, I did post in the newbies section). How do I plugin the code you provided to point at the video file? I assumed I saved it as .avs, but was lost after that. I was able to load the ApplyEvery plugin successfully in a script for what it's worth. If there's a guide on this, by all means link me to it, I tried doing a search for that also, but was coming up dry for how to implement custom code like this.
There is no guide, I wrote this for your problem. Use like so, [req Avs+, If you're not using AVS+, say so, just needs wrap the Entire MakeDelDupPattern Function in GSCript(""" ... """) ] chilledinsanity.avs Code:
StainlessS: Thanks, the "DeleteEvery" command made this vastly easier for me to understand (and worked, sort of). Unfortunately it looks like the pattern is even more complex. While that command reduced the VAST number of the repeats, it still left some in, I suspect because when trying to convert back to 23.976, any variance other than knowing exactly which frames to decimate means duplicates invariable occur. So while that pattern I posted accounts for the vast majority of frames, it won't account for duplicates than show up every couple hundred frames or so because of rounding down to 3 decimal points. In other words: every once in a great while it will be ABBABB or ABBBABBB as opposed to ABBABBB every single time. I haven't been able to determine what the (much longer) pattern is for that. I may have to accept defeat on this one.
I understood what you wrote differently than the others - 2 duplicate frames in every 25-frame cycle. You should do what Sharc suggested and post a sample.
Not to worry, maybe the function will come in useful for something else one day. I'll leave it to Sharc and Manono when you post your sample, they should sort you out. EDIT: Mediafire.com file host is a popular choice.