gpt4 book ai didi

ffmpeg - 如何将ffprobe结果保存在json中

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

我正在使用以下内容:
ffprobe -i bunny.mp4 -v quiet -select_streams v -print_format json -show_entries frame=pkt_pts_time,pict_type|grep -B 1 pict_type=I

所以我可以在 json 文件中节省索引帧的时间。
没有以下命令,该命令也可以正常工作:
“打印formqt json”,
我添加后它似乎不起作用。
我尝试过“打印格式 json”命令,例如:
ffprobe -v 安静 -print_format json -show_format -show_streams "lolwut.mp4"
它工作得很好。
可能是什么问题?

最佳答案

grep 正在寻找错误的字符串。

它应该是
ffprobe -i bunny.mp4 -v quiet -select_streams v -print_format json -show_entries frame=pkt_pts_time,pict_type | grep -B 1 "\"pict_type\": \"I\""

关于ffmpeg - 如何将ffprobe结果保存在json中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51961359/

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