cutcutcodec.core.io.read

cutcutcodec.core.io.read(filename: Path | str | bytes, colorspace: Colorspace | str | None = None, **kwargs) Node[source]

Open the media file with the appropriate reader.

Parameters

filenamepathlike

The path to the file to be decoded.

colorspacestr or Colorspace, optional

Transmitted to cutcutcodec.core.filter.video.colorspace.FilterVideoColorspace.

**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.