Skip to content
Closed
Show file tree
Hide file tree
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
39 changes: 16 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,45 +81,38 @@ ffmpeg -f lavfi -i \

## Installing TorchCodec

We'll be providing wheels in the coming days so that you can just install
torchcodec using `pip`. For now, you can just build from source. You will need
the following dependencies:

- A C++ compiler+linker. This is typically available on a baseline Linux
installation already.
- cmake
- pkg-config
- FFmpeg
- PyTorch nightly

Start by installing PyTorch following the [official
Note: if you're on MacOS, you'll need to [build from source](./CONTRIBUTING.md).
Instructions below assume you're on Linux.

First install the latest stable version of PyTorch following the [official
instructions](https://pytorch.org/get-started/locally/).

Then, the easiest way to install the rest of the dependencies is to run:
Then:

```bash
conda install cmake pkg-config ffmpeg -c conda-forge
pip install torchcodec
```

To clone and install the repo, run:
You will also need FFmpeg installed on your system, and TorchCodec decoding
capabilities are determined by your underlying FFmpeg installation. There are
different options to install FFmpeg e.g.:

```bash
git clone git@github.com:pytorch/torchcodec.git
# Or, using https instead of ssh: git clone https://github.com/pytorch/torchcodec.git
cd torchcodec

pip install -e ".[dev]" --no-build-isolation -vv
conda install ffmpeg
# or
conda install ffmpeg -c conda-forge
```

Your Linux distribution probably comes with FFmpeg pre-installed as well.
TorchCodec supports all major FFmpeg version in [4, 7].


## Planned future work

We are actively working on the following features:

- Ship wheels for Linux, so that Linux users can `pip install torchcodec`.
- [Ship wheels for MacOS](https://github.com/pytorch/torchcodec/issues/111), so
that MacOS users can `pip install torchcodec`.
that MacOS users can `pip install torchcodec`. For now this is only supported
on Linux, but MacOS users can [build from source](./CONTRIBUTING.md).
- [GPU decoding](https://github.com/pytorch/torchcodec/pull/58)
- [Audio decoding](https://github.com/pytorch/torchcodec/issues/85)

Expand Down
38 changes: 20 additions & 18 deletions docs/source/install_instructions.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
Installation Instructions
=========================

We'll be providing wheels in the coming days so that you can just install
torchcodec using ``pip``. For now, you can just build from source. You will need
the following dependencies:
.. note::
TorchCodec is only available on Linux for now. We plan to support other
platforms in the future.

- A C++ compiler+linker. This is typically available on a baseline Linux
installation already.
- cmake
- pkg-config
- FFmpeg
- PyTorch nightly
Installing torchcodec should be as simple as:

Start by installing PyTorch following the `official instructions
<https://pytorch.org/get-started/locally/>`_.
.. code:: bash

Then, the easiest way to install the rest of the dependencies is to run:
pip install torchcodec

conda install cmake pkg-config ffmpeg -c conda-forge
You will need a working PyTorch installation, which you can install following
the `official instructions <https://pytorch.org/get-started/locally/>`_.

To clone and install the repo, run:
You will also need FFmpeg installed on your system, and TorchCodec decoding
capabilities are determined by your underlying FFmpeg installation. There are
different options to install FFmpeg e.g.:

git clone git@github.com:pytorch/torchcodec.git
# Or, using https instead of ssh: git clone https://github.com/pytorch/torchcodec.git
cd torchcodec
.. code:: bash

pip install -e ".[dev]" --no-build-isolation -vv
conda install ffmpeg
# or
conda install ffmpeg -c conda-forge

Your Linux distribution probably comes with FFmpeg pre-installed as well.
TorchCodec supports all major FFmpeg version in [4, 7].

Note that installation instructions may slightly change over time. The most
up-to-date instructions should be available from the `README
<https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec>`_.