All examples
Video and vision

Acquire deterministic video frames

Read a finite synthetic source with a reusable native frame slot and inspect source counters.

video_basics.aner
// Deterministic finite acquisition; no physical camera or codec backend.
import aner.video

let source = video.synthetic(width: 160, height: 120, frames: 12)
let frame = video.frame_slot()
while source.read_into(frame) == "ready" {
    print(frame.sequence())
    print(frame.pixel(0, 0, 0))
}
print(source.captured())
print(source.delivered())
print(source.state())
source.close()

Make it your experiment.

Use Aner 0.1.0 or newer. Save this program as examples/video_basics.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.

Terminal
aner check examples/video_basics.aner
aner run examples/video_basics.aner

The 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.

Credential setup
aner check examples/video_basics.aner
aner run examples/video_basics.aner

Bundled datasets retain their own source attribution and license notices. Example outcomes are not comparative benchmarks or evidence of clinical validity.

Dataset sources & attribution
Install Aner