Installation Instructions¶
Prerequisites¶
VideoRecStation runs on Ubuntu 24.04 LTS (Jammy Jellyfish) on amd64 architecture. It might work on other versions of Ubuntu or other Linux distributions, but this has not been tested. After installing Ubuntu, install additional packages needed to for the rest of the installation process:
sudo apt -y install qt6-base-dev designer-qt6 libasound2-dev g++ make git pulseaudio-utils
sudo snap install cmake --classic
Install 3-rd party components¶
Before you can use VideoRecStation, you need to install VimbaX, GPUJPEG, OpenCV, and ALSA Scarlett Control Panel (alsa-scarlett-gui). The latter is, strictly speaking, optional, but it provides a convenient GUI for controlling the audio settings of your Scarlett interface.
Install VimbaX¶
VimbaX is a software package for controlling USB cameras made by Allied Vision Technologies. You can download it from the Allied Vision website. Assume you have downloaded it to ~/Downloads/VimbaX_Setup-2025-3-Linux64.tar.gz, and want to install it to /opt/VimbaX_2025-3. You can do this by running the following commands:
sudo mkdir /opt/VimbaX_2025-3
sudo tar -xvzf ~/Downloads/VimbaX_Setup-2025-3-Linux64.tar.gz -C /opt/VimbaX_2025-3 --strip-components=1
Remove the camera simulators that come with VimbaX, so that they don’t clutter the list of available cameras:
sudo rm -f /opt/VimbaX_2025-3/cti/VimbaCameraSimulatorTL*
Now you need to install VimbaX transport layers. Run the following commands:
cd /opt/VimbaX_2025-3/cti
sudo ./Install_GenTL_Path.sh
and reboot your system. You can now test the VimbaX by connecting an Alvium USB camera to your computer and running:
/opt/VimbaX_2025-3/bin/VimbaXViewer
The Vimba X Viewer window should appear and you should see the camera in the list of detected cameras.
Finally, add the VimbaX library path to your system’s library path. You can do this by creating a new file in the /etc/ld.so.conf.d/ directory:
echo "/opt/VimbaX_2025-3/api/lib" | sudo tee /etc/ld.so.conf.d/vimbax.conf
Then, update the linker cache:
sudo ldconfig
Note
You may want to create a GUI application launcher for the VimbaX’s VimbaXViever utility, which is handy for testing/troubleshooting/etc. To do this, create a file /tmp/VimbaXViever.desktop with the following content:
[Desktop Entry]
Name=VimbaXViever
Exec=/opt/VimbaX_2025-3/bin/VimbaXViewer
Type=Application
StartupNotify=false
and run:
sudo desktop-file-install --dir=/usr/share/applications /tmp/VimbaXViever.desktop
sudo update-desktop-database
Install GPUJPEG library¶
GPUJPEG is a library for JPEG encoding and decoding using NVIDIA (and, possibly, other) GPUs. To install it, download the latest release from the GPUJPEG releases page. Assume you have downloaded the file GPUJPEG-Linux-all.tar.xz to ~/Downloads. Install it by running the following commands:
sudo tar -xf ~/Downloads/GPUJPEG-Linux-all.tar.xz -C /opt/
echo "/opt/GPUJPEG/lib" | sudo tee /etc/ld.so.conf.d/gpujpeg.conf
sudo ldconfig
Note
Make sure that you have the NVIDIA drivers and CUDA toolkit installed on your system.
The above instructions were tested with GPUJPEG version 0.27.11 in Jan 2026.
Install OpenCV library¶
We use OpenCV library for debayering images coming from the camera.
Note
Here we describe how to set up OpenCV from source tarball downloaded from GitHub. To avoid any conflicts, make sure you do not have it installed through your package manager:
sudo apt remove libopencv-core* libopencv-imgproc*
Download the latest release of OpenCV from the OpenCV releases page. Assume you have downloaded the file opencv-4.13.0.zip to ~/Downloads. Install it by running the following commands:
unzip ~/Downloads/opencv-4.13.0.zip -d ~/Downloads
mkdir /tmp/opencv-4.13.0-build
cd /tmp/opencv-4.13.0-build
cmake ~/Downloads/opencv-4.13.0
make # This might take a long time
sudo make install
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/local_lib.conf
sudo ldconfig
Install ALSA Scarlett Control Panel¶
The ALSA Scarlett Control Panel (alsa-scarlett-gui) is a graphical user interface for controlling the audio settings of your Scarlett audio interface box. To install it, download a .deb installation file (here we assume that it’s called alsa-scarlett-gui_0.5.1_amd64.deb) from the project’s releases page into your ~/Downloads folder and run:
sudo apt install ~/Downloads/alsa-scarlett-gui_0.5.1_amd64.deb
You now should be able to run ALSA Scarlett Control Panel from the Ubuntu applications menu.
Set up exclusive access by VideoRecStation to the audio device¶
Note
Currently the VideoRecStation is designed to work with a Focusrite Scarlett 18i20 [3rd Gen] audio interface. You might be able to make it work with somehing else by hacking the config file, but to add proper support for other audio interfaces you need to modify the source code (and obviously recompile it).
In Ubuntu 24.04 LTS, the audio devices are managed by a system service called PipeWire. VideoRecStation needs exclusive access to the audio device, so to avoid conflicts with PipeWire, you need to configure PipeWire to ignore the Scarlett audio interface. To do this, first find the id of your Scarlett box. Make sure that the Scarlett box is connected to your computer and turned on, then run:
pactl list short cards
Look for a line that contains the id of your Scarlett box. The id should look something like alsa_card.usb-Focusrite_Scarlett_18i20_USB_12345678-00. Write down the id.
Note
You can also use wpctl status and wpctl inspect <ID> to get the same id. Look for the line like device.name = "alsa_card.usb-Focusrite_Scarlett_18i20_USB_12345678-00".
Next we need to create a WirePlumber rule to disable the device. Create a new file ~/.config/wireplumber/main.lua.d/99-disable-scarlett.lua with the following content (replace alsa_card.usb-Focusrite_Scarlett_18i20_USB_12345678-00 with the id you found above):
rule = {
matches = {
{
{ "device.name", "equals", "alsa_card.usb-Focusrite_Scarlett_18i20_USB_12345678-00" },
},
},
apply_properties = {
["device.disabled"] = true,
},
}
table.insert(alsa_monitor.rules, rule)
Then restart WirePlumber by running:
systemctl --user restart wireplumber
You can check that the PipeWire is no longer managing the Scarlett box by running:
pactl list short cards
The Scarlett box should no longer be listed.
Note
The above instructions work for WirePlumber versions 0.4.x (which was the default in Ubuntu 24.04 LTS as of Aug 2025) Between versions 0.4.x and 0.5.x the format of the configuration files for WirePlumber changed. If you are using WirePlumber 0.5.x or later, instead of ~/.config/wireplumber/main.lua.d/99-disable-scarlett.lua you need to create the file ~/.config/wireplumber/wireplumber.conf.d/99-disable-scarlett.conf with the following content (again, replace alsa_card.usb-Focusrite_Scarlett_18i20_USB_12345678-00 with the id you found above):
monitor.alsa.rules = [
{
matches = [
{ device.name = "alsa_card.usb-Focusrite_Scarlett_18i20_USB_12345678-00" }
]
actions = {
update-props = {
device.disabled = true
}
}
}
]
You can check the version of WirePlumber by running:
wireplumber --version
Install the VideoRecStation software¶
Build and install VideoRecStation binary¶
Clone the repository:
cd ~
git clone https://github.com/Helsinki-VideoMEG-Project/VideoRecStation.git
Modify the INCLUDEPATH and LIBS sections of the file src/VideoRecStation.pro to reflect the location where you have installed VimbaX (e.g., /opt/VimbaX_2025-3/api/include and /opt/VimbaX_2025-3/api/lib if you installed VimbaX in /opt/VimbaX_2025-3) and GPUJPEG (e.g., /opt/GPUJPEG/include and /opt/GPUJPEG/lib if you installed GPUJPEG in /opt/GPUJPEG).
Build and install the software:
cd VideoRecStation
qmake6 src/VideoRecStation.pro
make -f Makefile.Release
sudo cp VideoRecStation /usr/local/bin/
You now should be able to run VideoRecStation from the command line by typing:
VideoRecStation
Install application launcher¶
Copy the VideoRecStation icon to the system icons folder:
sudo cp ~/VideoRecStation/install/videorecstation.png /usr/share/icons/hicolor/512x512/apps
Install the application:
sudo desktop-file-install --dir=/usr/share/applications ~/VideoRecStation/install/VideoRecStation.desktop
sudo update-desktop-database
Note
The locations of the icon and the binary executable are specified in the ~/VideoRecStation/install/VideoRecStation.desktop file. If you want to install them to a different location, modify the VideoRecStation.desktop file accordingly.
Configure VideoRecStation¶
When you run VideoRecStation for the first time, it will create a configuration file ~/.config/Helsinki VideoMEG Project/VideoRecStation.conf with default settings. You should edit this file to set the parameters according to your setup. In particular, you should modify the sound card configuration and the storage path.
Configure audio settings¶
As mentioned above, we assume you want to use a Focusrite Scarlett 18i20 [3rd Gen] audio interface with the VideoRecStation. For that we need to find the ALSA device name through which Linux can access the Scarlett box. First, connect the Scarlett interface to your computer and turn it on. Next run:
arecord -L | grep -A1 "^hw:"
This should provide an output that looks something like this:
hw:CARD=sofhdadsp,DEV=0
sof-hda-dsp,
--
hw:CARD=sofhdadsp,DEV=6
sof-hda-dsp,
--
hw:CARD=sofhdadsp,DEV=7
sof-hda-dsp,
--
hw:CARD=USB,DEV=0
Scarlett 18i20 USB, USB Audio
Note the line Scarlett 18i20 USB, USB Audio. The line above it reads hw:CARD=USB,DEV=0. In this case the ALSA device name that we are looking for is hw:USB,0 (note that it might be something different on your system).
Assuming that the device name is hw:USB,0, modify the [audio] section of the file ~/.config/Helsinki VideoMEG Project/VideoRecStation.conf as follows:
[audio]
frames_per_period=940
input_audio_device="hw:USB,0"
num_periods=10
output_audio_device="hw:USB,0"
sampling_rate=44100
speaker_buffer_size=4
use_speaker_feedback=false
Configure data storage path¶
Create a folder where you want to store the recorded video and audio data and make sure that the user running VideoRecStation has write permissions to it. Then modify the data_storage_path parameter in the [misc] section of the file ~/.config/Helsinki VideoMEG Project/VideoRecStation.conf to poit to your folder. For example, if you want to store the data in /data/videomeg, make sure that the configuration file contains the following:
[misc]
data_storage_path=/data/videomeg
Note
Make sure that VideoRecStation is not running when you are editing the configuration file.