timelapse_ipwebcam/README.md

74 lines
2.8 KiB
Markdown
Raw Normal View History

2019-10-02 19:53:11 +00:00
#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
2019-10-02 19:59:04 +00:00
```
2019-10-02 19:53:11 +00:00
$ python capture.py <directory> <delay> <resolution>
2019-10-02 19:59:04 +00:00
```
2019-10-02 19:53:11 +00:00
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
2019-10-02 19:58:46 +00:00
```
2019-10-02 19:53:11 +00:00
$ bash makevideo.sh -d <directory> -s <rate> -p <prefix> -v <video_dir> -s <size>
——————————————————————————————————————————————————————————————————————————————————
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'
——————————————————————————————————————————————————————————————————————————————————
2019-10-02 19:58:46 +00:00
```
2019-10-02 19:53:11 +00:00
Will save an mp4