# Dashcam Dashcam video extractor and exporter. ## About This project is a set of Python scripts I created to easily manage my Viofo dashcam. You might find it useful, but beware that my primary goal was to make my life easier, and I didn't focus a lot on making these tools reusable. But it will definitely serve as a good strating point. Most probably it'll work out of the box. ## Requirements I built this on top of Debian system, so I advise you use that. Eventually I want to have this running on Rapsberry PI, but in the meantime, this is what it needs: * `python3-logzero` * `python3-pyudev` * `ncftp` * `ffmpeg` ## Scripts available ### `sync.py` The end game is having Rapsberry PI box in garage, and after a drive, I'd take out MicroSD card from the dashcam, plug it in into Rapsberry PI box and it would automatically sync videos to NAS. This script is a start of that journey. This is how you should run it: ``` ./sync.py --ftp-password 123 ``` Use `./sync.py --help` to see what you can feed it with. After you run it, it will wait for USB drive to be inserted that has a partition (as it is the case with my dashcam). Once it detects it, it will join all video files of a certain day and upload that to nas using FTP protocol. Example output: ``` [I 210425 01:52:42 sync:39] Starting to monitor for usb [D 210425 01:52:50 sync:42] Got USB event: add [D 210425 01:52:50 sync:42] Got USB event: add [I 210425 01:52:50 sync:90] Detected /dev/sdb1 (partition) [I 210425 01:52:50 sync:92] Mounting /dev/sdb1 on /tmp/tmpymyl327h [I 210425 01:52:50 sync:98] Joining video group 20210424 [I 210425 02:14:44 sync:82] Removing source files [I 210425 02:14:45 sync:104] Umounting /dev/sdb1 from /tmp/tmpymyl327h [I 210425 02:14:45 sync:109] Uploading /var/dashcam/20210424.mp4 to 192.168.88.242 [I 210425 02:46:50 sync:112] Done [D 210425 09:37:00 sync:42] Got USB event: remove [D 210425 09:37:00 sync:42] Got USB event: remove ``` ## Licensing This project is licensed under [Apache License 2.0](LICENSE.txt).