1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Basic webcam viewer example.
//!
//! Demonstrates the simplest way to display live webcam video in the terminal
//! using braille rendering.
//!
//! # Usage
//!
//! ```bash
//! cargo run --example webcam_viewer --features video
//! ```
//!
//! Press any key to exit.
//!
//! # Requirements
//!
//! - FFmpeg libraries installed on the system
//! - A connected webcam
//!
//! # Platform Notes
//!
//! - **Linux**: Requires V4L2 device (usually `/dev/video0`)
//! - **macOS**: Requires AVFoundation camera access permission
//! - **Windows**: Requires DirectShow video input device
use dotmax::prelude::*;
fn main() -> dotmax::Result<()> {
// The simplest possible webcam display - one line!
println!("Starting webcam viewer...");
println!("Press any key to exit.");
println!();
// This opens the default webcam and displays live feed
// until any key is pressed
show_webcam()?;
println!("Webcam viewer closed.");
Ok(())
}