![]() ![]() ![]() I used the same parameters as you had in your mencoder command line and it works great and I was able to played the movie file in VLC. Setting this script to run once a minute for example, will keep the timelapse video up-to-date to the last minute. The output file is set by the -o switch, in this case I’ve used output.avi. When the script is run, it will take all files in /tmp/motion/ that end in -snapshot.jpg and make a movie out of them. ![]() The resolution (-mf w=320:h=240) should match the resolution setup in motion. Mencoder mf:///tmp/motion/*-snapshot.jpg -mf w=320:h=240:fps=25:type=jpg -ovc copy -oac copy -o output.avi I wrote up a small script to run the mencoder command – This part could also be done with ffmpeg, which I may cover in a later post. To create the movie, we are going to use mencoder. If you have motion detection activated, you will see other files in the directory but we can ignore those. The ones ending in -snapshot.jpg are the ones that we will be using for the timelapse movie. Once motion is started, you will start seeing files in /tmp/motion (or wherever you decided to save the files) On lines 413 and 429, change the webcam_localhost and control_localhost to off.Īfter changing those, I restarted the motion daemon for the changes to take effect. I’m also allowing remote access to the webcam so that I can check in on it. On line 295 in the default nf, there is this following lineĬhange that to the number of seconds between each snapshot. In order to get timelapse shots, I had to setup motion to take pictures at intervals. Mencoder is also found in the repositories, so a quick apt-get later and I also had mencoder installed. I also needed mencoder to encode the resulting images into a video. Getting motion was as easy as apt-get install motion on my Raspbian powered Pi. There are a myriad of ways to accomplish this, but I decided to use motion as it took the least configuration to get it to do what I wanted it to do. Since I already had a webcam connected to one of my Pis, I set about making it take timelapse shots. I recently had an email from one of my readers enquiring about making timelapse videos with the Raspberry Pi. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |