Attention: This page contains partner and advertising links. Therefore this page is to be understood entirety as an advertisement!
I often have the task to export images with a distance of two or three seconds from a video. For this I mostly use the tool Ffmpeg. Since it is hard to remember the correct command that is also described in the Ffmpeg wiki, here is a small code generator for this. With correct values, the Ffmpeg command is displayed above the code generator.
| key | Value |
|---|---|
| Video filename | |
| Export gap in seconds | |
| Image width (in pixels) | |
| Image height (in pixels) | |
| Image filename | |
| Image format |
The following ffmpeg command parses a video with the filename {{parameters.videoFilename||'video.mov'}} and exports an image with a delay of {{parameters.exportIntervalInSeconds||'2'}} seconds second in the format {{parameters.imageFormat||'jpg'}} , a size of {{parameters.imageWidth||604}}x{{parameters.imageHeight||353}}px and the filename {{parameters.imageFilename||'image'}}_%05d.{{parameters.imageFilename||'imageFormat'}} . The %05d is replaced by a ongoing number.
ffmpeg -i video.mov -vf fps=1/2 -s 604x353 image_%05d.jpg