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

FFmpeg给我提供了非常好的视频信息分析的办法,使用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

选择一个视频文件,导出视频帧的信息到outframe.info的文件

 

查看视频的frame信息:

 

查看视频的frame信息:

 

 

 

 

 

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

大王算法

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

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

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

打赏作者

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

抵扣说明:

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

余额充值