Skip to content

Commit b256946

Browse files
committed
Revert "Upgrade to FFmpeg5 (pytorch#3298)"
This reverts commit d38a785.
1 parent c6624fa commit b256946

File tree

12 files changed

+35
-28
lines changed

12 files changed

+35
-28
lines changed

.circleci/unittest/linux/scripts/setup_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ conda activate "${env_dir}"
3636

3737
# 3. Install minimal build tools
3838
pip --quiet install cmake ninja
39-
conda install --quiet -y -c conda-forge 'ffmpeg==5.1' pkg-config
39+
conda install --quiet -y 'ffmpeg>=4.1' pkg-config

.circleci/unittest/windows/scripts/setup_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ conda activate "${env_dir}"
3535

3636
# 3. Install minimal build tools
3737
pip --quiet install cmake ninja
38-
conda install --quiet -y -c conda-forge 'ffmpeg==5.1'
38+
conda install --quiet -y 'ffmpeg>=4.1'

.github/workflows/build_docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ jobs:
106106
"${CUDATOOLKIT}"
107107
108108
# Install torchaudio
109+
# TODO: Enable NVDec/NVEnc
110+
conda install --quiet -y 'ffmpeg>=4.1' pkg-config
109111
pip --quiet install cmake>=3.18.0 ninja
110112
cd packaging
111113
. ./pkg_helpers.bash

.github/workflows/unittest-linux-gpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
"${CUDATOOLKIT}"
5656
5757
# Install torchaudio
58-
conda install --quiet -y -c conda-forge 'ffmpeg==5.1' pkg-config
58+
conda install --quiet -y 'ffmpeg>=4.1' pkg-config
5959
python3 -m pip --quiet install cmake>=3.18.0 ninja
6060
USE_FFMPEG=1 python3 -m pip install -v -e . --no-use-pep517
6161

docs/source/installation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Please refer to https://pytorch.org/get-started/locally/ for the details.
1616
each of which requires a corresponding PyTorch distribution.
1717

1818
.. note::
19-
This software was compiled against an unmodified copy of FFmpeg (licensed under `the LGPLv2.1 <https://github.com/FFmpeg/FFmpeg/blob/0e15444aceca0e78f99f3d67758eb79d11b86599/COPYING.LGPLv2.1>`_), with the specific rpath removed so as to enable the use of system libraries. The LGPL source can be downloaded `here <https://github.com/FFmpeg/FFmpeg/releases/tag/n5.0.3>`_.
19+
This software was compiled against an unmodified copy of FFmpeg (licensed under `the LGPLv2.1 <https://github.com/FFmpeg/FFmpeg/blob/a5d2008e2a2360d351798e9abe883d603e231442/COPYING.LGPLv2.1>`_), with the specific rpath removed so as to enable the use of system libraries. The LGPL source can be downloaded `here <https://github.com/FFmpeg/FFmpeg/releases/tag/n4.1.8>`_.
2020

2121
Dependencies
2222
------------
@@ -31,8 +31,8 @@ Optional Dependencies
3131
* `FFmpeg <https://ffmpeg.org>`_.
3232

3333
Required to use :py:mod:`torchaudio.io` module.
34-
TorchAudio official binary distributions are compatible with FFmpeg 5.
35-
If you need to use FFmpeg 6, please build TorchAudio from source.
34+
TorchAudio official binary distributions are compatible with FFmpeg 4.1 to 4.4.
35+
If you need to use FFmpeg 5, please build TorchAudio from source.
3636

3737
* `sentencepiece <https://pypi.org/project/sentencepiece/>`_
3838

examples/tutorials/device_asr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
1111
.. note::
1212
13-
This tutorial requires FFmpeg libraries (>=5.0, <6) and SentencePiece.
13+
This tutorial requires FFmpeg libraries (>=4.1, <4.4) and SentencePiece.
1414
1515
There are multiple ways to install FFmpeg libraries.
1616
If you are using Anaconda Python distribution,
17-
``conda install -c conda-forge 'ffmpeg<6'`` will install
17+
``conda install 'ffmpeg<4.4'`` will install
1818
the required FFmpeg libraries.
1919
2020
You can install SentencePiece by running ``pip install sentencepiece``.

examples/tutorials/effector_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#
1414
# .. note::
1515
#
16-
# This tutorial requires FFmpeg libraries (>=5.0, <6).
16+
# This tutorial requires FFmpeg libraries (>=4.1, <5).
1717
#
1818
# There are multiple ways to install FFmpeg libraries.
1919
# If you are using Anaconda Python distribution,
20-
# ``conda install -c conda-forge 'ffmpeg<6'`` will install
20+
# ``conda install -c anaconda 'ffmpeg<5'`` will install
2121
# the required libraries.
2222
#
2323

examples/tutorials/online_asr_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#
1414
# .. note::
1515
#
16-
# This tutorial requires FFmpeg libraries (>=5, <6) and SentencePiece.
16+
# This tutorial requires FFmpeg libraries (>=4.1, <4.4) and SentencePiece.
1717
#
1818
# There are multiple ways to install FFmpeg libraries.
1919
# If you are using Anaconda Python distribution,
20-
# ``conda install -c conda-forge 'ffmpeg<6'`` will install
20+
# ``conda install 'ffmpeg<4.4'`` will install
2121
# the required FFmpeg libraries.
2222
#
2323
# You can install SentencePiece by running ``pip install sentencepiece``.

examples/tutorials/streamreader_basic_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#
1515
# .. note::
1616
#
17-
# This tutorial requires FFmpeg libraries (>=5.0, <6).
17+
# This tutorial requires FFmpeg libraries (>=4.1, <4.4).
1818
#
1919
# There are multiple ways to install FFmpeg libraries.
2020
# If you are using Anaconda Python distribution,
21-
# ``conda install -c conda-forge 'ffmpeg<6'`` will install
21+
# ``conda install -c anaconda 'ffmpeg<4.4'`` will install
2222
# the required libraries.
2323
#
2424

examples/tutorials/streamwriter_advanced.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@
2323
#
2424
# .. note::
2525
#
26-
# This tutorial requires FFmpeg libraries (>=5.0, <6).
26+
# This tutorial requires torchaudio nightly build and FFmpeg libraries (>=4.1, <4.4).
27+
#
28+
# To install torchaudio nightly build, please refer to
29+
# https://pytorch.org/get-started/locally/ .
30+
#
2731
#
2832
# There are multiple ways to install FFmpeg libraries.
2933
# If you are using Anaconda Python distribution,
30-
# ``conda install -c conda-forge 'ffmpeg<6'`` will install
31-
# the required libraries.
32-
# This distribution, however, does not have SDL plugin, so
33-
# it cannot play video.
34+
# ``conda install 'ffmpeg<4.4'`` will install the required FFmpeg libraries,
35+
# however, this distribution does not have SDL plugin, so it cannot play
36+
# video.
3437
#
3538

3639
######################################################################

examples/tutorials/streamwriter_basic_tutorial.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
#
1414
# .. note::
1515
#
16-
# This tutorial requires FFmpeg libraries (>=5.0, <6).
16+
# This tutorial requires torchaudio nightly build and FFmpeg libraries (>=4.1, <4.4).
17+
#
18+
# To install torchaudio nightly build, please refer to
19+
# https://pytorch.org/get-started/locally/ .
1720
#
1821
# There are multiple ways to install FFmpeg libraries.
1922
# If you are using Anaconda Python distribution,
20-
# ``conda install -c conda-forge 'ffmpeg<6'`` will install
21-
# the required libraries.
23+
# ``conda install 'ffmpeg<4.4'`` will install the required FFmpeg libraries.
2224
#
2325

2426
######################################################################

packaging/ffmpeg/build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cd "${build_dir}"
3232
# NOTE:
3333
# When changing the version of FFmpeg, update the README so that the link to the source points
3434
# the same version.
35-
curl -LsS -o ffmpeg.tar.gz https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n5.0.3.tar.gz
35+
curl -LsS -o ffmpeg.tar.gz https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n4.1.8.tar.gz
3636
tar -xf ffmpeg.tar.gz --strip-components 1
3737
./configure \
3838
--prefix="${prefix}" \
@@ -72,11 +72,11 @@ ls ${prefix}/*
7272
# macOS: Fix rpath so that the libraries are searched dynamically in user environment.
7373
# In Linux, this is handled by `--enable-rpath` flag.
7474
if [[ "$(uname)" == Darwin ]]; then
75-
avcodec=libavcodec.59
76-
avdevice=libavdevice.59
77-
avfilter=libavfilter.8
78-
avformat=libavformat.59
79-
avutil=libavutil.57
75+
avcodec=libavcodec.58
76+
avdevice=libavdevice.58
77+
avfilter=libavfilter.7
78+
avformat=libavformat.58
79+
avutil=libavutil.56
8080

8181
otool="/usr/bin/otool"
8282
# NOTE: miniconda has a version of otool and install_name_tool installed and we want

0 commit comments

Comments
 (0)