How do I use an ffmpeg device to record the screen?

Viewed 97

I'm trying to record the screen using the ffmpeg-next wrapper and save the result to a mkv file. There's an example in the crate's github for remuxing and from what I've read from ffmpeg's documentation, replacing the input context demuxer with a device that captures the screen would do the trick.

The input context is declared like this:

let mut ictx = format::input(&input_file).unwrap();

Can I change this input context to a device that captures the screen?

0 Answers
Related