ffmpeg and non-sequential events
Posted: Fri Mar 26, 2010 4:19 pm
If I create a video file, ffmpeg stops if there is a gap in the event numbers. I get lots of cases where the capture jpgs aren't exactly sequential - there are skipped numbers.
I have a shell snippet that sequentially renumbers the capture files:
I would like to run this prior to the data base being updated when the events are noticed.
Or should I look at changing ffmpeg to ignore spaces?
What would be the best course of action?
I have a shell snippet that sequentially renumbers the capture files:
Code: Select all
shouldbenum=1
find . -name "*.jpg" | sed -e 's=./\([0-9]*\).*=\1=' | sort -n | \
while read jpgnum ; do
shouldbenumzeros=`printf %03d $shouldbenum`
if [[ "$shouldbenumzeros" != "$jpgnum" ]]
then
mv ${jpgnum}-capture.jpg ${shouldbenumzeros}-capture.jpg
fi
let shouldbenum++
done
Or should I look at changing ffmpeg to ignore spaces?
What would be the best course of action?