Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ The following table indicates the compatibility between versions of
| `torchcodec` | `torch` | Python |
| ------------------ | ------------------ | ------------------- |
| `main` / `nightly` | `main` / `nightly` | `>=3.10`, `<=3.13` |
| `0.7` | `2.8` | `>=3.9`, `<=3.13` |
| `0.6` | `2.8` | `>=3.9`, `<=3.13` |
| `0.5` | `2.7` | `>=3.9`, `<=3.13` |
| `0.4` | `2.7` | `>=3.9`, `<=3.13` |
Expand All @@ -145,12 +146,7 @@ First, make sure you have a GPU that has NVDEC hardware that can decode the
format you want. Refer to Nvidia's GPU support matrix for more details
[here](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new).

1. Install Pytorch corresponding to your CUDA Toolkit using the
[official instructions](https://pytorch.org/get-started/locally/). You'll
need the `libnpp` and `libnvrtc` CUDA libraries, which are usually part of
the CUDA Toolkit.

2. Install or compile FFmpeg with NVDEC support.
1. Install FFmpeg with NVDEC support.
TorchCodec with CUDA should work with FFmpeg versions in [4, 7].

If FFmpeg is not already installed, or you need a more recent version, an
Expand All @@ -162,10 +158,6 @@ format you want. Refer to Nvidia's GPU support matrix for more details
conda install "ffmpeg<8" -c conda-forge
```

If you are building FFmpeg from source you can follow Nvidia's guide to
configuring and installing FFmpeg with NVDEC support
[here](https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu/index.html).
Comment on lines -165 to -167
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by, I don't want to bother readers about installing FFmpeg from source, they shouldn't need to and it shouldn't be in the "entry point" install instructions anyway.


After installing FFmpeg make sure it has NVDEC support when you list the supported
decoders:

Expand All @@ -181,8 +173,18 @@ format you want. Refer to Nvidia's GPU support matrix for more details
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i test/resources/nasa_13013.mp4 -f null -
```

3. Install TorchCodec by passing in an `--index-url` parameter that corresponds
to your CUDA Toolkit version, example:
#### Linux

2. Install Pytorch corresponding to your CUDA Toolkit using the
[official instructions](https://pytorch.org/get-started/locally/). You'll
need the `libnpp` and `libnvrtc` CUDA libraries, which are usually part of
the CUDA Toolkit.


3. Install TorchCodec

Pass in an `--index-url` parameter that corresponds to your CUDA Toolkit
version, for example:

```bash
# This corresponds to CUDA Toolkit version 12.6. It should be the same one
Expand All @@ -193,6 +195,15 @@ format you want. Refer to Nvidia's GPU support matrix for more details
Note that without passing in the `--index-url` parameter, `pip` installs
the CPU-only version of TorchCodec.

#### Windows

2. On Windows (experimental support), you'll need to rely on `conda` to install
both pytorch and TorchCodec:

```bash
conda install -c conda-forge "torchcodec=*=*cuda*"
```

## Benchmark Results

The following was generated by running [our benchmark script](./benchmarks/decoders/generate_readme_data.py) on a lightly loaded 22-core machine with an Nvidia A100 with
Expand Down
Loading