ffmpeg文件输出格式的特殊字符是什么意思? [英] What do the special characters in an ffmpeg file output format mean?

查看:1249
本文介绍了ffmpeg文件输出格式的特殊字符是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用ffmpeg处理一些视频,我发现一个示例命令几乎完成了我所需要的一切:

  ffmpeg -i example.avi -vf fps = 1/30 example_%03d.jpg 

我知道这个命令是什么,但是我一直无法弄清输出文件格式的%03d 的含义。 ffmpeg文件输出格式中的%03d 是什么意思? ffmpeg输出中还允许使用什么其他特殊的序列?

解决方案

根据文档


语法foo-%03d .jpeg指定使用由填充有零的三位数组成的十进制数来表示序列号。它与C printf函数支持相同的语法,但只适用于接受正常整数的格式。


所以生成的文件名是 example_001.jpg example_002.jpg ,..., example_123.jpg



另请参见 image sequence条目

I need to process some videos with ffmpeg, and I found an example command that does almost everything I need it to:

ffmpeg -i example.avi -vf fps=1/30 example_%03d.jpg

I've figured out what all of this command does, but I've been unable to figure out the meaning of %03d in the output file format. What does %03d mean in a ffmpeg file output format mean? What other special sequences are allowed in an ffmpeg output?

According to the documentation:

The syntax foo-%03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a normal integer are suitable.

So the resulting file names are example_001.jpg, example_002.jpg, … , example_123.jpg.

See also the "image sequence" entry in the FFMPEG An Intermediate Guide for details and examples.

这篇关于ffmpeg文件输出格式的特殊字符是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆