fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.9k stars 877 forks source link

%s keyword for screenshots cannot be padded like %0i and creates long file names #651

Open patrickhpan opened 7 years ago

patrickhpan commented 7 years ago

If I take 100 screenshots from a video using the count option of .screenshots, I can name them %00i and they will be named 001, 002, ..., 009, 010, 011, ..., 099, 100. If I want to name these videos using their timestamps, I get ugly filenames like 96.3818181818182.png. Ideally, I'd be able to use the format string %00s and get a clean filename like 96.png.

njoyard commented 7 years ago

Good idea. Feel free to submit a pull request ! The code that does this is here https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/blob/master/lib/recipes.js#L316