gpt4 book ai didi

json - 如何获取ffmpeg命令生成的json的key值?

转载 作者:行者123 更新时间:2023-12-04 23:19:08 26 4
gpt4 key购买 nike

ffprobe -hide_banner -loglevel panic -show_streams -of json 01e8adee-b0f9-4569-a5f5-b2d69d1f7088.flac
输出:-

 {
"streams": [
{
"index": 0,
"codec_name": "flac",
"codec_long_name": "FLAC (Free Lossless Audio Codec)",
"codec_type": "audio",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"sample_fmt": "s32",
"sample_rate": "44100",
"channels": 1,
"channel_layout": "mono",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/44100",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 4687872,
"duration": "106.300952",
"bits_per_raw_sample": "24",
"extradata_size": 34,
"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,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
}
}
]
}

如何仅获得采样率作为输出我应该在上述命令中进行哪些修改。

最佳答案

-show_streams 更改为 -show_entries stream=sample_rate

ffprobe -hide_banner -loglevel panic -show_streams -of json 01e8adee-b0f9-4569-a5f5-b2d69d1f7088.flac

关于json - 如何获取ffmpeg命令生成的json的key值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70576103/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com