ffmpeg ffprobe查看视频文件编码格式

输入
/opt/ffmpeg/ffprobe file.mp4 -show_streams -select_streams v -print_format json 
输出
{ 
    "streams": [ 
     { 
      "index": 0, 
      "codec_name": "h264", 
      "codec_long_name": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10", 
      "profile": "Main", 
      "codec_type": "video", 
      "codec_time_base": "1/180000", 
      "codec_tag_string": "avc1", 
      "codec_tag": "0x31637661", 
      "width": 640, 
      "height": 480, 
      "has_b_frames": 2, 
      "sample_aspect_ratio": "1:1", 
      "display_aspect_ratio": "4:3", 
      "pix_fmt": "yuv420p", 
      "level": 40, 
      "color_range": "tv", 
      "color_space": "smpte170m", 
      "color_transfer": "bt709", 
      "color_primaries": "smpte170m", 
      "chroma_location": "left", 
      "refs": 4, 
      "is_avc": "1", 
      "nal_length_size": "4", 
      "r_frame_rate": "30/1", 
      "avg_frame_rate": "90465/3016", 
      "time_base": "1/90000", 
      "start_pts": 0, 
      "start_time": "0.000000", 
      "duration_ts": 36192000, 
      "duration": "402.133333", 
      "bit_rate": "788651", 
      "bits_per_raw_sample": "8", 
      "nb_frames": "12062", 
      "disposition": { 
       "default": 1, 
       "dub": 0, 
       "original": 0, 
       "comment": 0, 
       "lyrics": 0, 
       "karaoke": 0, 
       "forced": 0, 
       "hearing_impaired": 0, 
       "visual_impaired": 0, 
       "clean_effects": 0, 
       "attached_pic": 0 
      }, 
      "tags": { 
       "creation_time": "2036-02-06 06:28:16", 
       "language": "und", 
       "handler_name": "VideoHandler" 
      } 
     } 
    ] 
} 

你可能感兴趣的:(其他,视频处理,ffmpeg,ffprobe)