decord
Decord Video Loader
What it is and what it does
Decord is a video and audio decoding library designed to solve the inefficiency of random frame access during deep learning training. It wraps hardware-accelerated decoders (FFMPEG, Nvidia, Intel codecs) to provide fast, seek-optimized frame extraction from video files. The library exposes three main interfaces: VideoReader for direct frame access, VideoLoader for batched training with smart shuffling, and AudioReader for synchronized audio extraction.
The package's core strength is handling random access patterns efficiently—a common requirement during neural network training where frames are often sampled non-sequentially. It accepts numpy-like indexing, batch operations, and file-like objects for in-memory decoding. Runtime dependency is numpy only; system-level dependencies (FFMPEG, cmake, C++ compiler) are required for installation, either via prebuilt wheels or source compilation.
Use it for:
- Load random frames from videos during deep learning training without seeking overhead
- Extract synchronized video and audio samples for multimodal model training
- Batch-load multiple frames at once from a single video file for efficient GPU transfer
- Shuffle and iterate over frames from many video files with optimized memory patterns
- Decode audio from video files or standalone audio files with custom sample rates
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Decord decodes video and audio files with hardware-accelerated decoders (FFMPEG, Nvidia, Intel codecs) and provides efficient random frame access for deep learning workflows.
Yes, if you need efficient random video frame access for deep learning and can manage system dependencies. The dormant maintenance status (no releases since June 2021, last commit July 2024) is a concern for long-term support and compatibility with newer codecs or Python versions. Install only if your video formats and Python version are confirmed compatible, and consider alternatives if active maintenance is critical for your project.
Install
decord on PyPI
pip
pip install decorduv
uv add decordpoetry
poetry add decordInstalling decord
Before you install
Medium install friction due to compiled dependencies (FFMPEG, libavcodec, cmake required). Package is dormant since June 2021 with last commit in July 2024; no active maintenance signal. Prebuilt wheels available for Linux, macOS, and Windows, but GPU acceleration requires building from source.
License in practice
Apache License (permissive) allows commercial and private use with minimal restrictions, though you must retain license notices in distributions.
Quickstart
pip install decord
from decord import VideoReader, cpu
vr = VideoReader('video.mp4', ctx=cpu(0))
frames = vr.get_batch([0, 5, 10]) # fetch specific frames
print(frames.shape)
Requires FFMPEG/libavcodec system libraries. GPU acceleration (NVIDIA/Intel codecs) requires building from source with appropriate SDK. CPU-only wheels provided via PyPI.
Verify before relying
- Whether the package works reliably with modern video codecs (H.265, VP9, AV1) beyond the FFMPEG 4.0 era mentioned in docs
- Current status of GPU acceleration support and whether NVIDIA/Intel codec implementations are production-ready
- Compatibility with Python versions beyond 3.8 (classifiers list only 3, but wheels exist for 3.6–3.8)
Package facts
| License | APACHE (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | dormant — 1,887 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,437,914/month — #3,064 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: decord-0.6.0-cp36-cp36m-macosx_10_15_x86_64.whl; decord-0.6.0-cp37-cp37m-macosx_10_15_x86_64.whl; decord-0.6.0-cp38-cp38-macosx_10_15_x86_64.whl; decord-0.6.0-py3-none-manylinux2010_x86_64.whl; decord-0.6.0-py3-none-win_amd64.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
decord2Decord2 decodes video and audio files with…
permissive · top 15,000 on PyPI
torchcodecTorchCodec decodes and encodes videos, audio,…
unclear · top 5,000 on PyPI
imageio-ffmpegProvides a simple Python wrapper around ffmpeg…
permissive · top 5,000 on PyPI
pynvvideocodecPyNvVideoCodec provides hardware-accelerated…
permissive · top 15,000 on PyPI
scikit-videoscikit-video reads, writes, and analyzes video…
permissive · top 5,000 on PyPI
nvidia-cudnn-cu12Provides cuDNN runtime libraries for…
unclear · top 1,000 on PyPI
nvidia-cudnn-cu13Provides cuDNN runtime libraries for…
unclear · top 1,000 on PyPI
nvidia-nvimgcodec-cu12nvImageCodec provides GPU-accelerated codec…
permissive · top 15,000 on PyPI
FileseqParses frame ranges and file sequences using…
permissive · top 15,000 on PyPI
audioreadDecode audio files using whichever backend is…
permissive · top 5,000 on PyPI