cutcutcodec.core.io

Manage the input/output layer.

Functions

read(filename, **kwargs)

Open the media file with the appropriate reader.

write(*args, **kwargs)

Alias to cutcutcodec.core.io.write_ffmpeg.ContainerOutputFFMPEG.

Details

cutcutcodec.core.io.read(filename: str | bytes | Path, **kwargs) Node[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.ContainerInputFFMPEGColor 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.

cutcutcodec.core.io.write(*args, **kwargs)[source]

Alias to cutcutcodec.core.io.write_ffmpeg.ContainerOutputFFMPEG.

Modules

cst

All audio, video and image suffixes.

pix_map

Pixel format convertion to keep all accuracy and taking care colorspace.

read_ffmpeg

Decode the streams of a multimedia file based on ffmpeg.

read_ffmpeg_color

Delegate the reading to the module read_ffmpeg, and add a filter to manage the colorspace.

read_image

Read an image with opencv.

read_svg

Decode the svg vectorial images based on cairosvg lib.

scheduler

Combine several stream to yield frame in monotonic order.

write_ffmpeg

Management of the encoding of a multimedia stream based on PyAV.