How to convert all png files from a particular num

2020-05-07 04:59发布

I have a list of images in a folder with the name image0101 to image200. I want to merge all images to a gif file with index frame is same as an index in the image, i.e image0101 is the first frame, image0102 is the second frame and so on. I used the command in the ubuntu 16.04 but I got the error

ffmpeg -framerate 1  -i image%4d.png output.gif

Could find no file with path 'image%04d.png' and index in the range 0-4 image%04d.png: No such file or directory

Anything wrong in my command, I guess the name of the image should be from image0001 but I cannot rename it. I guess the ffmpeg has some option to do it

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2020-05-07 05:40

The image2 demuxer has a start_number option for this:

ffmpeg -framerate 1 -start_number 0101 -i image%04d.png output.gif
查看更多
登录 后发表回答