FFMPEG nb_frames vs nb_read_frames
12:42 29 Jun 2020

I have videos captured at 200fps and I'm trying to label each frame with it's frame number. However, looking at the original videos with the following command:

ffprobe.exe -i YR7-020320-B1-2.avi -print_format json -loglevel fatal -show_streams -count_frames -select_streams v

and I get the following output:

{
    "streams": [
        {
            "index": 0,
            "codec_name": "dvvideo",
            "codec_long_name": "DV (Digital Video)",
            "codec_type": "video",
            "codec_time_base": "1001/30000",
            "codec_tag_string": "dvsd",
            "codec_tag": "0x64737664",
            "width": 720,
            "height": 480,
            "coded_width": 720,
            "coded_height": 480,
            "closed_captions": 0,
            "has_b_frames": 0,
            "sample_aspect_ratio": "8:9",
            "display_aspect_ratio": "4:3",
            "pix_fmt": "yuv411p",
            "level": -99,
            "chroma_location": "topleft",
            "refs": 1,
            "r_frame_rate": "30000/1001",
            "avg_frame_rate": "200/1",
            "time_base": "1/200",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 67735,
            "duration": "338.675000",
            "bit_rate": "192003405",
            "nb_frames": "67735",
            "nb_read_frames": "55652",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            }
        }
    ]
}

I was wondering what the difference between nb_frames and nb-read-frames is, to know which one denotes the real total number of frames.

Thanks!

ffmpeg ffprobe