acolomba / blackvuesync Goto Github PK
View Code? Open in Web Editor NEWHands-off synchronization of recordings from a BlackVue dashcam with a local directory over a LAN. Standalone script or docker image.
License: MIT License
Hands-off synchronization of recordings from a BlackVue dashcam with a local directory over a LAN. Standalone script or docker image.
License: MIT License
As title.
Does the blackvue api have a delete function?
If so could we add a flag to remove files from the camera's SD card that already exists on the NAS?
Currently the build is only the amd64 version of the container. And I am not sure if this is built automatically.
See https://github.com/heydon-consulting/drupal-builder/blob/d58730e5dddc8d4f6aaf78bb7f803c8180a4eb8c/.github/workflows/build.yml#L42-L55 for an example on using the workflow to build docker images and push them automatically.
I currently have a Raspberry Pi in my garage to be close to my car. I had to build the docker image locally do I could deploy it. Having a full pc is not really an option just to build download the files from the dashcam.
According to the docs MAX_USED_DISK
causes download to stop if the quota is reached. Would be nice if the oldest files would be deleted instead, mimicking how dashcam recording works. Maybe behavior could be controlled by another parameter.
if recording.type in ("N", "E", "M"):
This avoids importing .gps files for some recordings.
Not having any .gps file is problematic for the popular Dashcam Viewer. It requires .gps data on all files to work properly (bug on their part).
I suppose importing these .gps files was caising issues since you added this condition, but in that case, would it be possible to add something like this?
if recording.type in ("P", "I"):
touch recording.base_filename+".gps"
not sure if there are other events than N, E, M, P, I.
I have the Docker container set up and running in Synology. When I look at the log in Docker, it always shows tomorrow's date and I am not sure where it is getting the date from. I have checked my synology and my date and time are right but it always seems like it's a day ahead of what the log should be. Today is 12/05 but if I look at the logs, it's making entries in the 12/06 log.
Hi, Awesome project, cant wait to get it running with my new dr900x
I have added it on my synology NAS, executed the docker-compose as root but I get the following error in the container logs
My Compose file
docker run -d --restart unless-stopped \ -v /volume1/docker/blackvue-sync:/recordings \ -e ADDRESS=172.xx.xx.xx \ -e PUID=$(id -u) \ -e PGID=$(id -g) \ -e TZ="Australia/Sydney" \ -e KEEP=52w \ --name Blackvue-Sync \ acolomba/blackvuesync
Currently time
downloads oldest to newest. It would be nice to have an additional priority option for reverse chronological order, newest to oldest.
Use case is I have a Raspberry Pi in my car that backs up footage every minute in case someone breaks in and steals the camera.
Thank you very much for a great tool!
Looks like 1.8 added support for downloading the new files that Blackvue's May 2021 firmware update added, but not for cleaning them up with the --keep switch. I have the following left behind:
I
IF
IR
A
AF
AR
T
TF
TR
(EG 20210525_175137_AF.mp4)
Thanks,
Adam
The script currently does not handle impact recording types ('I') which causes an exception when sorting the files after getting the list from the dashcam:
ERROR 'NoneType' object has no attribute 'datetime'
I think there will be more types of filenames according to: https://blackvue.com/major-update-improved-blackvue-app-ui-dark-mode-live-event-upload-and-more/.
The ones not metioned on that page are MNP.
The solution seems to be simple:
filename_re = re.compile(r"""(?P<base_filename>(?P\d\d\d\d)(?P\d\d)(?P\d\d)
_(?P\d\d)(?P\d\d)(?P\d\d))
_(?P[NEPM])
(?P[FR])
.(?Pmp4)""", re.VERBOSE)
Becomes:
filename_re = re.compile(r"""(?P<base_filename>(?P\d\d\d\d)(?P\d\d)(?P\d\d)
_(?P\d\d)(?P\d\d)(?P\d\d))
_(?P[MEATBOIRXGNP])
(?P[FR])
.(?Pmp4)""", re.VERBOSE)
And manual_event_sort_key gets updarted to something like:
def manual_event_sort_key(recording):
"""sorts by recording type, then datetime, then front/rear direction"""
return "MEATBOIRXGNP".find(recording.type), recording.datetime, "FR".find(recording.direction)
Thanks,
Is it possible to tell the Docker container to not copy the .gps, .thm & .3gf extension files when copying the .mp4 files to Synology? I have a script set up to delete the extension files but they seem to be recopying back for whatever reason.
I wonder when i pull my car into the garage and shut it off... wont the camera turn off and it cant be downloaded? Is there a way to keep the camera on for some minutes after shutting the car off? How you do it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.