CpuFallbackStatus¶
- class torchcodec.decoders.CpuFallbackStatus(status_known: bool = False)[source]¶
Information about CPU fallback status.
This class tracks whether the decoder fell back to CPU decoding. Users should not instantiate this class directly; instead, access it via the
VideoDecoder.cpu_fallbackattribute.Usage:
Use
str(cpu_fallback_status)orprint(cpu_fallback_status)to see the cpu fallback statusUse
if cpu_fallback_status:to check if any fallback occurred
Examples using
CpuFallbackStatus:
Accelerated video decoding on GPUs with CUDA and NVDEC
Accelerated video decoding on GPUs with CUDA and NVDEC- status_known: bool = False¶
Whether the fallback status has been determined. For the Beta CUDA backend (see
set_cuda_backend()), this is alwaysTrueimmediately after decoder creation. For the FFmpeg CUDA backend, this becomesTrueafter decoding the first frame.