pub fn detect_format_with_encoding(
    path: impl AsRef<Path>,
    encoding: Option<&'static Encoding>
) -> Result<Format, Error>
Expand description

Attempt to detect subtitle format from its extension first, then by file contents using the given encoding if that fails

Errors