A demo project using Rust and OpenCV to display live webcam video and record it based on user input.
- Displays live video from the default webcam
- Press 'r' to start/stop recording (shows "RECORDING" overlay while recording)
- Press 's' to save a screenshot of the current frame as a PNG file
- Press 'q' to quit the application
- Saves recorded video as an mp4 file (filename includes a timestamp)
-
Make sure you have Rust and OpenCV installed.
-
In the project directory, run:
cargo run
-
Follow the on-screen instructions:
- Press
rto start/stop recording - Press
sto save a screenshot (PNG) - Press
qto quit
- Press
- opencv crate
- Generated video files (
video_capture_*.mp4) and build artifacts (target/) are excluded from version control via.gitignore.