/offset

cross platform utility applications

Primary LanguageC++MIT LicenseMIT

Download

The following 3 tools are currently implemented

Block level backup

- Requires elevation. Please run as admin.
- Creates volume level images using either VSS snapshots or from live volume.
- Creates volume level images of already existing persistent VSS snapshots on the system.
- Ability to exclude files (only for VSS backups) by deleting them from the source snapshot.
- Support for MBR and GPT partitions. Volumes > 2TB are by default saved as VHDX with GPT partitioning.
- Supported virtual disk formats :
- Dynamic vhd (d-vhd)
- Fixed vhd (f-vhd)
- Dynamic vhdx (d-vhdx)
- Raw volume image (raw)
- Volume images can either be generated locally or streamed to an FTP server.
- URI format for streaming to FTP:
- ftps://username:password@hostname:port/a/b/c

FTP(S) client

- Supports plain and secure FTPS (using openssl async bio).
- Ability to browse while transfers are in progress.
- Directory listing support for Linux, Windows and MLSD.
- FTPS supports TLS1.3

Camera

- Face detection, Motion detection, Face recognition.
- Uses default opencv built-in models and DNN based detectors.
- Detection configurability on a per camera basis.
- Ability to save detection results on a per camera basis.
- The release has default(non-CUDA) opencv build for CPUs.
- For NVIDIA GPU it is recommended to do a custom opencv CUDA/CUDNN variant build via vcpkg.
- The code either ways supports both CUDA/CPU backend and target for DNN inference; in order.
- Set CVL_MODELS_ROOT env variable to the local MODELS folder from repo for detections to work.
- Currently the model trains itself off a set of around 10 trump and 10 obama images.
- The system can be tested by defining a "Window capture" source in OBS studio against youtube running inside the browser.
- Then expose the webbrowser feed over RTSP(using OBS RSTP server plugin). This can then be captured via a cam configuration in offset using the obs rtsp url for running detections.

vcpkg dependencies

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat

vcpkg.exe install openssl:x64-windows crc32c:x64-windows rapidjson:x64-windows zlib:x64-windows opencv4[contrib,core,default-features,dnn,ffmpeg]:x64-windows --recurse

sudo apt-get install build-essential zip curl vim bison meson pkg-config

./vcpkg install tinyxml2 libzip openssl:x64-linux crc32c:x64-linux rapidjson:x64-linux zlib:x64-linux opencv4[contrib,core,default-features,dnn,ffmpeg]:x64-linux --recurse

vcpkg.exe integrate install

use the resulting toolchain file in cmake configure step as highlited under the build section

qt-6.5.3 source build

make sure ninja and python3.9 are under PATH

C:\>set PATH=D:\Python39;%PATH%

C:\>where python
D:\Python39\python.exe
C:\Users\nmam\AppData\Local\Microsoft\WindowsApps\python.exe

C:\>where ninja
C:\Windows\System32\ninja.exe
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe

\qt-everywhere-src-6.5.3\configure.bat -prefix D:\qt-6.5.3\install -skip qtconnectivity -nomake examples -nomake tests -skip speech -skip scxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtdoc -skip qtandroidextras -release

Qt is now configured for building. Just run 'cmake --build . --parallel'
Once everything is built, you must run 'cmake --install .'
Qt will be installed into 'D:/qt-6.5.3/install'

Build

git clone https://github.com/n-mam/offset.git
cd offset && mkdir build && cd build
SET Qt6_DIR=C:\Qt-6.5.3\install\lib\cmake\Qt6
cmake -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake ..
cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake ..
cmake --build . --config Release

Run as admin (needed for FXC):
SET PATH=%PATH%;C:\Qt-6.5.3\install\bin
qml\Release\offset.exe

Deploy:

windeployqt --qmldir D:\offset\app\qml D:\offset\build\app\Release\offset.exe

vc redist is bundled with package zip; in case your system does not have that installed already

Contact:

Telegram: https://t.me/neelabhm