How to get h264 video info?

后端 未结 4 964
误落风尘
误落风尘 2020-12-25 10:58

How can I get specific h264 video information from video file? I need to know profile (Baseline/Main/High) and is there B-Frames in movie?

4条回答
  •  太阳男子
    2020-12-25 11:48

    ffprobe, as of version 1.0.7 provides a nicely formated JSON output with the -print_format json command switch.

    You can use it like this:

    ffprobe -v quiet -print_format json -show_format Ramp\ -\ Apathy.mp3

    Which produces the follwing output:

    {
        "format": {
            "filename": "Ramp - Apathy.mp3",
            "nb_streams": 2,
            "format_name": "mp3",
            "format_long_name": "MP2/3 (MPEG audio layer 2/3)",
            "start_time": "0.000000",
            "duration": "203.638856",
            "size": "4072777",
            "bit_rate": "159999",
            "tags": {
                "title": "Apathy",
                "artist": "Ramp",
                "album": "Evolution Devolution Revolution",
                "date": "1999",
                "genre": "Metal"
            }
        }
    }
    

提交回复
热议问题