spdl.io.decode_config¶
- decode_config(**kwargs) DecodeConfig [source]¶
Customize decoding behavior.
- Parameters:
- Returns:
Config object.
Example: Change the number of threads internal to FFmpeg decoder
>>> # Let FFmpeg chose the optimal number of threads for decoding. >>> # Note: By default, SPDL specifies decoders to use a single thread. >>> cfg = DecodeConfig(decoder_options={"threads": "0"}) >>> >>> frames = await spdl.io.async_decode_packets( ... await spdl.io.async_demux_video(src), ... decode_config=cfg)