What does "probe_score" mean in ffprobe output?
Asked Answered
O

1

18

Given a media file, after running ffprobe -i input.mp4 -show_format -print_format json, I got something like this:

{
    "format": {
        "filename": "ooxx.mp4",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.000000",
        "duration": "231.210000",
        "size": "65133325",
        "bit_rate": "2253650",
        "probe_score": 100,
        "tags": {
            "major_brand": "isom",
            "minor_version": "512",
            "compatible_brands": "isomiso2avc1mp41",
            "encoder": "Lavf55.33.100",
        }
    }
}

I'm wondering what does probe_score mean here? How does it get calculated?

Overtrick answered 12/8, 2014 at 6:56 Comment(0)
A
23

An input (a file in this case) can have an extension (say ".avi") and be of a different format (a wav file for example). FFmpeg can detect the real format of an input (with ffprobe). In order to do this, it opens the file and read it (the first 5 seconds, set by option analyzeduration if I recall correctly). Then, it assign a score to each format: a low score if the data have nothing to do with the input, a high score if the format seems the right one.

The format returned is the one with the highest score. probe_score is this score.

100 is the maximum score, meaning that FFmpeg is sure that the format is the real one. With a score below 25, it is recommanded to increase probe duration.

Apron answered 13/8, 2014 at 14:29 Comment(1)
Is this officially documented anywhere? I didn't find it in ffprobe's documentation: ffmpeg.org/ffprobe.htmlMedullary

© 2022 - 2024 — McMap. All rights reserved.