[FFmpeg-user] Multiple Glob Inputs

James Tan jtanman at gmail.com
Tue Oct 15 21:18:43 EEST 2019


>
> A concat filter exists, but I suspect the concat demuxer (that works
> differently and does not use glob) is what you need.
> https://ffmpeg.org/ffmpeg-filters.html#concat
> https://ffmpeg.org/ffmpeg-formats.html#concat-1


Ah so basically you're saying you don't think there is a way to concatenate
with glob, and I should just do it with numbering? I was able to run a
shell script to make a list of all images used, something like this.

#! /bin/bash

# with a bash for loop
for f in ./Time\ Lapse\ 11/*.JPG; do echo "file '$f'" >> mylist.txt; done
for f in ./Burst\ Sequence\ 5/*.JPG; do echo "file '$f'" >> mylist.txt; done
for f in ./Burst\ Sequence\ 6/*.JPG; do echo "file '$f'" >> mylist.txt; done

But I was wondering if there was also a way to add start number to a file
list. I was hoping something like this might be possible?

ffmpeg -f concat -safe 0 -i mylist.txt \
-c:v libx264  -pix_fmt yuv420p -r 24 -crf 23 -preset fast -y output.mp4

where mylist.txt looks like

-start_number 0152396 file './Time Lapse 11/G%07d.JPG'
-start_number 0162603 file './Burst Sequence 5/G%07d.JPG'
-start_number 0172625 file './Burst Sequence 6/G%07d.JPG'

This obviously hasn't worked yet, and just writing all the filenames to
mylist.txt does work, but I was just wondering for curiosity's sake. Thank
you!


More information about the ffmpeg-user mailing list