-1

I'm learning how to do image video conversion using ffmpeg. I know how to convert from 1 video to several frames, but which commands to use to convert several videos into frames?

anon_99
  • 1
  • 3

1 Answers1

0

Let assume your images are placed in tmp directory and the file names are "1.jpg, 2.jpg, ...."

Then you can use this command

ffmpeg -r [fps] -i tmp/%d.jpg -vcodec mpeg4 -y [video_name]
devcrazy
  • 505
  • 5
  • 14
  • No, I have many .mp4 files in the directory and want to extract them into images, not create video from frames. Like this one from documentation `ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg` but instead, loop for several videos. – anon_99 Jun 16 '22 at 10:51
  • Why don't use python? `import os` `os.system("ffmpeg -i {0} -r 1 -s WxH -f image2 foo-%03d.jpeg".format(file_name)` You can loop files in the directory easily – devcrazy Jun 16 '22 at 12:44
  • I just want to know how to do it in CLI, but I think I will use python. Thanks for your suggestion :) – anon_99 Jun 16 '22 at 14:12