diff --git a/examples/live.rs b/examples/live.rs index 2ff2c42..6f6e311 100644 --- a/examples/live.rs +++ b/examples/live.rs @@ -28,15 +28,15 @@ fn main() -> anyhow::Result<()> { const WIDTH: usize = 288; const HEIGHT: usize = 384; - + let fourcc_repr = [ + b'Y', // | 0b10000000 + b'1', b'6', b' ', + ]; + let fourcc = v4l::format::FourCC { repr: fourcc_repr }; let mut out = v4l::Device::with_path(output)?; // To find the fourcc code, use v4l2-ctl --list-formats-out /dev/video0 // (or read the source :) - let format = v4l::Format::new( - WIDTH as u32, - HEIGHT as u32, - v4l::format::FourCC::new(b"Y16 "), - ); + let format = v4l::Format::new(WIDTH as u32, HEIGHT as u32, fourcc); Output::set_format(&out, &format)?; // Setup Capture