nish
nish

Reputation: 1044

ffmpeg convert image sequence to video

image sequences start with

sdhdfd_plate_bg01_v001_fds_fdse_fdfd.1001
sdhdfd_plate_bg01_v001_fds_fdse_fdfd.1002
sdhdfd_plate_bg01_v001_fds_fdse_fdfd.1003

using

ffmpeg -i D:/imagesequence/sdhdfd_plate/sdhdfd_plate_bg01_v001_fds_fdse_fdfd.%04d.jpg -vf "[in]drawtext=fontsize=32:fontcolor=White:fontfile='/Windows/Fonts/arial.ttf':text='shotName':x=(w)/2:y=(h)-50[out]" D:/Uss/Temp/sdhdfd_plate_bg01_v001_fds_fdse_fdfd.%04d.jpg

following error occurs

D:/imagesequence/sdhdfd_plate/sdhdfd_plate_bg01_v001_fds_fdse_fdfd.%04d.jpg: N
o such file or directory

is it possible to convert these type images using ffmpeg

Upvotes: 0

Views: 1512

Answers (2)

Siwei
Siwei

Reputation: 21567

  1. seems pattern does not work under windows.
  2. your pattern is incorrect,

for files:

sdhdfd_plate_bg01_v001_fds_fdse_fdfd.1001.jpg
sdhdfd_plate_bg01_v001_fds_fdse_fdfd.1002.jpg
sdhdfd_plate_bg01_v001_fds_fdse_fdfd.1003.jpg

the input pattern should be:

sdhdfd_plate_bg01_v001_fds_fdse_fdfd.1%03d.jpg

here the 1%03d mapping to: 1001, 1002, 1003...

Upvotes: 0

Ben
Ben

Reputation: 970

There seems to be a couple reasons why this isn't working. First, as pointed out by pixelistik, if your images don't actually have .jpg extensions, it won't work (eg, if they're actually png or something).

Secondly, your image sequence has to start at 0 or 1, so starting at 1001 won't work. You can use this batch code or something like it in a UNIX shell to rename your images into a workable sequence.

x=1; for i in *jpg; do counter=$(printf %04d $x); ln "$i" sdhdfd_plate_bg01_v001_fds_fdse_fdfd."$counter".jpg; x=$(($x+1)); done

Note that you must be in the directory holding the images, and if there are other images that you don't want included, you'll have to change for i in *jpg to something like for i in sdhdfd_plate_bg01_v001_fds_fdse_fdfd.*.

Upvotes: 3

Related Questions