使用ffprobe获取视频每一帧的信息

使用ffprobe对音视频流的结构的分析对进行音视频的处理会很有帮助

可以通过使用ffprobe --help来查看一些详细的参数的意义

usage: ffprobe [OPTIONS] [INPUT_FILE]

Main options:
-L                  show license
-h topic            show help
-? topic            show help
-help topic         show help
--help topic        show help
-version            show version
-buildconf          show build configuration
-formats            show available formats
-muxers             show available muxers
-demuxers           show available demuxers
-devices            show available devices
-codecs             show available codecs
-decoders           show available decoders
-encoders           show available encoders
-bsfs               show available bit stream filters
-protocols          show available protocols
-filters            show available filters
-pix_fmts           show available pixel formats
-layouts            show standard channel layouts
-sample_fmts        show available audio sample formats
-colors             show available color names
-loglevel loglevel  set logging level
-v loglevel         set logging level
-report             generate a report
-max_alloc bytes    set maximum size of a single allocated block
-cpuflags flags     force specific cpu flags
-hide_banner hide_banner  do not show program banner
-sources device     list sources of the input device
-sinks device       list sinks of the output device
-f format           force format
-unit               show unit of the displayed values
-prefix             use SI prefixes for the displayed values
-byte_binary_prefix  use binary prefixes for byte units
-sexagesimal        use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units
-pretty             prettify the format of displayed values, make it more human readable
-print_format format  set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)
-of format          alias for -print_format
-select_streams stream_specifier  select the specified streams
-sections           print sections structure and section information, and exit
-show_data          show packets data
-show_data_hash     show packets data hash
-show_error         show probing error
-show_format        show format/container info
-show_frames        show frames info
-show_format_entry entry  show a particular entry from the format/container info
-show_entries entry_list  show a set of specified entries
-show_log           show log
-show_packets       show packets info
-show_programs      show programs info
-show_streams       show streams info
-show_chapters      show chapters info
-count_frames       count the number of frames per stream
-count_packets      count the number of packets per stream
-show_program_version  show ffprobe version
-show_library_versions  show library versions
-show_versions      show program and library versions
-show_pixel_formats  show pixel format descriptions
-show_private_data  show private data
-private            same as show_private_data
-bitexact           force bitexact output
-read_intervals read_intervals  set read intervals
-default            generic catch all option
-i input_file       read specified file
-find_stream_info   read and decode the streams to fill missing information with heuristics
......

#显示Video帧的信息

ffprobe -show_frames -select_streams v -of xml VID_20180828_171435454.mp4 >videoframes.info
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
    <frames>
        <frame media_type="video" stream_index="0" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="4706" pkt_duration_time="0.052289" pkt_pos="405185" pkt_size="21464" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="4706" pkt_pts_time="0.052289" pkt_dts="4706" pkt_dts_time="0.052289" best_effort_timestamp="4706" best_effort_timestamp_time="0.052289" pkt_duration="4492" pkt_duration_time="0.049911" pkt_pos="426649" pkt_size="25390" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="1" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="9198" pkt_pts_time="0.102200" pkt_dts="9198" pkt_dts_time="0.102200" best_effort_timestamp="9198" best_effort_timestamp_time="0.102200" pkt_duration="4492" pkt_duration_time="0.049911" pkt_pos="452039" pkt_size="45821" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="2" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="13690" pkt_pts_time="0.152111" pkt_dts="13690" pkt_dts_time="0.152111" best_effort_timestamp="13690" best_effort_timestamp_time="0.152111" pkt_duration="4503" pkt_duration_time="0.050033" pkt_pos="497860" pkt_size="50677" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="3" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="18193" pkt_pts_time="0.202144" pkt_dts="18193" pkt_dts_time="0.202144" best_effort_timestamp="18193" best_effort_timestamp_time="0.202144" pkt_duration="4503" pkt_duration_time="0.050033" pkt_pos="548537" pkt_size="31618" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="4" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="22696" pkt_pts_time="0.252178" pkt_dts="22696" pkt_dts_time="0.252178" best_effort_timestamp="22696" best_effort_timestamp_time="0.252178" pkt_duration="4491" pkt_duration_time="0.049900" pkt_pos="580155" pkt_size="35258" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="5" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="27187" pkt_pts_time="0.302078" pkt_dts="27187" pkt_dts_time="0.302078" best_effort_timestamp="27187" best_effort_timestamp_time="0.302078" pkt_duration="4491" pkt_duration_time="0.049900" pkt_pos="615413" pkt_size="45253" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="6" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="31678" pkt_pts_time="0.351978" pkt_dts="31678" pkt_dts_time="0.351978" best_effort_timestamp="31678" best_effort_timestamp_time="0.351978" pkt_duration="4504" pkt_duration_time="0.050044" pkt_pos="660666" pkt_size="35690" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="7" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="36182" pkt_pts_time="0.402022" pkt_dts="36182" pkt_dts_time="0.402022" best_effort_timestamp="36182" best_effort_timestamp_time="0.402022" pkt_duration="4504" pkt_duration_time="0.050044" pkt_pos="696356" pkt_size="37241" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="8" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="40686" pkt_pts_time="0.452067" pkt_dts="40686" pkt_dts_time="0.452067" best_effort_timestamp="40686" best_effort_timestamp_time="0.452067" pkt_duration="4491" pkt_duration_time="0.049900" pkt_pos="733597" pkt_size="45415" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="9" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="45177" pkt_pts_time="0.501967" pkt_dts="45177" pkt_dts_time="0.501967" best_effort_timestamp="45177" best_effort_timestamp_time="0.501967" pkt_duration="4491" pkt_duration_time="0.049900" pkt_pos="779012" pkt_size="36235" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="10" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="49668" pkt_pts_time="0.551867" pkt_dts="49668" pkt_dts_time="0.551867" best_effort_timestamp="49668" best_effort_timestamp_time="0.551867" pkt_duration="4504" pkt_duration_time="0.050044" pkt_pos="815247" pkt_size="35831" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="11" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="54172" pkt_pts_time="0.601911" pkt_dts="54172" pkt_dts_time="0.601911" best_effort_timestamp="54172" best_effort_timestamp_time="0.601911" pkt_duration="4504" pkt_duration_time="0.050044" pkt_pos="851078" pkt_size="53989" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="12" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="58676" pkt_pts_time="0.651956" pkt_dts="58676" pkt_dts_time="0.651956" best_effort_timestamp="58676" best_effort_timestamp_time="0.651956" pkt_duration="4490" pkt_duration_time="0.049889" pkt_pos="905067" pkt_size="32714" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="13" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="63166" pkt_pts_time="0.701844" pkt_dts="63166" pkt_dts_time="0.701844" best_effort_timestamp="63166" best_effort_timestamp_time="0.701844" pkt_duration="5397" pkt_duration_time="0.059967" pkt_pos="937781" pkt_size="31240" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="14" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="68563" pkt_pts_time="0.761811" pkt_dts="68563" pkt_dts_time="0.761811" best_effort_timestamp="68563" best_effort_timestamp_time="0.761811" pkt_duration="5397" pkt_duration_time="0.059967" pkt_pos="969021" pkt_size="35917" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="15" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="73960" pkt_pts_time="0.821778" pkt_dts="73960" pkt_dts_time="0.821778" best_effort_timestamp="73960" best_effort_timestamp_time="0.821778" pkt_duration="5397" pkt_duration_time="0.059967" pkt_pos="1004938" pkt_size="30373" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="16" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="79357" pkt_pts_time="0.881744" pkt_dts="79357" pkt_dts_time="0.881744" best_effort_timestamp="79357" best_effort_timestamp_time="0.881744" pkt_duration="5397" pkt_duration_time="0.059967" pkt_pos="1035311" pkt_size="30607" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="17" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="84754" pkt_pts_time="0.941711" pkt_dts="84754" pkt_dts_time="0.941711" best_effort_timestamp="84754" best_effort_timestamp_time="0.941711" pkt_duration="5397" pkt_duration_time="0.059967" pkt_pos="1065918" pkt_size="35884" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="18" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="90151" pkt_pts_time="1.001678" pkt_dts="90151" pkt_dts_time="1.001678" best_effort_timestamp="90151" best_effort_timestamp_time="1.001678" pkt_duration="5410" pkt_duration_time="0.060111" pkt_pos="1101802" pkt_size="40162" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="19" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="95561" pkt_pts_time="1.061789" pkt_dts="95561" pkt_dts_time="1.061789" best_effort_timestamp="95561" best_effort_timestamp_time="1.061789" pkt_duration="5391" pkt_duration_time="0.059900" pkt_pos="1141964" pkt_size="36186" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="20" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="100952" pkt_pts_time="1.121689" pkt_dts="100952" pkt_dts_time="1.121689" best_effort_timestamp="100952" best_effort_timestamp_time="1.121689" pkt_duration="5391" pkt_duration_time="0.059900" pkt_pos="1210962" pkt_size="36686" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="21" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="106343" pkt_pts_time="1.181589" pkt_dts="106343" pkt_dts_time="1.181589" best_effort_timestamp="106343" best_effort_timestamp_time="1.181589" pkt_duration="5405" pkt_duration_time="0.060056" pkt_pos="1247648" pkt_size="31320" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="22" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="111748" pkt_pts_time="1.241644" pkt_dts="111748" pkt_dts_time="1.241644" best_effort_timestamp="111748" best_effort_timestamp_time="1.241644" pkt_duration="5405" pkt_duration_time="0.060056" pkt_pos="1278968" pkt_size="33733" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="23" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="117153" pkt_pts_time="1.301700" pkt_dts="117153" pkt_dts_time="1.301700" best_effort_timestamp="117153" best_effort_timestamp_time="1.301700" pkt_duration="5391" pkt_duration_time="0.059900" pkt_pos="1312701" pkt_size="30277" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="24" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="122544" pkt_pts_time="1.361600" pkt_dts="122544" pkt_dts_time="1.361600" best_effort_timestamp="122544" best_effort_timestamp_time="1.361600" pkt_duration="5391" pkt_duration_time="0.059900" pkt_pos="1342978" pkt_size="30562" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="25" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="127935" pkt_pts_time="1.421500" pkt_dts="127935" pkt_dts_time="1.421500" best_effort_timestamp="127935" best_effort_timestamp_time="1.421500" pkt_duration="4504" pkt_duration_time="0.050044" pkt_pos="1373540" pkt_size="25062" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="26" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="132439" pkt_pts_time="1.471544" pkt_dts="132439" pkt_dts_time="1.471544" best_effort_timestamp="132439" best_effort_timestamp_time="1.471544" pkt_duration="4504" pkt_duration_time="0.050044" pkt_pos="1398602" pkt_size="26656" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="27" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="136943" pkt_pts_time="1.521589" pkt_dts="136943" pkt_dts_time="1.521589" best_effort_timestamp="136943" best_effort_timestamp_time="1.521589" pkt_duration="4493" pkt_duration_time="0.049922" pkt_pos="1425258" pkt_size="30651" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="28" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="1" pkt_pts="141436" pkt_pts_time="1.571511" pkt_dts="141436" pkt_dts_time="1.571511" best_effort_timestamp="141436" best_effort_timestamp_time="1.571511" pkt_duration="4493" pkt_duration_time="0.049922" pkt_pos="1455909" pkt_size="44711" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="29" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="145929" pkt_pts_time="1.621433" pkt_dts="145929" pkt_dts_time="1.621433" best_effort_timestamp="145929" best_effort_timestamp_time="1.621433" pkt_duration="4493" pkt_duration_time="0.049922" pkt_pos="1500620" pkt_size="37352" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="30" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="150422" pkt_pts_time="1.671356" pkt_dts="150422" pkt_dts_time="1.671356" best_effort_timestamp="150422" best_effort_timestamp_time="1.671356" pkt_duration="4503" pkt_duration_time="0.050033" pkt_pos="1537972" pkt_size="41235" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="31" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="154925" pkt_pts_time="1.721389" pkt_dts="154925" pkt_dts_time="1.721389" best_effort_timestamp="154925" best_effort_timestamp_time="1.721389" pkt_duration="4503" pkt_duration_time="0.050033" pkt_pos="1579207" pkt_size="43516" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="32" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="159428" pkt_pts_time="1.771422" pkt_dts="159428" pkt_dts_time="1.771422" best_effort_timestamp="159428" best_effort_timestamp_time="1.771422" pkt_duration="4492" pkt_duration_time="0.049911" pkt_pos="1622723" pkt_size="34860" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="33" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="163920" pkt_pts_time="1.821333" pkt_dts="163920" pkt_dts_time="1.821333" best_effort_timestamp="163920" best_effort_timestamp_time="1.821333" pkt_duration="4502" pkt_duration_time="0.050022" pkt_pos="1657583" pkt_size="27403" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="34" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="168422" pkt_pts_time="1.871356" pkt_dts="168422" pkt_dts_time="1.871356" best_effort_timestamp="168422" best_effort_timestamp_time="1.871356" pkt_duration="4493" pkt_duration_time="0.049922" pkt_pos="1684986" pkt_size="30692" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="35" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="172915" pkt_pts_time="1.921278" pkt_dts="172915" pkt_dts_time="1.921278" best_effort_timestamp="172915" best_effort_timestamp_time="1.921278" pkt_duration="4493" pkt_duration_time="0.049922" pkt_pos="1715678" pkt_size="37773" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="36" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="177408" pkt_pts_time="1.971200" pkt_dts="177408" pkt_dts_time="1.971200" best_effort_timestamp="177408" best_effort_timestamp_time="1.971200" pkt_duration="4493" pkt_duration_time="0.049922" pkt_pos="1753451" pkt_size="44058" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="37" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="181901" pkt_pts_time="2.021122" pkt_dts="181901" pkt_dts_time="2.021122" best_effort_timestamp="181901" best_effort_timestamp_time="2.021122" pkt_duration="4506" pkt_duration_time="0.050067" pkt_pos="1797509" pkt_size="32332" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="38" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="186407" pkt_pts_time="2.071189" pkt_dts="186407" pkt_dts_time="2.071189" best_effort_timestamp="186407" best_effort_timestamp_time="2.071189" pkt_duration="4506" pkt_duration_time="0.050067" pkt_pos="1829841" pkt_size="31392" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="39" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="190913" pkt_pts_time="2.121256" pkt_dts="190913" pkt_dts_time="2.121256" best_effort_timestamp="190913" best_effort_timestamp_time="2.121256" pkt_duration="4490" pkt_duration_time="0.049889" pkt_pos="1861233" pkt_size="31115" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="40" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="195403" pkt_pts_time="2.171144" pkt_dts="195403" pkt_dts_time="2.171144" best_effort_timestamp="195403" best_effort_timestamp_time="2.171144" pkt_duration="4500" pkt_duration_time="0.050000" pkt_pos="1892348" pkt_size="36609" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="41" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="199903" pkt_pts_time="2.221144" pkt_dts="199903" pkt_dts_time="2.221144" best_effort_timestamp="199903" best_effort_timestamp_time="2.221144" pkt_duration="4500" pkt_duration_time="0.050000" pkt_pos="1928957" pkt_size="37361" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="42" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="204403" pkt_pts_time="2.271144" pkt_dts="204403" pkt_dts_time="2.271144" best_effort_timestamp="204403" best_effort_timestamp_time="2.271144" pkt_duration="4490" pkt_duration_time="0.049889" pkt_pos="1966318" pkt_size="29063" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="43" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="208893" pkt_pts_time="2.321033" pkt_dts="208893" pkt_dts_time="2.321033" best_effort_timestamp="208893" best_effort_timestamp_time="2.321033" pkt_duration="4500" pkt_duration_time="0.050000" pkt_pos="1995381" pkt_size="28538" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="44" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="213393" pkt_pts_time="2.371033" pkt_dts="213393" pkt_dts_time="2.371033" best_effort_timestamp="213393" best_effort_timestamp_time="2.371033" pkt_duration="4500" pkt_duration_time="0.050000" pkt_pos="2023919" pkt_size="33868" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="45" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="217893" pkt_pts_time="2.421033" pkt_dts="217893" pkt_dts_time="2.421033" best_effort_timestamp="217893" best_effort_timestamp_time="2.421033" pkt_duration="4500" pkt_duration_time="0.050000" pkt_pos="2057787" pkt_size="33002" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="46" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="222393" pkt_pts_time="2.471033" pkt_dts="222393" pkt_dts_time="2.471033" best_effort_timestamp="222393" best_effort_timestamp_time="2.471033" pkt_duration="4490" pkt_duration_time="0.049889" pkt_pos="2090789" pkt_size="33017" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="47" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
        <frame media_type="video" stream_index="0" key_frame="0" pkt_pts="226883" pkt_pts_time="2.520922" pkt_dts="226883" pkt_dts_time="2.520922" best_effort_timestamp="226883" best_effort_timestamp_time="2.520922" pkt_duration="4490" pkt_duration_time="0.049889" pkt_pos="2123806" pkt_size="39891" width="1280" height="720" pix_fmt="yuv420p" sample_aspect_ratio="1:1" pict_type="P" coded_picture_number="48" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" color_range="tv" color_primaries="bt470bg" chroma_location="left"/>
    </frames>
</ffprobe>

主要数据含义:

key_frame:是否是关键帧
pkt_pts:帧的pts数值
pkt_pts_time:通过time_base计算出来的显示时间
pkt_dts:帧的dts数值
pkt_dts_time:通过time_base计算出来的dts时间
pict_type:帧类型(I、B、P)

上面显示的是video部分,显示audio部分可以改变参数-select_streams v
#其他
使用 -show_streams 参数查看视频中的流信息

使用 -show_packets 参数查看包信息

通过ffprobe读取packets来进行对应的数据分析,使用show_packets与show_data配合可以更加精确的分析。


Guys,oppo内推啦,欢迎发简历给我
https://blog.csdn.net/ch853199769/article/details/114842209

  • 3
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

安德路

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值