skillfed

decord

Decord Video Loader

decord v0.6.0 2.4M downloads/30d#3,064 on PyPI2,512
Permissive license APACHE DORMANT released

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 decord

uv

uv add decord

poetry

poetry add decord

Installing 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

Development Status :: 3 - AlphaLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3

Tags

video frame extractionhardware accelerated video decodingefficient video loading for trainingrandom access video framessynchronized audio video decodingdeep learning video loaderbatch video frame reading
video-decodingdeep-learning-datahardware-accelerated

More Artificial Intelligence packages