[FFmpeg-user] Image sequence naming convention

S Andreason sandreas41 at gmail.com
Mon Dec 8 21:31:06 CET 2014


Andreas Weller wrote:
> I did a bunch of camera shots with my raspberry pi camera. In my script
> I use the following naming scheme for the files created: `date
> --iso-8601=seconds`.jpg
>
> Now I would like to further process them with ffmpeg.
>
> What's the correct way to call ffmpeg with these files? Most examples on
> the net simply do it like -f image2 "output_%05d.jpg" - but this
> obviously doesn't work.
>
>   

Hi Andreas,

If you are looking to turn those images into an animation or movie, then 
this is the format of the command you're looking for:

 > ffmpeg -r 30 -i frame-%d.ppm -c:v h264 -s 640x480 out.avi

You'll need each frame numbered in sequential order. The date sequence 
won't work as is.
frame-1.ppm frame-2.ppm frame-3.ppm etc...

and unless there is a new filter for loading non-RAW files, I'd suggest 
a script to batch
 > convert frame-1.jpg frame-1.ppm

Stewart


More information about the ffmpeg-user mailing list