How To Make Your Own Video?

How to make a time-lapse movie from lots of very boring video?

  • I'd like to make a time-lapse video from a bunch of very boring normal-speed video files produced by a cheap dash cam. What's the easiest way to do this? The camera is a G1WC, a cheap Chinese-made dashcam which writes to MicroSD cards. I have a 32GB card, which holds about 5.5 hours of 1080p video. The video is saved as 3-minute MOV files (H.264) with sequential file names, each clip overlapping the preceding one slightly. I'd like to make a time-lapse movie at a rate of, say, one timelapse frame every 1 realtime second (30x speedup). An occasional duplicated frame due to the overlap in the video file segments is OK. Don't care about audio. This seems like it ought to be fairly straightforward to do with some commandline tools or scripts, and I've seen video projects that look like they've been created this way, but I haven't found any instructions and it seems like somebody must have done this before. MacOS, Linux, and Windows solutions are all acceptable. Using thousands of dollars of commercial software is probably not, though I do have an old copy of Final Cut around somewhere (which, knowing Apple, probably won't work anymore though). Scripted or programmatic solutions using free tools are ideal. (For the record I am not looking to do a time-lapse via another method, e.g. a DSLR with an intervalometer. I know I could do a time-lapse that way, but it wouldn't really do what I want it to do, which is use the HD dashcam I already have and the data it's already capturing to produce the occasional road-trip video.)

  • Answer:

    You should be able to do this with ffmpeg on the command line. ffmpeg -i input.mov -filter:v "setpts=(1/30)*PTS" output.mov Note: haven't tested it, found by googling "ffmpeg time lapse from movie".

Kadin2048 at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

ffmpeg also has a 'https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files' function that should work for joining the files.

destructive cactus

Just an update ... thanks everyone for the suggestions. At the moment I am playing around trying to get a scripted solution using ffmpeg working. This is annoyingly complicated by the fact that most Linux distributions seem to ship with ancient versions of it by default. But concatenating the short files, then filtering the output using the setpts option, seems to be the way to go. The only thing that I find a little inelegant about it is that you temporarily need twice as much disk space as the original files consume, or at least I have so far found no way to avoid this. iMovie was a good thought that I really hadn't considered, and it's my #2 solution. However for the record, iMovie is no longer free—Apple now nicks you $15 for it.

Kadin2048

iMovie comes bundled with the Mac OS and will do this. There are PC applications that do the same thing.  

Herodios

Windows Movie Maker is basically the same deal as iMovie, but much more limited in scope. https://www.youtube.com/watch?v=VeWj7JBBKdQ of doing exactly what you asked.

xingcat

I find the http://shop.gopro.com/softwareandapp/gopro-studio/GoPro-Studio.html#/start=1 app easier to use than iMovie for a lot of purposes, and it has this http://gopro.com/support/articles/how-to-add-slow-motion-or-fast-motion-time-lapse-in-gopro-studio baked in. The GoPro app is free. However, your cheap dashcam .MOV files may or may not be recognized by the app depending on how they're encoded. You may need to convert them first.

Invisible Green Time-Lapse Peloton

Try the search term "hyperlapse," which combines time-lapse with image stabilization.

Sunburnt

That is indeed exactly what https://www.youtube.com/watch?v=sA4Za3Hv6ng is intended to do. This is distinct from Instagram's iPhone-only app named hyperlapse which uses the accelerometer data to do the stabilization. Unfortunately neither flavor of hyperlapse will help here since the MSFT version hasn't been commercialized yet as far as I know, and the Instagram version doesn't work on prerecorded material. FFMPEG command line tool is probably the way to go here, as you may be able to batch the job to run on each file, you'll probably have to manually stitch the outputs together in final cut or another editor though.

TwoWordReview

So just for posterity, here's the solution that seems to work the best, using the output from my particular camera (a G1W-C, sort of a generic $50 Chinese 1080p dashcam that outputs x264 encoded ".mov" files). This is a combination of suggestions given above. ffmpeg seems to have issues with taking large numbers of files as input directly on the commandline, so the trick is to create a text file listing the files you want to merge, and then use that as input. So to make a 20x timelapse from a whole directory of .mov files:for f in *.mov; do echo "file $f" >> files.txt; done[a file called "files.txt" is created]ffmpeg -f concat -i files.txt -an -vcodec libx264 -filter:v 'setpts=0.05*PTS' dashcam.mov[This assumes there are no spaces in the input filenames. If there are, you need more quoting in the for loop. You could also probably shoehorn this into a one-liner if you really wanted to via a subshell, but I don't mind the intermediate file.] This dumps the audio (the -an option), because I couldn't find a good solution to speed up the audio without making it sound like garbage, and it's not that important anyway for what I want (road trip time lapses). In a very pleasant surprise, due to the way this camera writes the files (valid timecode?), ffmpeg is actually smart enough to eliminate the duplicate frames that you'd normally get if you just ran the beginning of one recording into the end of another. At least, I think it is, because I don't notice any jerkiness in the output like I was expecting to see. This is all very camera-dependent, though. The same commands, run against the MKV files produced by a Foscam IP camera, produce very nasty output and a slew of errors, all related to the broken way that the camera writes Matroska output (no valid timestamps). So depending on the type of dashcam you have, you may need to fudge around with some separate commands to preprocess the video. YMMV.

Kadin2048

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.