We all are familiar with the technique of shooting slow processes, which is called TimeLapse. Its essence is to take a photo at specified intervals, and then collect a video from many photos. For example, taking a photo every 6 seconds and then sticking it together in a video with a frame rate of 25fps, we will speed up the time 150 times. Clouds will float across the sky and the ships on the water at the speed of a jet plane, flowers bloom before our eyes, etc. From the article you will learn some details of how you can remove the TimeLapse view from a year-long window on a regular Android phone.
Video exampleInitial data:
- A computer with a 2TB hard disk running Windows (of course, the same can be done in Linux, replacing the scheduler with cron, and robocopy with rsync)
- Android phone with any version, memory card of any size and Root rights
- Wi-Fi access point
The shooting is organized as follows:
- We fix the phone on the window with any available tools such as a vice, connect to electricity, wi-fi, set the static ip-address in the settings (or create a dhcp reservation on the access point), for example, 192.168.0.123
- We install the Samba Filesharing program on the phone and any program capable of taking photos at specified intervals. I use the $ 2 FastMotion Tamelapse bought once for $ 2, which the author has now somehow removed from Google Play. There are also Lapse It and dozens of others. We start shooting by selecting the frequency, resolution and quality of images. In my case, the parameters are “5 seconds, 5 megapixels and 80% jpeg”
- On the computer, go to \\ 192.168.0.123 \, find the directory in which the images are recorded, in my case it is \ sdcard \ DCIM \ FastMotion \ time_start_of_shooting \, create a bat-file with the text
robocopy <\\IP_\__> < > /MOV
Example:
robocopy \\192.168.0.123\sdcard\DCIM\FastMotion\2012-06-10_23-31-57 F:\2013-06-10_23-31-57 /MOV
- Add the specified file to the Windows Scheduler to run every 5 minutes
- We are waiting for several hours / days / months
Zahotev collect video from any subset of photos:
- Rename them with mass renaming (Ctrl + M in Total Commander-e or free Unreal Commander ), calling them [C] .jpg ([C] is a 6-digit counter, starting with 0)
- Download ffmpeg
- We perform
ffmpeg -r 25 -i %06d.jpg -s 1280x720 -vcodec libx264 -vpre hq -crf 25 output.mp4
-r - frame rate; -i - file name format; -s - video resolution; -vpre - preset codec settings; -crf - quality level (from 18 to 28, less number - more quality); Of course, you can choose other settings, for example, use the webm format and the vp8 codec - We are watching the result, we are editing video editors, sharing on YouTube :-)
Shooting has been going on almost continuously since September 2012 with several interruptions for various emergency reasons. More than 3 million photos occupy 1.5TB.
')
Previously, instead of Samba Filesharing, different FTP servers were used on the phone side, and on the computer it was launched as a Filezilla console, but this method was more complicated and less reliable, because Once a few weeks, the FTP server must have crashed (different ones are “FTP Server”, “SwiFtp”, “MyMobiler”).
On sunny days, the reflection of a white window sill in the window got into the frame; installation of a homemade cardboard hood helped make the phone isolated from the window sill.
With the onset of spring, the HTC Desire HD camera turned off randomly after two hours - a few days after shooting started (including in cloudy weather, so I didn’t believe in overheating, suspecting the battery, power supplies, CPU frequency control profile ). But it was the overheating that turned out to be the cause :-) In the hood, a window of 8x8 centimeters was cut out and a computer fan with a 6V power supply was installed, the shutdowns stopped.
One day is about 13,200 photographs (i.e., in fact, shooting at full resolution taking into account technical time costs is possible only at 6.54 seconds) and takes from 4 gigabytes on short winter days and up to 12GB on a sunny June day with 80% quality .
I have yet to find good software for packet filtering millions of photos from noise and choose from many days the most visually attractive for their sunsets and storms. Photoshop with a built-in noise filter is not able to use the quad-core Core i7 more than 12.5-25%, although the filtering result is visually not bad. On the Athlon64 X2 4850e (2x2.5Ghz), filtering one day of shooting from noise took about 48 hours, on Core i7 (4x3.8Ghz) - about 9 hours.