Commit 37779ef9 authored by atalman's avatar atalman Committed by Facebook GitHub Bot
Browse files

Revert "Upgrade to FFmpeg5 (#3298)" (#3377)

Summary:
This reverts commit d38a7854.

This is temporary revert to unblock unit test migration from circleci to github

Pull Request resolved: https://github.com/pytorch/audio/pull/3377

Reviewed By: mthrok

Differential Revision: D46230498

Pulled By: atalman

fbshipit-source-id: 000d8a9ca00750fc1ca61f4c2cdd6e930a5ce46d
parent 9fc0dcaa
...@@ -36,4 +36,4 @@ conda activate "${env_dir}" ...@@ -36,4 +36,4 @@ conda activate "${env_dir}"
# 3. Install minimal build tools # 3. Install minimal build tools
pip --quiet install cmake ninja pip --quiet install cmake ninja
conda install --quiet -y -c conda-forge 'ffmpeg==5.1' pkg-config conda install --quiet -y 'ffmpeg>=4.1' pkg-config
...@@ -35,4 +35,4 @@ conda activate "${env_dir}" ...@@ -35,4 +35,4 @@ conda activate "${env_dir}"
# 3. Install minimal build tools # 3. Install minimal build tools
pip --quiet install cmake ninja pip --quiet install cmake ninja
conda install --quiet -y -c conda-forge 'ffmpeg==5.1' conda install --quiet -y 'ffmpeg>=4.1'
...@@ -106,6 +106,8 @@ jobs: ...@@ -106,6 +106,8 @@ jobs:
"${CUDATOOLKIT}" "${CUDATOOLKIT}"
# Install torchaudio # Install torchaudio
# TODO: Enable NVDec/NVEnc
conda install --quiet -y 'ffmpeg>=4.1' pkg-config
pip --quiet install cmake>=3.18.0 ninja pip --quiet install cmake>=3.18.0 ninja
cd packaging cd packaging
. ./pkg_helpers.bash . ./pkg_helpers.bash
......
...@@ -55,7 +55,7 @@ jobs: ...@@ -55,7 +55,7 @@ jobs:
"${CUDATOOLKIT}" "${CUDATOOLKIT}"
# Install torchaudio # Install torchaudio
conda install --quiet -y -c conda-forge 'ffmpeg==5.1' pkg-config conda install --quiet -y 'ffmpeg>=4.1' pkg-config
python3 -m pip --quiet install cmake>=3.18.0 ninja python3 -m pip --quiet install cmake>=3.18.0 ninja
USE_FFMPEG=1 python3 -m pip install -v -e . --no-use-pep517 USE_FFMPEG=1 python3 -m pip install -v -e . --no-use-pep517
......
...@@ -16,7 +16,7 @@ Please refer to https://pytorch.org/get-started/locally/ for the details. ...@@ -16,7 +16,7 @@ Please refer to https://pytorch.org/get-started/locally/ for the details.
each of which requires a corresponding PyTorch distribution. each of which requires a corresponding PyTorch distribution.
.. note:: .. note::
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>`_. 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>`_.
Dependencies Dependencies
------------ ------------
...@@ -31,8 +31,8 @@ Optional Dependencies ...@@ -31,8 +31,8 @@ Optional Dependencies
* `FFmpeg <https://ffmpeg.org>`_. * `FFmpeg <https://ffmpeg.org>`_.
Required to use :py:mod:`torchaudio.io` module. Required to use :py:mod:`torchaudio.io` module.
TorchAudio official binary distributions are compatible with FFmpeg 5. TorchAudio official binary distributions are compatible with FFmpeg 4.1 to 4.4.
If you need to use FFmpeg 6, please build TorchAudio from source. If you need to use FFmpeg 5, please build TorchAudio from source.
* `sentencepiece <https://pypi.org/project/sentencepiece/>`_ * `sentencepiece <https://pypi.org/project/sentencepiece/>`_
......
...@@ -10,11 +10,11 @@ on laptop. ...@@ -10,11 +10,11 @@ on laptop.
.. note:: .. note::
This tutorial requires FFmpeg libraries (>=5.0, <6) and SentencePiece. This tutorial requires FFmpeg libraries (>=4.1, <4.4) and SentencePiece.
There are multiple ways to install FFmpeg libraries. There are multiple ways to install FFmpeg libraries.
If you are using Anaconda Python distribution, If you are using Anaconda Python distribution,
``conda install -c conda-forge 'ffmpeg<6'`` will install ``conda install 'ffmpeg<4.4'`` will install
the required FFmpeg libraries. the required FFmpeg libraries.
You can install SentencePiece by running ``pip install sentencepiece``. You can install SentencePiece by running ``pip install sentencepiece``.
......
...@@ -13,11 +13,11 @@ apply various effects and codecs to waveform tensor. ...@@ -13,11 +13,11 @@ apply various effects and codecs to waveform tensor.
# #
# .. note:: # .. note::
# #
# This tutorial requires FFmpeg libraries (>=5.0, <6). # This tutorial requires FFmpeg libraries (>=4.1, <5).
# #
# There are multiple ways to install FFmpeg libraries. # There are multiple ways to install FFmpeg libraries.
# If you are using Anaconda Python distribution, # If you are using Anaconda Python distribution,
# ``conda install -c conda-forge 'ffmpeg<6'`` will install # ``conda install -c anaconda 'ffmpeg<5'`` will install
# the required libraries. # the required libraries.
# #
......
...@@ -13,11 +13,11 @@ to perform online speech recognition. ...@@ -13,11 +13,11 @@ to perform online speech recognition.
# #
# .. note:: # .. note::
# #
# This tutorial requires FFmpeg libraries (>=5, <6) and SentencePiece. # This tutorial requires FFmpeg libraries (>=4.1, <4.4) and SentencePiece.
# #
# There are multiple ways to install FFmpeg libraries. # There are multiple ways to install FFmpeg libraries.
# If you are using Anaconda Python distribution, # If you are using Anaconda Python distribution,
# ``conda install -c conda-forge 'ffmpeg<6'`` will install # ``conda install 'ffmpeg<4.4'`` will install
# the required FFmpeg libraries. # the required FFmpeg libraries.
# #
# You can install SentencePiece by running ``pip install sentencepiece``. # You can install SentencePiece by running ``pip install sentencepiece``.
......
...@@ -14,11 +14,11 @@ libavfilter provides. ...@@ -14,11 +14,11 @@ libavfilter provides.
# #
# .. note:: # .. note::
# #
# This tutorial requires FFmpeg libraries (>=5.0, <6). # This tutorial requires FFmpeg libraries (>=4.1, <4.4).
# #
# There are multiple ways to install FFmpeg libraries. # There are multiple ways to install FFmpeg libraries.
# If you are using Anaconda Python distribution, # If you are using Anaconda Python distribution,
# ``conda install -c conda-forge 'ffmpeg<6'`` will install # ``conda install -c anaconda 'ffmpeg<4.4'`` will install
# the required libraries. # the required libraries.
# #
......
...@@ -23,14 +23,17 @@ play audio and video. ...@@ -23,14 +23,17 @@ play audio and video.
# #
# .. note:: # .. note::
# #
# This tutorial requires FFmpeg libraries (>=5.0, <6). # This tutorial requires torchaudio nightly build and FFmpeg libraries (>=4.1, <4.4).
#
# To install torchaudio nightly build, please refer to
# https://pytorch.org/get-started/locally/ .
#
# #
# There are multiple ways to install FFmpeg libraries. # There are multiple ways to install FFmpeg libraries.
# If you are using Anaconda Python distribution, # If you are using Anaconda Python distribution,
# ``conda install -c conda-forge 'ffmpeg<6'`` will install # ``conda install 'ffmpeg<4.4'`` will install the required FFmpeg libraries,
# the required libraries. # however, this distribution does not have SDL plugin, so it cannot play
# This distribution, however, does not have SDL plugin, so # video.
# it cannot play video.
# #
###################################################################### ######################################################################
......
...@@ -13,12 +13,14 @@ encode and save audio/video data into various formats/destinations. ...@@ -13,12 +13,14 @@ encode and save audio/video data into various formats/destinations.
# #
# .. note:: # .. note::
# #
# This tutorial requires FFmpeg libraries (>=5.0, <6). # This tutorial requires torchaudio nightly build and FFmpeg libraries (>=4.1, <4.4).
#
# To install torchaudio nightly build, please refer to
# https://pytorch.org/get-started/locally/ .
# #
# There are multiple ways to install FFmpeg libraries. # There are multiple ways to install FFmpeg libraries.
# If you are using Anaconda Python distribution, # If you are using Anaconda Python distribution,
# ``conda install -c conda-forge 'ffmpeg<6'`` will install # ``conda install 'ffmpeg<4.4'`` will install the required FFmpeg libraries.
# the required libraries.
# #
###################################################################### ######################################################################
......
...@@ -32,7 +32,7 @@ cd "${build_dir}" ...@@ -32,7 +32,7 @@ cd "${build_dir}"
# NOTE: # NOTE:
# When changing the version of FFmpeg, update the README so that the link to the source points # When changing the version of FFmpeg, update the README so that the link to the source points
# the same version. # the same version.
curl -LsS -o ffmpeg.tar.gz https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n5.0.3.tar.gz curl -LsS -o ffmpeg.tar.gz https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n4.1.8.tar.gz
tar -xf ffmpeg.tar.gz --strip-components 1 tar -xf ffmpeg.tar.gz --strip-components 1
./configure \ ./configure \
--prefix="${prefix}" \ --prefix="${prefix}" \
...@@ -72,11 +72,11 @@ ls ${prefix}/* ...@@ -72,11 +72,11 @@ ls ${prefix}/*
# macOS: Fix rpath so that the libraries are searched dynamically in user environment. # macOS: Fix rpath so that the libraries are searched dynamically in user environment.
# In Linux, this is handled by `--enable-rpath` flag. # In Linux, this is handled by `--enable-rpath` flag.
if [[ "$(uname)" == Darwin ]]; then if [[ "$(uname)" == Darwin ]]; then
avcodec=libavcodec.59 avcodec=libavcodec.58
avdevice=libavdevice.59 avdevice=libavdevice.58
avfilter=libavfilter.8 avfilter=libavfilter.7
avformat=libavformat.59 avformat=libavformat.58
avutil=libavutil.57 avutil=libavutil.56
otool="/usr/bin/otool" otool="/usr/bin/otool"
# NOTE: miniconda has a version of otool and install_name_tool installed and we want # NOTE: miniconda has a version of otool and install_name_tool installed and we want
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment