%global pypi_name torchcodec Name: python-%{pypi_name} Version: 0.11.1 Release: 1%{?dist} Summary: A library for audio and signal processing with PyTorch License: BSD-3-Clause URL: https://github.com/meta-pytorch/torchcodec Source0: %{url}/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz ExclusiveArch: aarch64 x86_64 BuildRequires: gcc gcc-c++ BuildRequires: fmt-devel BuildRequires: libavcodec-free-devel BuildRequires: libavdevice-free-devel BuildRequires: libavfilter-free-devel BuildRequires: libavformat-free-devel BuildRequires: libswscale-free-devel BuildRequires: protobuf-devel BuildRequires: pybind11-devel BuildRequires: python3-cmake BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-torch BuildRequires: python3-numpy %ifarch x86_64 BuildRequires: libomp-devel BuildRequires: rocm-cmake BuildRequires: rocm-devel BuildRequires: rocm-hip-devel %endif Requires: ffmpeg-free Requires: libavcodec-free %global _description %{expand: TorchCodec is a Python library for decoding video and audio data into PyTorch tensors, on CPU and CUDA GPU. It also supports video and audio encoding on CPU! It aims to be fast, easy to use, and well integrated into the PyTorch ecosystem. If you want to use PyTorch to train ML models on videos and audio, TorchCodec is how you turn these into data. We achieve these capabilities through: * Pythonic APIs that mirror Python and PyTorch conventions. * Relying on FFmpeg to do the decoding and encoding. TorchCodec uses the version of FFmpeg you already have installed. FFmpeg is a mature library with broad coverage available on most systems. It is, however, not easy to use. TorchCodec abstracts FFmpeg's complexity to ensure it is used correctly and efficiently. * Returning data as PyTorch tensors, ready to be fed into PyTorch transforms or used directly to train models. } %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build export I_CONFIRM_THIS_IS_NOT_A_LICENSE_VIOLATION=1 %pyproject_wheel %install export I_CONFIRM_THIS_IS_NOT_A_LICENSE_VIOLATION=1 %pyproject_install %pyproject_save_files %{pypi_name} %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog * Mon May 18 2026 Peter Robinson - 0.11.1-1 - Initial package