What do the special characters in an ffmpeg file o

2019-09-11 19:30发布

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?

标签: ffmpeg
1条回答
2楼-- · 2019-09-11 20:01

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.

查看更多
登录 后发表回答