ffprobe读取音视频元数据信息,json格式输出

网友投稿 886 2022-10-17

ffprobe读取音视频元数据信息,json格式输出

ffprobe读取音视频元数据信息,json格式输出

命令格式:

ffprobe -v quiet -show_format -show_streams -print_format json F:\temp\test1566606924822.wav

输出

{ "streams": [ { "index": 0, "codec_name": "pcm_s16le", "codec_long_name": "PCM signed 16-bit little-endian", "codec_type": "audio", "codec_time_base": "1/8000", "codec_tag_string": "[1][0][0][0]", "codec_tag": "0x0001", "sample_fmt": "s16", "sample_rate": "8000", "channels": 1, "bits_per_sample": 16, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/8000", "duration_ts": 1710489, "duration": "213.811125", "bit_rate": "128000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 } } ], "format": { "filename": "F:\\temp\\test1566606924822.wav", "nb_streams": 1, "nb_programs": 0, "format_name": "wav", "format_long_name": "WAV / WAVE (Waveform Audio)", "duration": "213.811125", "size": "3421022", "bit_rate": "128001", "probe_score": 99 }}

其他用法:

1.ts如果是音频,改 -select_streams a如果要选择音轨,可以这样 -select_streams a:0./ffprobe -select_streams a:0 -show_packets -of json 1.ts

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:swoft框架通用缓存组件,基于swoft框架的aop实现
下一篇:Netty源码分析NioEventLoop执行select操作入口
相关文章

 发表评论

暂时没有评论,来抢沙发吧~