How to get h264 video info?

后端 未结 4 844
误落风尘
误落风尘 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:51

    Does mediainfo provide the output you need? http://mediainfo.sourceforge.net/en

    (if you're on a Mac, you can install easily with brew. > brew install media-info)

    $ mediainfo Dream.House.sample.mkv 
    General
    Unique ID                        : 247222296143464620093895254679791638636 (0xB9FD4845398D136BB4A1628DB750986C)
    Complete name                    : Dream.House.sample.mkv
    Format                           : Matroska
    Format version                   : Version 2
    File size                        : 126 MiB
    Duration                         : 1mn 56s
    Overall bit rate                 : 9 042 Kbps
    Encoded date                     : UTC 2011-12-15 03:44:07
    Writing application              : mkvmerge v3.0.0 ('Hang up your Hang-Ups') built on Dec 12 2009 15:20:35
    Writing library                  : libebml v0.7.9 + libmatroska v0.8.1
    
    Video
    ID                               : 1
    Format                           : AVC
    Format/Info                      : Advanced Video Codec
    Format profile                   : High@L4.1
    Format settings, CABAC           : Yes
    Format settings, ReFrames        : 4 frames
    Codec ID                         : V_MPEG4/ISO/AVC
    Duration                         : 1mn 56s
    Bit rate                         : 5 843 Kbps
    Width                            : 1 280 pixels
    Height                           : 544 pixels
    Display aspect ratio             : 2.40:1
    Frame rate                       : 23.976 fps
    Color space                      : YUV
    Chroma subsampling               : 4:2:0
    Bit depth                        : 8 bits
    Scan type                        : Progressive
    Bits/(Pixel*Frame)               : 0.350
    Stream size                      : 81.5 MiB (65%)
    Language                         : English
    
    Audio #1
    ID                               : 2
    Format                           : DTS
    Format/Info                      : Digital Theater Systems
    Codec ID                         : A_DTS
    Duration                         : 1mn 56s
    Bit rate mode                    : Constant
    Bit rate                         : 1 510 Kbps
    Channel(s)                       : 6 channels
    Channel positions                : Front: L C R, Side: L R, LFE
    Sampling rate                    : 48.0 KHz
    Bit depth                        : 24 bits
    Compression mode                 : Lossy
    Delay relative to video          : 67ms
    Stream size                      : 21.1 MiB (17%)
    Language                         : Russian
    
    Audio #2
    ID                               : 3
    Format                           : DTS
    Format/Info                      : Digital Theater Systems
    Codec ID                         : A_DTS
    Duration                         : 1mn 56s
    Bit rate mode                    : Constant
    Bit rate                         : 1 510 Kbps
    Channel(s)                       : 6 channels
    Channel positions                : Front: L C R, Side: L R, LFE
    Sampling rate                    : 48.0 KHz
    Bit depth                        : 24 bits
    Compression mode                 : Lossy
    Delay relative to video          : 67ms
    Stream size                      : 21.1 MiB (17%)
    Language                         : English
    

提交回复
热议问题