Skip to content

kontex-neuro/libxvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thor Vision Video Capture Library

Build instructions

  1. Get the source code and go to the project directory
git clone https://github.com/kontex-neuro/libxvc.git
cd libxvc
  1. Create python virtual environment .venv in the project directory and activate it

    Windows

    py -m venv .venv
    .venv\Scripts\activate

    Linux/macOS

    python -m venv .venv
    source .venv/bin/activate
  2. Install build tools in .venv via pip

pip install cmake conan ninja
  1. Install dependencies via Conan
conan install . -b missing -pr:a <profile> -s build_type=Release
  1. Generate the build files with CMake
cmake -S . -B build/Release --preset conan-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release
  1. Build the project
cmake --build build/Release --preset conan-release
  1. Export as conan package to local cache
conan export-pkg . -pr:a <profile> -s build_type=Release

Run updater tests

  1. Install dependencies with option build_testing enabled
conan install . -b missing -pr:a <profile> -s build_type=Release -o build_testing=True
  1. Generate the build files with CMake
cmake -S . -B build/Release --preset conan-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
  1. Build the project
cmake --build build/Release --preset conan-release
  1. Run tests
cd ./build/Release/test
ctest --output-on-failure

Examples

Check CLI optinos

./build/Release/tool/tvcli --help

Example output:

Thor Vision CLI 


tvcli [OPTIONS] [SUBCOMMAND]


OPTIONS:
  -h,     --help              Print this help message and exit 

SUBCOMMANDS:
  stream                      Stream camera 
  list                        List cameras 
  logs                        Show server logs

List available cameras

./build/Release/tool/tvcli list

Example output:

Discovered Cameras:

Camera ID    : 0
Name         : DF100
Capabilities :
  - image/jpeg,width=1280,height=720,framerate=30/1
  - image/jpeg,width=1280,height=720,framerate=25/1
  - image/jpeg,width=1280,height=720,framerate=20/1
  - image/jpeg,width=1280,height=720,framerate=15/1
  - image/jpeg,width=1280,height=720,framerate=10/1
  - image/jpeg,width=1280,height=720,framerate=5/1
  - image/jpeg,width=800,height=600,framerate=30/1
  - image/jpeg,width=800,height=600,framerate=25/1
  - image/jpeg,width=800,height=600,framerate=20/1
  - image/jpeg,width=800,height=600,framerate=15/1
  - image/jpeg,width=800,height=600,framerate=10/1
  - image/jpeg,width=800,height=600,framerate=5/1
  - image/jpeg,width=640,height=480,framerate=30/1
  - image/jpeg,width=640,height=480,framerate=25/1
  - image/jpeg,width=640,height=480,framerate=20/1
  - image/jpeg,width=640,height=480,framerate=15/1
  - image/jpeg,width=640,height=480,framerate=10/1
  - image/jpeg,width=640,height=480,framerate=5/1
  - video/x-raw,format=YUY2,width=1280,height=720,framerate=10/1
  - video/x-raw,format=YUY2,width=1280,height=720,framerate=5/1
  - video/x-raw,format=YUY2,width=800,height=600,framerate=15/1
  - video/x-raw,format=YUY2,width=800,height=600,framerate=10/1
  - video/x-raw,format=YUY2,width=800,height=600,framerate=5/1
  - video/x-raw,format=YUY2,width=640,height=480,framerate=30/1
  - video/x-raw,format=YUY2,width=640,height=480,framerate=25/1
  - video/x-raw,format=YUY2,width=640,height=480,framerate=20/1
  - video/x-raw,format=YUY2,width=640,height=480,framerate=15/1
  - video/x-raw,format=YUY2,width=640,height=480,framerate=10/1
  - video/x-raw,format=YUY2,width=640,height=480,framerate=5/1

Stream camera

Stream from a camera with device ID 0, using the capability "image/jpeg,width=1280,height=720,framerate=30/1", with codec set to jpeg. Enable recording with --record, split the recording with -s, and limit the split files with --max-size-time (1 minute) and --max-files (4).

./build/Release/tool/tvcli stream --id 0 --cap "image/jpeg,width=1280,height=720,framerate=30/1" --codec "jpeg" --record -s --max-size-time 1 --max-files 4

Example output:

[2025-04-28 13:19:51.524] [info] Received buffer: size=2764800, pts=238181123, width=1280, height=720, fpga_timestamp=163344901787, rhythm_timestamp=0, ttl_in=0, ttl_out=0, spi_perf_counter=136144539, reserved=0

Third-party

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •