Skip to main content

open_input

Function open_input 

Source
pub fn open_input(
    path: &Path,
    formats: &CStr,
) -> Result<DemuxInput, OpenInputError>
Expand description

Opens path and reads its stream information using only the demuxers in formats (comma-separated FFmpeg short names) and only the file protocol.

Still images pick their demuxer by signature. Otherwise image2 claims any file named like an image before the JPEG demuxer has seen a large JPEG whole, and formats leaves image2 out.

ยงErrors

OpenInputError::Path for an unusable path, OpenInputError::Refused for a container formats leaves out, else the FFmpeg failure.