cutcutcodec.core.io.read

cutcutcodec.core.io.read(filename: str | bytes | Path, **kwargs) ContainerInputFFMPEG | ContainerInputImage | ContainerInputSVG[source]

Open the media file with the appropriate reader.

Parameters

filenamepathlike

The path to the file to be decoded.

**kwargsdict

Transmitted to cutcutcodec.core.io.read_ffmpeg.ContainerInputFFMPEG or cutcutcodec.core.io.read_image.ContainerInputImage or cutcutcodec.core.io.read_svg.ContainerInputSVG.

Returns

containercutcutcodec.core.classes.container.ContainerInput

The appropriated instanciated container, according to the nature of the file.

Raises

cutcutcodec.core.exceptions.DecodeError

If the file can not be decoded by any reader.