Body: <p>I have CCTV footage exported from a motion activated camera system. When the camera is not active the exported file keeps time by overlaying a black rectangle on the most recent captured image, and then repeating that single frame until there is action again. (Kinda dumb.) </p>
  
  <p>I want to get rid of all of the no-action frames. I have successfully used mpdecimate in the past to remove duplicate frames, but that always keeps the first frame in the duplicate sequence. In my case I want the first frame gone too.</p>
  
  <p>Is there a straightforward solution to this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-02T07:52:20.917Z
Comments.Text: That first frame isn't a duplicate, since due to the black rect, it is different than the previous frame. Is the black rect always drawn in a fixed position and size each time?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-10T01:20:50.100Z
Comments.Text: It is. It's automatically inserted as a timekeeping placeholder over the static "frame where movement last ended." If it would be helpful to see, I can upload a portion of the clip for you to see. Thank you for your help.
Comments.UserDisplayName: Custom Soundtrack
Tags: <video><ffmpeg>
Title: How can I delete ALL duplicated frames with ffmpeg and mpdecimate?
UserDisplayName: Custom Soundtrack
ThreadText: # How can I delete ALL duplicated frames with ffmpeg and mpdecimate?
  
  (Asked by: username_0 on 2018-07-01)
  
  I have CCTV footage exported from a motion activated camera system. When the camera is not active the exported file keeps time by overlaying a black rectangle on the most recent captured image, and then repeating that single frame until there is action again. (Kinda dumb.)
  
  I want to get rid of all of the no-action frames. I have successfully used mpdecimate in the past to remove duplicate frames, but that always keeps the first frame in the duplicate sequence. In my case I want the first frame gone too.
  
  Is there a straightforward solution to this?
  
  **Tags:** video, ffmpeg
  
  > **Comments:**
  > **username_1**: That first frame isn't a duplicate, since due to the black rect, it is different than the previous frame. Is the black rect always drawn in a fixed position and size each time?  
  > **username_0**: It is. It's automatically inserted as a timekeeping placeholder over the static "frame where movement last ended." If it would be helpful to see, I can upload a portion of the clip for you to see. Thank you for your help.  
  
  ---
  
  ## 0 answers
  
  