A Viam camera module that replays a local video file as a virtual camera. It reads frames from a video file at the file's native FPS and serves them as JPEG images through Viam's camera API, looping back to the beginning when the video ends. Useful for testing and development.
- OpenCV 4 (with contrib modules) must be installed on the host machine
- Supported architectures:
linux/amd64,linux/arm64
{
"video_path": "/path/to/your/video.mp4"
}| Name | Type | Inclusion | Description |
|---|---|---|---|
video_path |
string | Required | Absolute path to the video file |
{
"components": [
{
"name": "my-replay-cam",
"api": "rdk:component:camera",
"model": "devin-hilly:video-replay:video",
"attributes": {
"video_path": "/home/user/videos/test.mp4"
}
}
],
"modules": [
{
"type": "registry",
"name": "devin-hilly_video-replay",
"module_id": "devin-hilly:video-replay",
"version": "latest"
}
]
}# Install OpenCV (macOS)
brew install opencv
# Install system dependencies (Linux)
make setup
# Build the binary
make build
# Package as a module tarball
make module.tar.gz- Returns JPEG images only
- No point cloud support
- Hardcoded intrinsic parameters (640x480)