0

So I have a directory, where script ran by cron puts photos from my webcam. And I want to make a sort of timelapse. So i want to join this images to a video, one image = new frame (no delay).

So i have a jpg images filenamed

YYYY-MM-DD_HH_MM-webcamshot.jpg

And i want to join them into a mp4 video.

I found out that i can do it with FFMpeg for ex. with this command

ffmpeg -pattern_type glob -i '*.jpg' -c:v libx264 output.mp4 (from here)

FFMpeg output log

But unfortunately this only joins the first 600 (or a bit more) of 2.5K images in the directory.

So i want to know:

  1. Can FFMpeg join more images (maybe unlimited amount)?

  2. Is it problem of using -pattern type glob instead of wildcard?

  3. If it can't, how to split images into directories and make videos from these directories and then join or rename images to format like img01729.jog so wildcard img%04.jpg can be used?

FFMpeg on Linux Mint (ubuntu 16.04).

Community
  • 1
  • 1
  • The cause could be multiple things but it will not be easy to figure out without seeing the complete console output from your command. – llogan Dec 15 '16 at 17:24
  • http://pastebin.com/raw/xVyBh2ZC –  Dec 15 '16 at 18:06
  • 2.8.8 is old. I suggest [downloading a recent build](https://johnvansickle.com/ffmpeg/). What's different of images 610 and 611? What's the name of each? Also show `ffmpeg -i <610> -i <611>` – llogan Dec 15 '16 at 18:43
  • Ah, my fault! 611 file was empty. –  Dec 15 '16 at 19:32
  • Now, can i make ffmpeg ignore files of incorrect format or just those empties? I mean when it has error encoding, just skip that file and do not stop. –  Dec 15 '16 at 19:33
  • If there is I'm not aware of it. You didn't mention what scripting language you're using, but you could use an if/then statement in your script before running `ffmpeg`: if file size is 0 then move or delete it. – llogan Dec 15 '16 at 19:46
  • The image2 demuxer does ignore corrupt files. The quirk is that if the file is empty (0 bytes) or missing, ffmpeg will terminate at the frame before. If it's even 1 byte, it will warn and press on. – Gyan Dec 16 '16 at 14:38

0 Answers0