To archive all files from your Blackvue cloud-enabled dashcam to your Synology NAS without removing your SD card, simply do the following:
1. Connect your Blackvue dashcam to your local network using its cloud feature.
2. Find the IP of your Blackvue dashcam by checking the dhcp settings from your router, or by using an app like Fing for iPhone (look for network adapter with brand Pittasoft). It might be handy to use a dhcp reservation in your router to make sure the camera always has the same IP.
3. Open a good text editor like Notepad++ (Windows) or TextWrangler (Mac) and paste the code below in a new file.
#!/bin/bash cd "$(dirname "$0")" for file in `curl http://192.168.1.53/blackvue_vod.cgi | sed 's/^n://' | sed 's/F.mp4//' | sed 's/R.mp4//' | sed 's/,s:1000000//' | sed $'s/\r//'`; do wget -c http://192.168.1.53$file\F.mp4; wget -c http://192.168.1.53$file\R.mp4; wget -nc http://192.168.1.53$file\F.thm; wget -nc http://192.168.1.53$file\R.thm; wget -nc http://192.168.1.53$file.gps; wget -nc http://192.168.1.53$file.3gf; done
*Please note that the line “for file in” goes all the way to “done”. This needs to be one line!
Update: You can also download the script above here, but you will still need to edit the IP address using a decent texteditor like the ones mentioned above. No Word, Wordpad or any rich text editor.
4. Change the IP in the script to your Blackvue Dashcam IP.
5. Save this file to a (new)share on your Synology and call it blackvue.sh
6. Go to Synology DSM, Configuration, Task scheduler
7. Choose “User defined script” and enter
sh /volume1/name_of_your_blackvue_archive_share/blackvue.sh
and set the schedule to run every day at a time your Blackvue will be connected to your local network for a while.
The procedure above will let your NAS download all files on the Blackvue dashcam, it will skip files already downloaded, and it will resume partially downloaded .mp4 files.
If you want the Synology NAS to only download the files of that day, use this version of the script in stead:
#!/bin/bash cd "$(dirname "$0")" export BVDATE=`date +%Y%m%d` echo $BVDATE for file in `curl http://192.168.1.53/blackvue_vod.cgi | sed 's/^n://' | sed 's/F.mp4//' | sed 's/R.mp4//' | sed 's/,s:1000000//' | sed $'s/\r//' | grep $BVDATE`; do wget -c http://192.168.1.53$file\F.mp4; wget -c http://192.168.1.53$file\R.mp4; wget -nc http://192.168.1.53$file\F.thm; wget -nc http://192.168.1.53$file\R.thm; wget -nc http://192.168.1.53$file.gps; wget -nc http://192.168.1.53$file.3gf; done
*Please note that the line “for file in” goes all the way to “done”. This needs to be one line! This version is also included in the download above.
This script also skips all files that are already downloaded, so you can start it multiple times the same day without redownloading all files.
Note: The upload speed of the camera is very slow. In my case, I need one minute to download a one minute file. I take no responsibility for anything. Use at your own risk.
Full credits for the original script to Gadgetblogist
Leave a Reply