-1

I am re-encoding a video using below command:

ffmpeg -i input.mp4 -q 20 output.avi

The video is 10 mins approx, i.e, it has around 18K frames. However, I am getting last frame number as 5061, but the re-encoded video is playing for all 10 mins. I don't understand the reason why it is showing such a low frame number. Below is last few lines of output.

frame= 5028 fps=143 q=20.0 size=   24863kB time=00:09:53.20 bitrate= 343.4kbits/s dup=0 drop=2087    
Past duration 1.703728 too large
Past duration 0.986687 too large
Past duration 0.704277 too large
Past duration 0.954399 too large
Past duration 1.951469 too large
Past duration 0.879509 too large
Past duration 0.942192 too large  
Past duration 0.815910 too large
Past duration 0.785393 too large
Past duration 0.792351 too large
Past duration 0.644402 too large
frame= 5061 fps=143 q=20.0 Lsize=   25493kB time=00:09:56.45 bitrate= 350.1kbits/s dup=0 drop=2098
video:22458kB audio:2320kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.886272%

Edit: Here is the log

mdasari
  • 423
  • 4
  • 11

1 Answers1

1

As the log shows, the input FPS is 12.

Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 3354 kb/s, 12 fps, 90k tbr, 90k tbn, 180k tbc (default)

It's probably variable frame rate and ffmpeg writes constant frame rate for AVI, so portions of the video with FPS greater than 12 FPS will have dropped frames. You could avoid that by specifying a higher manual framerate e.g. -r 20 but you will end up duplicating frames elsewhere.

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Thanks mulvya. The video has huge number of duplicate frames. Is that why even if the video is 10mins, the frame rate and number frames so low? i.e, Is it showing only unique frames in the video? – mdasari Jul 05 '17 at 18:34