CCCPaste

Android Device as Security Camera

# Android as Security Camera
# https://github.com/Ruddle/RemoteCam
# It has a simple interface, so just install, run, and select your option
wget "https://github.com/Ruddle/RemoteCam/releases/download/0.04/RemoteCam_0.04.apk" -O RemoteCam.apk
adb install -g RemoteCam


# to monitor - remember, only one device at a time
vlc "http://192.168.1.162:8080/cam.mjpeg"
xdg-open "http://192.168.1.162:8080/cam.mjpeg"

# If you want to remotely record/monitor with motion detection, use Motion
sudo apt install motion

# get an example config file 
# https://gist.github.com/iandow/1abc620626af601bf73f529e49b3a7b4
# things you might want to set

camera_name AndroidCam

# Numeric identifier for the camera.
camera_id 101

# The full URL of the network camera stream.
netcam_url http://192.168.1.162:8080/cam.mjpeg

# File name(without extension) for movies relative to target directory
movie_filename AndroidCAM01_%t-%v-%Y%m%d%H%M%S

target_dir /home/metalx1000/Nextcloud/motion

# Port number used for the webcontrol.
webcontrol_port 8092

# The port number for the live stream.
stream_port 8091

movie_codec mp4

# Once config is set you can start motion and point it at the config file
motion -c android_cam.conf

# This will start motion with motion detection (only record when there is movement)