Capture independent video sources
Use separate native source workers and reusable slots while retaining each camera identity.
// Two independent reproducible sources. Pairing does not synchronize exposure.
// For real cameras replace each constructor with a distinct device locator.
import aner.video
let left = video.synthetic(width: 160, height: 120, frames: 8)
let right = video.synthetic(width: 160, height: 120, frames: 8)
let a = video.frame_slot()
let b = video.frame_slot()
while left.read_into(a) == "ready" {
if right.read_into(b) == "ready" {
print(a.source_id())
print(b.source_id())
print(a.sequence())
print(b.sequence())
}
}
left.close()
right.close()
Make it your experiment.
Use Aner 0.1.0 or newer. Save this program as examples/video_multicamera.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.
aner check examples/video_multicamera.aner
aner run examples/video_multicamera.anerThe aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.
Requires Aner 0.1.0 or newer. Synthetic capture and CPU vision examples need no external source; cameras, remote media and encoded recording require optional FFmpeg support and explicit inputs. Checking opens no camera, network connection or recording.
aner check examples/video_multicamera.aner
aner run examples/video_multicamera.anerBundled datasets retain their own source attribution and license notices. Example outcomes are not comparative benchmarks or evidence of clinical validity.
Dataset sources & attribution