cutcutcodec.core.io
Manage the input/output layer.
Functions
|
Open the media file with the appropriate reader. |
|
Create, write and encode the multimedia file. |
Details
- 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.ContainerInputFFMPEGorcutcutcodec.core.io.read_image.ContainerInputImageorcutcutcodec.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(streams: Iterable[Stream], filename: Path | str | bytes, colorspace: Colorspace | str | None = None, **kwargs)[source]
Create, write and encode the multimedia file.
This is a high-level version of the
writemethod of thecutcutcodec.core.io.write_ffmpeg.ContainerOutputFFMPEGclass.Parameters
- streamsiterable[Stream]
These are all the audio and video streams that will be present in the final container.
- filenamepathlike
The path to the media file to be encoded.
- colorspacestr or Colorspace, optional
The encoded colorspace, by default, it is
cutcutcodec.core.classes.colorspace.Colorspace.from_default_target(). Transmitted tocutcutcodec.core.filter.video.colorspace.FilterVideoColorspace.
Modules
All audio, video and image suffixes. |
|
This module, implemented in C, offers functions to normalize frames. |
|
Pixel format conversion to keep all accuracy and taking care colorspace. |
|
Delegate the reading to the module read_ffmpeg, and add a filter to manage the colorspace. |
|
Decode the streams of a multimedia file based on ffmpeg. |
|
Read an image with opencv. |
|
Decode the svg vectorial images based on cairosvg lib. |
|
Combine several stream to yield frame in monotonic order. |
|
Management of the encoding of a multimedia stream based on PyAV. |