#Time lapse using phone **Goal** : upcycle an old phone into an IP Webcam and then make time lapse. **Hardware :** - and old phone - a strong stand for your phone, use clamps and metal sticks - a WIFI network - a PC always on (server, raspberry, old laptop) - free space on the PC hard drive **Requirement :** - a linux like system - python - ffmpeg ##Installation of IP Webcam - get an old phone - setup Wifi on the phone **Install an IP Webcam software on it** - using Google play : (not tested) add your credential and install IPWebcam from google play - without : get the APK from : \url{https://apkpure.com/ip-webcam/com.pas.webcam/versions} On my android 6 I had to use IP Webcam\_v1.13.25 \url{https://apkpure.com/ip-webcam/com.pas.webcam/download/608-APK?from=versions%2Fversion} ##Using IP Webcam **On Mobile** - Setup the camera settings - Setup the network settings, notice the capture image URL : \url{http://192.168.?.?:8080/photo.jpg} - Position the phone and start the server **On the PC** - From your PC open the capture image URL \url{http://192.168.?.?:8080/photo.jpg} - You should see if it works ##Picture automation ###Using the python script ``` $ python capture.py ``` current script take 1 picture and save it as last.jpg it also make a copy of this image, convert it to smaller resolution and save it with an timestamp name you can change line resolution = "1280x960" ##Produce the timelapse ``` $ bash makevideo.sh -d -s -p -v -s —————————————————————————————————————————————————————————————————————————————————— Opt | Variable | Type | Definition | Default value —————————————————————————————————————————————————————————————————————————————————— -d directory path Directory path of images to convert ./pics -r rate int Convert only 1/N images 1 -p prefix str Images filename prefix. '' -v video_dir path Directory path to store video file. ./videos -s size str Images geometry. '1024x768' —————————————————————————————————————————————————————————————————————————————————— ``` Will save an mp4