v1.0.0
This initial release extracts data from multiple partitions, and names output files using the date+time of the first video frame.
Pre-compiled binaries are available for Linux ARM64 and AMD64.
N.B. if you have the x86 version of ubnt_ubvinfo you can execute it entirely on AMD64, but ordinarily it'd be recommended to run the ARM64 version on your CloudKey and then pull back the extracted media from CloudKey and run FFmpeg on your main machine to rewrap the .h264 files into .MP4
QUICK START FOR CLOUD KEY GEN2
- Go to the "releases" page at https://github.com/petergeneric/unifi-protect-remux/releases and download the latest remux-arm64 binary.
- Upload this to your Cloud Key, leaving in the home folder
- Navigate to where your .ubv video is located (/srv/unifi-protect/video)
- Run ~/remux-amd64 with a single argument, the .ubv file you want to extract from (e.g. ~/remux-amd64 2020/08/01/XXXXXXXXXXXX_0_rotating_1596300058863.ubv)
- Once the tool completes, you'll find a series of .h264 files in the same directory as the .ubv input
- Transfer these to your machine. The .h264 files are raw video bitstreams. It will be easier if you remux them into an .MP4 wrapper using FFmpeg
- Install FFmpeg for your platform (https://ffmpeg.zeranoe.com/builds/ for Windows, apt install ffmpeg for Linux, brew install ffmpeg for MacOS using HomeBrew or https://evermeet.cx/ffmpeg/ otherwise)
- Use the following command to remux each .h264 into an MP4: ffmpeg -i example.h264 -vcodec copy example.mp4
QUICK START NOTE FOR AMD64 VERSION
The AMD64 version is designed for use with an AMD64 Unifi Protect installation (or at least, the "ubnt_ubvinfo" tool, extracted from such an installation; for copyright reasons I can't supply that tool). It won't work on a stock Linux install without that additional tool. You CAN, however, run some key tasks on your Ubiquiti gear (see scripts/prepare.sh) and then run the remux itself on your AMD64 box (scripts/remux.sh). This script also runs ffmpeg to generate a .mp4