bash - Convert image sequence to video using ffmpeg and list of files -
i have camera taking time-lapse shots every 2–3 seconds, , keep rolling record of few days' worth. because that's lot of files, keep them in subdirectories day , hour:
images/ 2015-05-02/ 00/ 2015-05-02-0000-02 2015-05-02-0000-05 2015-05-02-0000-07 01/ (etc.) 2015-05-03/
i'm writing script automatically upload timelapse of sunrise youtube each day. can sunrise time web in advance, go after sunrise , list of files taken in period using find
:
touch -d "$sunrise_start" sunrise-start.txt touch -d "$sunrise_end" sunrise-end.txt find images/"$today" -type f -anewer sunrise-start.txt ! -anewer sunrise-end.txt
now want convert files video ffmpeg
. ideally i'd without making copy of files (because we're talking ~3.5 gb per hour of images), , i'd prefer not rename them image000n.jpg
because other users may want access images. copying images fallback.
but i'm getting stuck sending results of find
ffmpeg
. understand ffmpeg can expand wildcards internally, i'm not sure going work files aren't in 1 directory. see few people using find
's --exec
option ffmpeg
batch conversions, i'm not sure if going work image sequence input (as opposed to, say, converting 1000 images 1000 single-frame videos).
any ideas on how can connect two—or, failing that, better way files in date range across several subdirectories ffmpeg
image sequence?
use concat
demuxer list of files. list format is:
file '/path/to/file1' file '/path/to/file2' file '/path/to/file3'
basic ffmpeg usage:
`ffmpeg -f concat -i mylist.txt ... <output>`
concatenate [ffmpeg wiki]
Comments
Post a Comment