VideoHelp Forum

Try DVDFab and copy Ultra HD Blu-rays and DVDs! Or rip iTunes movies and music! Download free trial !
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I've got this NASA scan of some 16mm footage.

    This was either shot at 6 or 12fps. Unfortunately this was put in a 29.97fps QuickTime .mov video file. In order to keep the correct frame rate duplicates were introduced.

    Normally I remove the duplicates with FFMPEG Decimate filter. But this file is proving to be more difficult....

    Not only duplicates, but frame-blending was also applied. Where horizontal consecutive lines from two individual frames were blended. FFMPEG decimate filter does not detect them.


    Are there any tools that are capable of detecting these frames and remove them?


    Attached to this post is a few seconds of the ffmpeg output with the following string:

    ffmpeg -i "D:\Apollo\16mm\AS9\MAG N - Lunar Module Approach.mov" -map 0:0 -vf mpdecimate,setpts=N/FRAME_RATE/TB,crop=1440:1080:234:00 "D:\Apollo\16mm\AS9\AS09-MAG-N\AS09-MAG-N-%04d.png


    An other example with 3 frames:
    Image
    [Attachment 54685 - Click to enlarge]

    Image
    [Attachment 54686 - Click to enlarge]

    Image
    [Attachment 54687 - Click to enlarge]
    Image Attached Files
    Quote Quote  
  2. No blended frames, just hard pulldown. In AviSynth use:

    Code:
    TFM() # field match back to a film frames
    TDecimate(Cycle=3, CycleR=1) #remove duplicates
    The result is an 8 FPS video. But you will still end up with chroma blending because interlaced video was encoded as progressive. I'm pretty sure ffmpeg has the equivalent of TFM(). It certainly has the equivalent of TDecimate().

    <edit>
    Got it:
    Code:
    ffmpeg -i AS9-LM-INT.mp4 -vf "fieldmatch=order=tff,decimate=cycle=3:" output.mkv
    </edit>
    Image Attached Files
    Last edited by jagabo; 28th Aug 2020 at 11:30. Reason: added ffmpeg command line and encoded sample
    Quote Quote  
  3. Originally Posted by jagabo View Post
    No blended frames, just hard pulldown. In AviSynth use:

    Code:
    TFM() # field match back to a film frames
    TDecimate(Cycle=3, CycleR=1) #remove duplicates
    The result is an 8 FPS video. But you will still end up with chroma blending because interlaced video was encoded as progressive. I'm pretty sure ffmpeg has the equivalent of TFM(). It certainly has the equivalent of TDecimate().

    <edit>
    Got it:
    Code:
    ffmpeg -i AS9-LM-INT.mp4 -vf "fieldmatch=order=tff,decimate=cycle=3:" output.mkv
    </edit>
    Wow, that worked like a charm!

    Thanks for your fast response. This forum is great.

    I would have hated to throw this scene away due to processing difficulties.
    Quote Quote  
  4. I took a closer look... and unfortunately there are still merged frames. The pattern does not stay the same throughout the video file, it changes several times.

    Several times there are more than 2 real frames before one merged frame. This obviously throws off the cycle. It is not a simple pulldown.


    To clarify, the footage is not interlaced. The source has 1 to 1 duplicates as wel as merged frames that merge the previous and next real frame.

    The 1:1 duplicates are removed with FFMPEG's decimate filter, see string of first post. Then at least there is one less problem to deal with.

    This PNG output is then processed further to remove the merged frames.... yet to no avail.


    This is why I need something that is able to detect merged frames from normal real frames and remove the former. Anyone know if this exists?
    Quote Quote  
  5. Originally Posted by Dutchsteammachine View Post
    I took a closer look... and unfortunately there are still merged frames. The pattern does not stay the same throughout the video file, it changes several times.

    Several times there are more than 2 real frames before one merged frame. This obviously throws off the cycle. It is not a simple pulldown.


    To clarify, the footage is not interlaced. The source has 1 to 1 duplicates as wel as merged frames that merge the previous and next real frame.

    The 1:1 duplicates are removed with FFMPEG's decimate filter, see string of first post. Then at least there is one less problem to deal with.

    This PNG output is then processed further to remove the merged frames.... yet to no avail.


    This is why I need something that is able to detect merged frames from normal real frames and remove the former. Anyone know if this exists?


    Can you be more clear on the "merged frames" terminology ? Did you actually mean merged fields ? 2 fields that are from different moments in time, so you see "combing"? Are there any fields that have unique information by itself, not duplicated in another field ?

    Another way to approach that is with field matching and duplicate decimation according to a threshold such as dedup or other decimation filters that decimate on similarity (not to achieve a specific pattern or framerate) . The resulting output is variable frame rate, because your decimation pattern is variable
    Quote Quote  
  6. What you have is basically 8 fps film with 3:3 pulldown to make 12 fps video. That makes every third frame interlaced (what you are calling "merged"). In the sample clip you provided there is one discontinuity in the pattern, near the beginning. If you view the clip as a series of fields you will see the duplicate pattern 3:3:2:3:3... (the rest is all 3's). There are no duplicate frames in the sample. But apparently you are saying there are other discontinuities in the full video. You need to figure out if that's because 12 fps isn't the exact rate (maybe it was intended to be 11.988 = 12000/1001 so it could be sped up 2.5x to make 29.97 fps for NTSC broadcast), or maybe it was just mishandled somewhere along the line. You should provide a longer clip for analysis. One which include those duplicate frames.

    Oh, and I later noticed that the video has 4:4:4 chroma so there won't be a problem with blended chroma I mentioned in post #2.
    Quote Quote  



Similar Threads