Record Video
This function block saves incoming image frames into a video file. You can start and stop recording with a boolean trigger or use the built‑in Spacebar trigger. Several quality modes are available, including a high-compression option that uses ffmpeg if installed.
📥 Inputs
Frame The input image frames to be recorded.
Record Boolean control to start/stop recording (used depending on chosen trigger mode).
Folder Path The folder where recorded videos will be saved.
File Name (no extension) Optional file name base. If left empty, a timestamp will be used.
📤 Outputs
This function block does not provide outputs.
🕹️ Controls
Video Quality Choose from quality modes:
Compressedsmaller files, fast.High Qualityless compression, better visual fidelity.High-Compress(requires ffmpeg)best compression but requires ffmpeg available on the system.
Trigger Mode Choose how recording is started/stopped:
Spacebarpress space to toggle start/stop (requires keyboard hook availability on your OS).Continuousprovide TRUE to start and FALSE to stop.Oncea rising TRUE starts recording and a subsequent TRUE stops and saves.
Recording LED Visual indicator showing whether recording is active.
🎯 Key Features
Start/stop recording using three trigger modes (Spacebar, Continuous, Once).
Multiple quality modes including an optional ffmpeg-based high compression.
Automatically picks available video codecs and container types for portability.
Prevents opening the video while recording (to avoid file conflicts).
Background conversion for high-compress mode so compression does not block real‑time capture (requires ffmpeg).
📝 How to use
Provide image frames to
Frame(for example fromCamera USB,Camera IP (ONVIF), orStream Reader).Set the
Folder Pathwhere videos should be saved.Optionally set
File Name (no extension)or leave empty to use a timestamp.Select desired
Video Quality. If you need smallest files and highest compression, pick the high-compress option and ensure ffmpeg is installed.Choose
Trigger Mode:For quick keyboard control use
Spacebar(works when permitted on your OS).For programmatic control use
ContinuousorOnceand feed boolean values intoRecord.
Start the recording according to the selected trigger. The
RecordingLED will turn on while capturing.Stop recording and let the block finalize the video. If high-compress mode was selected, final compression may run in the background.
📊 Behavior while running
When recording is active, incoming frames from
Frameare appended to the open video file.On stop, the file is closed. If the high-compress option was selected and ffmpeg is present, an optional background conversion will be launched to create a smaller highly‑compressed file.
If the Spacebar trigger is unavailable (common on some Linux setups without root privileges), the block will warn and you can use
ContinuousorOncemodes instead.
💡 Tips and Tricks
To record from a local camera, connect
Camera USBorCamera USB Externalto theFrameinput.For network cameras, use
Camera IP (ONVIF)orStream Readeras a source for smoother background frame fetching.Preview frames live by sending the same source into the
Show Imageblock alongside this block.Save individual frames for inspection in parallel using
Image LoggerorImage Writewhile the block records video.Trigger recording automatically when something important appears by connecting detection blocks (for example
Object DetectionorMask Detection) to a logic flow that drives theRecordinput.Use
Keyboard/Barcode Readerif you need more complex keyboard or external input triggers routed into theRecordinput.If you need smaller storage footprint but still want decent quality, choose
High-Compress(requires ffmpeg)and install ffmpeg on the system PATH.
🛠️ Troubleshooting
Spacebar trigger not working on Linux: run Studio with elevated privileges (or use
Continuous/Oncemodes).Compression not available: ensure ffmpeg is installed and accessible on the system PATH to enable the high-compress option. If ffmpeg is missing, the block will fallback to a non-ffmpeg mode and warn you.
File in use while recording: the video file cannot be opened by other applications during recording. Wait until recording finishes.
No frames saved: verify the source connected to
Frameis providing valid images (preview withShow Imagecan help).
Last updated