FFmpeg code programming to obtain video information

FFmpeg uses code to get video information

Before writing the code, we use the command to view the video information:

enter:ffprobe 1080P.mp4

The following media information can be fed back:

These information can actually be obtained using ffmpeg. Sometimes, when we are streaming video files or troubleshooting problems, we need to check the information in real time, so this level must be passed. Let's take a look at how to use encoding to get the information we want step by step.

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1080P.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
    description     : Packed by Bilibili XCoder v2.0.2
  Duration: 00:03:46.53, start: 0.000000, bitrate: 

Guess you like

Origin blog.csdn.net/qq_17623363/article/details/126216494