FORUMS: list search recent posts

Removing duplicate frames

COW Forums : Adobe Premiere Pro

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Steve Adams
Removing duplicate frames
on Dec 23, 2018 at 1:18:56 am

Does anyone know a way to remove duplicate frames from a clip? I find that PP CC2017's 's Optical Flow option for adjusting the speed of a clip will sometimes insert four or five identical frames. This may be due to something strange it found with the original clip. I don't know. I'd just like to rip through the final clip and remove all frames that are exactly like the previous frame.

Thanks


Return to posts index

Kalleheikki Kannisto
Re: Removing duplicate frames
on Dec 23, 2018 at 9:13:09 am

Don't know of one that works directly in PPro, but some external options exist:

ffmpeg: https://www.ffmpeg.org/
PD Howler: https://www.thebest3d.com/howler/index.html
Old AE plugin Duplicate Frame Remover (officially CS4 compatible, but may work in CS6): https://aescripts.com/duplicate-frame-remover

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Bouke Vahl
Re: Removing duplicate frames
on Dec 23, 2018 at 9:33:56 am

Not sure if it helps in this case, but I've used QTplayer (pro) to remove advanced pulldown.
If the clip start is the original one, an export with another speed will do the math and will perform removal of frames in a mathematical logic cadance.
YMMV

Bouke
http://www.videotoolshed.com


Return to posts index


Steve Adams
Re: Removing duplicate frames
on Dec 23, 2018 at 6:26:52 pm

Thanks. I looked at the first two but didn't find anything about removing duplicates. Is it perhaps a filter? Could you maybe point me a little closer to the command that removes duplicates?

Thanks


Return to posts index

Dave LaRonde
Re: Removing duplicate frames
on Dec 23, 2018 at 4:34:33 pm
Last Edited By Dave LaRonde on Dec 23, 2018 at 6:54:17 pm

Without knowing the frame rates, we're at a loss to give a definitive answer. Although Advanced Pulldown would explain a lot.

And a super-secret command to remove frames isn't a cure; it's a bandage for boo-boos.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Steve Adams
Re: Removing duplicate frames
on Dec 24, 2018 at 8:03:26 am

The frame rate is 24 fps. But I'm not dealing with a well-behaved clip, here, where something like a 3:2 pull down for the entire clip would do anything sensible. There are just parts of this clip where suddenly a frame is repeated 4 or 5 times and then it goes along fine for several seconds and the same thing will occur again. So it seems that what I need is something that decides when a frame is the same as the previous frame, and removes it - period. Fps doesn't have much to do with it.

I've stepped through the clip manually with PP, frame by frame, and removed the duplicates and the result is what I want. I just don't want to do it manually.

I found a Stack Overflow article on removing duplicate frames with ffmpeg at

https://stackoverflow.com/questions/37088517/ffmpeg-remove-sequentially-dup... .

This suggests that something like

ffmpeg -i in.mkv -vf mpdecimate out.mkv
ffmpeg -i in.mkv -vf decimate=cycle=6,setpts=N/25/TB out.mkv

might work, though I'm not sure yet what the various parameters mean.


Return to posts index


Bouke Vahl
Re: Removing duplicate frames
on Dec 24, 2018 at 10:34:12 am

A few hints when you are going to toy with FFmpeg (which is great fun btw.)

First, the terminal supports drag and drop, and copy / paster. You want that, as spaces and other characters have to be escaped, and when you drop FFmpeg and your video file onto the terminal, that will be taken care of.

For the output file, create a dummy file in the output folder, drop that and have FFmpeg overwrite.

Now, you've got the basics, but you are missing a good output codec.
If you want prores, use -c:v prores -profile:v 2
-c:v meand Codec Video
Profile can be 0 up to 3, where 0 is proxy and 3 is HQ

FFmpeg is case sensistive sometimes, be aware.

To test, use ffmpeg -ss 30 -i input -t 10
-ss means search 30 seconds into the video to start, -t 10 means process only 10 seconds.
This is great to fiddle around without having to way too long.

Also, you can add -an to the command line (audio: none) so your output has no sound. |

Have fun toying!

Bouke
http://www.videotoolshed.com


Return to posts index

Steve Adams
Re: Removing duplicate frames
on Jan 2, 2019 at 5:29:52 pm

I just wanted to post a follow up. I dug through ffmpeg and I was able to remove my duplicate frames. The final command was:

ffmpeg -i cut.mp4 -vf mpdecimate,setpts=N/24/TB -vsync vfr cut_p.mp4

I ran into two problems along the way:

1. MP4, by default, is a constant frame-rate muxer in ffmpeg, so timestamp gaps created by mpdecimate removing duplicates will be plugged back in by duplicate frames. The solution is to set variable frame-rate mode with -vsync vfr.

2. I had to retime the frames after removing the duplicates to get them to play at 24fps, using setpts=N/24/TB.

Thanks


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]