

To do this on raspberry you need to connect monitor/keyboard to it or setup some remote desktop UI. But it requires oauth authorization which is more convenient to accomplish on PC. You should have credentials.json file after this.īasically the environment setup is required on raspberry only. Enable Google Photos API for the account you are going to use for uploading. Leave the last one with semicolon for now (commented) to uncomment after ensuring that video recording and uploading works.ġ.4 Then $ sudo nano $ start_motion_daemon=yesĢ.1 Recommended to create a new account for this purpose to share an album with your main one to get notifications when new files added, plus more storage space. on_movie_end sudo python3 /var/lib/motion/photos.py %f.mp4 &
#Raspberry pi google photos screensaver movie#
# Command to be executed when a movie file # Bool to enable or disable extpipe (default: off)Įxtpipe ffmpeg -y -f rawvideo -pix_fmt yuv420p -video_size %wx%h -framerate %fps -i pipe:0 -vcodec libx264 -preset ultrafast -f mp4 %f.mp4 # When creating videos, should frames be duplicated in order # or the range 1 - 100 where 1 means worst quality and 100 is best. # Use ffmpeg to encode movies in realtime # The quality (in percent) to be used by the jpeg compression # Output 'normal' pictures when motion is detected (default: on)

# Number of frames to capture after motion is no longer detected # Specifies the number of pre-captured (buffered) pictures from before motion # Maximum number of frames to be captured per second. Valid range: Camera dependent, default: 288 Valid range: Camera dependent, default: 352 # Use a file to save logs messages, if not defined stderr and syslog is used. # Start in daemon (background) mode and release terminal (default: off) Particularly in this example was used motion v4.0.ġ.1 Update $ sudo apt-get $ sudo apt-get upgradeġ.2 Download $ sudo apt-get install motionġ.3 Now edit this file with the following $ sudo nano /etc/motion/nf
