Convert Ubiquiti's proprietary .ubv files into standard MP4 files
Convert Ubiquiti's proprietary .ubv files into standard MP4 files
This is a free, open source tool that converts Ubiquiti's proprietary .ubv files into standard .MP4 files with H.264/HEVC video and AAC audio. The conversion is a "remux": no transcoding takes place, the exact same video and audio essence are simply copied into a different, industry standard container; because of this the process is reasonably fast and not CPU intensive even on a low spec ARM machine.
Use the following instructions to get the unifi-protect-remux tool working:
gui release. The cli releases are for using at the command-line and for automated use. Download the package that you want for your operating system and CPU architecture. If you want to run on Ubiquiti hardware you'll need to use the linux aarch64-legacy.tar.gz cli tools file. The Windows GUI installer includes the command-line tools.tar -xaf cli-*.tar.gz./remux *.ubv. If using the GUI, drag the .ubc files inI've been in the video software field for over 20 years, and have assisted with footage recovery and analysis (including production of custom review and reporting interfaces) for a case that became a high-profile UK Public Inquiry, and involved hundreds of thousands of hours of highly sensitive footage, so I understand the complex environment my users often work within.
While a technical user with UNIX experience should be able to use my tools to extract footage even from corrupted files with relative ease by themselves, if you don't have a suitable person available or simply want somebody with experience for complex cases you can hire me to assist privately with footage extraction, analysis, or report writing.
If you think you need paid assistance, please reach out first by creating a GitHub issue to arrange a private discussion (N.B. do not include any confidential information in the Issue text).
This tool is designed to work on _0_rotating_ .ubv files. You can get a list of these files with the following on your Unifi Protect system:
find /srv/unifi-protect/video -type f -name "*_0_rotating_*.ubv"or
find /volume1/.srv/unifi-protect/video -type f -name "*_0_rotating_*.ubv"If your Ubiquiti NVR has been damaged, you should be able to mount it on any Linux system (or other OS supporting ext4) using a USB to SATA (or USB to NVMe) adapter. I highly recommend mounting as read-only.
If your footage is sensitive or likely to involve a court case, I highly recommend involving a qualified data forensics company to extract the files for you since they understand how to handle devices in a safe way while preserving and documenting chain of custody, and be able to attest to the integrity of any files they recover. Retain the ubv files they retrieve from the disks: these are the originals, my remux tool can always derive standard MP4s from them, but you cannot produce the original from an MP4.
Run ./remux --help for advanced use. This will produce output like so:
…As part of my reverse engineering work, I am documenting the UBV format.
See COMPILING.md for more detail
I provide a Windows build of this tool; I have not been able to test this in a Windows environment, but it should work. Please reach out with feedback if you do use it on Windows.
No open issues yet, or sync has not completed.