How is "Frame rate mode" det...

Help
2012-08-17
2012-12-11
  • Ton van Leeuwen

    Ton van Leeuwen - 2012-08-17

    For some MKV files with H.264 video stream, "frame rate mode: variable" or "frame rate mode: variable / variable" is reported by MediaInfo. How is this determined? I have read in several places, that this information is not stored in the MKV header. Is this determined from the actual frame durations specified in the whole video stream, or a sample of the video stream, or is the information about the absence of information in the header simply incorrect?
    The reason behind this question is that whenever a variable mode is reported, my media player (old AC Ryan HD) has allways difficulties playing the file. To make things more frustrating, when I load these "variable mode" MKV files in Avidemux, all frames are exactly 40 ms spaced - i.e., 25fps.
    I found an ffmpeg bitstream filter (h264_changesps) which has an option to "set the framerate mode to fixed" (indeed it works, at least MediaInfo does not report a variable frame rate anymore). However, it is frustrating that I have no idea what actually happens!

     
  • Jerome Martinez

    Jerome Martinez - 2012-08-17

    I speak about latest version 0.7.59, because it has a bit changed there.
    I detect variable frame rate from:
    - duration of a frame
    - time stamp difference.

    I test few tens of frames at the begining of the stream.
    - a stream indicated as VFR is VFR for sure (detected)
    - a stream indicated as CFR may be VFR if it changes later. It would be weird, I never saw such file.

    To make things more frustrating, when I load these "variable mode" MKV files in Avidemux, all frames are exactly 40 ms spaced - i.e., 25fps.

    Please provide a sample file, I'll say the reason I detect it as VFR.

     
  • Ton van Leeuwen

    Ton van Leeuwen - 2012-08-18

    Thanks for the clear answer! I have prepared a sample file (25MB), how can I send it to you?

     
  • Jerome Martinez

    Jerome Martinez - 2012-08-19

    I have prepared a sample file

    Frame 1 : time code 80
    Frame 2 : time code 240 (difference 160)
    Frame 3 : time code 280 (difference 40)
    Frame 4 : time code 320 (difference 40)
    (then always difference 40)

    So your file is detected as VFR du to this difference between frames 1 and 2.

    Note: there is also no "original frame rate" info because the H264 stream as the fixed_frame_rate field set to 0.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks