FFMPEG-尝试输出黑人之间段的CSV的时间代码
我很高兴为此提供一些帮助。
我有这种形式的视频匆忙:Black>序列>黑色>序列...
我需要每个序列的启动/结束时间代码(无黑色)来在另一个软件上创建段,因此我想知道是否有可能使用FFMPEG的BlackDetect过滤器来仅在CSV文件中输出序列数据。简单的命令行没有黑人的问题,但是目前我仍在其他其他测试中未能成功。
目标是通过将CSV导入RPA中的多个文件自动化。
非常感谢。
I would be so glad to have some help with this.
I have video rushes in this form : black > sequence > black > sequence...
I need the start/end timecodes of each sequences (no black) to create segments on another software so I wondering if it's possible with the blackdetect filter of FFmpeg to output only the sequences data in a csv file. No problem with the simple command line to have the blacks but I'm still at this point with unsuccess others test.
The goal is automate this for multiple files by import the csv in a RPA.
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能单独使用ffmpeg做到这一点,但是在脚本(即python)的帮助下,您可以解码帧元数据。以下过滤器输出将黑色检测输出到stdout:
您的脚本应捕获管道输出,并解析输出以检索PTS并检测
black_start
和black_end
输出到CSV文件。如果您的另一个程序灵活,则可以或者可以或者指定输出文件名
file = xxx
并在此进行解析。You cannot do that with ffmpeg by itself, but with a bit of help from a script (i.e., Python) you can decode the frame metadata. The following filtergraph outputs the black detect output to stdout:
Your script shall capture the pipe output, and parse the output to retrieve the pts and detect either
black_start
andblack_end
and reformat and output to a csv file.If your other program is flexible, you can alternately specify output file name
file=xxx
and do the parsing there.