ffmpeg part two - Electric Boogaloo
I just attended the Watkins Glen opening day for the second year. It was, again, a blast.
I made some slight adjustments to my ffmpeg assembly procedure from last year.
Dashcam saves video in 5-minute chunks
Instead of creating .list files, I simply used a pipe as input:
for fo in AMBA091*; do echo file "$fo"; done \
| ffmpeg -f concat -i - -c copy Front-Track1.mov
Front and Rear videos need to be combined
Much like last year, I made short samples to confirm if any offsets needed to be done. However, I decided to move the video to the bottom-right corner to cover the timestamps, since they were incorrect on some videos (well, correct. Just not for this time zone)
Math is basically the same as before for scaling, but instead of a left offset of 70, we want a right offset of 70, but using left-hand coords. Which works out to:
1920 - 480 - 70 = 1370
After the usual synchronization samples were made, it was time to perform the final assembly.
I used a slightly different file layout this time, keeping the front and rear videos separated. I used a loop to assemble them into a combined video:
$ time for FILE in Track{1,2,3}; do ffmpeg -i Front/DCIM/*${FILE}*mov -vf "movie=Rear/DCIM/Rear-${FILE}-cat.mov, scale=480:-1 [inner]; [in][inner] overlay=1370:740 [out]" -strict -2 ${FILE}.mov; done
You’re going to want a good CPU. This is the execution time for just under 48 minutes of video on an Intel i5-2520M:
real 172m2.494s
user 619m51.494s
sys 1m37.383s
Final result
You can see the resulting videos on youtube: Part 1, Part 2, and Part 3. Part 3 has some bad sound. I’m not sure why.