[FFmpeg-devel] FPS detection when h264 file is decoded

William K. Kang bigskang
Thu Dec 2 02:22:58 CET 2010


Hi,

When ffmpeg decodes h264 file, there is a symptom that ffmpeg?s fps is half
of the original frame rate.
[kwkang at aLinux ffmpeg-0.6.1]$ ./ffmpeg -i /pub/kwkang/h264/test_60.h264
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Nov 29 2010 14:14:35 with gcc 4.3.2 20081105 (Red Hat 4.3.2-7)
  configuration:
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
[h264 @ 0x2b8d420]max_analyze_duration reached
[h264 @ 0x2b8d420]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 60.00
(60/1) -> 30.00 (60/2)
Input #0, h264, from '/pub/kwkang/h264/test_60.h264':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264, yuv420p, 1920x1088 [PAR 1:1 DAR 30:17], 30
fps, 30 tbr, 1200k tbn, 60 tbc
At least one output file must be specified

Frame rate of test_60.h264 is 60 but ffmpeg is telling it is 30 fps.
Could you know why?

Thanks



More information about the ffmpeg-devel mailing list