--- id: decord version: "0.6.0" license: APACHE license_treatment: permissive maintenance: dormant --- # decord — Decord Video Loader License: permissive · Maintenance: dormant · Downloads: 2.4M/mo ## 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 above — 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 pip install decord uv add decord 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: unspecified - Install friction: medium - Maintenance: dormant - Downloads: 2.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags video frame extraction, hardware accelerated video decoding, efficient video loading for training, random access video frames, synchronized audio video decoding, deep learning video loader, batch video frame reading, video-decoding, deep-learning-data, hardware-accelerated [View on SkillFed](https://skillfed.io/packages/decord) · [View on PyPI](https://pypi.org/project/decord/)