0

I'm trying to combine image files from multiple directories into one combined time lapse using ffmpeg, but when running this code, only the first directory is used in the time lapse. How do I combine multiple glob inputs using ffmpeg?

ffmpeg -pattern_type glob -i "Time\ Lapse\ 11/*.JPG" \
-pattern_type glob -i "Burst\ Sequence\ 5/*.JPG" \
-pattern_type glob -i "Burst\ Sequence\ 6/*.JPG" \
-r 30 -c:v libx264 -crf 23 -preset fast -pix_fmt yuv420p tl11_combined.mp4

I've tried using glob sequence which didn't do anything, so was wondering how to do this. Thanks!

  • pipe the three sequences in series to ffmpeg instead of reading it as three inputs. See stackoverflow.com/a/40872592 – Gyan Oct 14 at 19:58
  • Is there any way to do this with glob though instead of individual file names? Each directory could have tons of files, so I'd rather do it with pattern matching than sequentially list all files. – jtanman Oct 14 at 20:04
  • Yes, you can use globbing, see my linked answer. – Gyan Oct 15 at 4:54
  • So if I'm understanding you, you want me to run 1. cat Time\ Lapse\ 11/*.JPG | ffmpeg -f image2pipe -framerate 24 -i - out.mp4 2. cat Burst\ Sequence\ 5/*.JPG | ffmpeg -f image2pipe -framerate 24 -i - out.mp4 3. cat Burst\ Sequence\ 6/*.JPG | ffmpeg -f image2pipe -framerate 24 -i - out.mp4 as 3 separate commands? – jtanman Oct 15 at 5:25
  • cat "Time Lapse 11/*.JPG" "Burst Sequence 5/*.JPG" "Burst Sequence 6/*.JPG" | ffmpeg -f image2pipe -framerate 24 -i - out.mp4 – Gyan Oct 15 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.