title: Removing duplicate frames with FFmpeg
body: <p>I have an mp4 file, samp1.mp4,  that has duplicate frames and I've tried to use mpdecimate to remove them. The FFmpeg command line I used is </p>
  
  <pre><code>ffmpeg -i samp1.mp4 -vf mpdecimate out3.mp4 &gt; out3.txt 2&gt;&amp;1
  </code></pre>
  
  <p>But the output file, out3.mp4, still has the duplicate frames.</p>
  
  <p>The command generates the text:</p>
  
  <pre><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'samp1.mp4':
    Metadata:
      major_brand     : M4V 
      minor_version   : 1
      compatible_brands: M4V mp42isom
      creation_time   : 2018-12-26T20:38:35.000000Z
    Duration: 00:00:04.77, start: 0.000000, bitrate: 4495 kb/s
      Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 4476 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
      Metadata:
        creation_time   : 2018-12-26T20:38:35.000000Z
        handler_name    : Mainconcept MP4 Video Media Handler
        encoder         : AVC Coding
  
  Output #0, mp4, to 'out3.mp4':
    Metadata:
      major_brand     : M4V 
      minor_version   : 1
      compatible_brands: M4V mp42isom
      encoder         : Lavf58.25.100
      Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720, q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
      Metadata:
        creation_time   : 2018-12-26T20:38:35.000000Z
        handler_name    : Mainconcept MP4 Video Media Handler
        encoder         : Lavc58.42.104 libx264
      Side data:
        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
  frame=   57 fps=0.0 q=29.0 size=       0kB time=00:00:00.13 bitrate=   2.9kbits/s dup=35 drop=0 speed=0.262x    
  frame=   87 fps= 75 q=29.0 size=     256kB time=00:00:01.13 bitrate=1848.9kbits/s dup=56 drop=0 speed=0.978x    
  frame=  117 fps= 65 q=29.0 size=     256kB time=00:00:02.13 bitrate= 982.2kbits/s dup=74 drop=0 speed=1.19x    
  frame=  142 fps= 62 q=29.0 size=     256kB time=00:00:02.96 bitrate= 706.3kbits/s dup=88 drop=0 speed=1.29x    
  frame=  142 fps= 47 q=-1.0 Lsize=     720kB time=00:00:04.63 bitrate=1271.0kbits/s dup=88 drop=0 speed=1.52x    
  </code></pre>
  
  <p>=================== 
  These last five lines of output are interesting. The first line</p>
  
  <pre><code>frame=   57 fps=0.0 q=29.0 size=       0kB time=00:00:00.13 bitrate=   2.9kbits/s dup=35 drop=0 speed=0.262x   
  </code></pre>
  
  <p>seems to say that frame 57 was a duplicate, the total number of duplicates found now = 35, and the total frames dropped is 0.</p>
  
  <p>1) Is that correct, 2) why weren't any frames dropped on any of the lines, and 3) why does the output file still contain duplicates?</p>
  
  <p>Thanks for any help.</p>