cutcutcodec.core.compilation.export.compatibility¶
Allow to choose a format and codecs.
The information collected here concerns the encoding and not the decoding.
Classes
|
Link the muxers and the encoders. |
Functions
|
Test throw av the compatibility of the encoding audio parameters. |
|
Test throw av the compatibility of the encoding video parameters. |
Details
- class cutcutcodec.core.compilation.export.compatibility.Compatibilities(*args, **kwargs)[source]
Link the muxers and the encoders.
- cutcutcodec.core.compilation.export.compatibility.audio_encodec_compatibility(encodec: str, muxer: str, layout: str = 'mono', rate: int | None = None, profile: str | None = None) str[source]
Test throw av the compatibility of the encoding audio parameters.
Parameters¶
- encodecstr
The codec or the encoder name.
- muxerstr
The format name.
- layoutstr, default=”mono”
The name of the audio layout, ex “stereo”
- rateint, optional
The samplerate of the audio in all channels.
- profilestr, optional
The name of the binary format of the data ex “flt”.
Returns¶
- codecstr
The name of the codec found.
Raises¶
- IncompatibleSettings
If it fails to encode or if the decoded parameters don’t matched.
Examples¶
>>> from cutcutcodec.core.compilation.export.compatibility import audio_encodec_compatibility >>> audio_encodec_compatibility("libvorbis", "ogg") 'vorbis' >>>
- cutcutcodec.core.compilation.export.compatibility.video_encodec_compatibility(encodec: str, muxer: str, shape: tuple[int, int] | None = None, rate: Fraction | None = None, pix_fmt: str | None = None) str[source]
Test throw av the compatibility of the encoding video parameters.
Parameters¶
- encodecstr
The codec or the encoder name.
- muxerstr
The format name.
- shapetuple[int, int], optional
The shape of the frames of the encoded video.
- rateFraction, optional
The frame rate.
- pix_fmtstr, optional
The name of the pixel format used.
Returns¶
- codecstr
The name of the codec found.
Raises¶
- IncompatibleSettings
If it fails to encode or if the decoded parameters don’t matched.
Examples¶
>>> from cutcutcodec.core.compilation.export.compatibility import video_encodec_compatibility >>> video_encodec_compatibility("libx264", "mp4") 'h264' >>>