You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BC-breaking] Update pre-built ffmpeg4 to 4.4.4 (#3561)
Summary:
In #3460, we switched the build process for FFmpeg extension.
Since it is complicated to install FFmpeg in some environments, at build time, pre-built binaries and its headers
are downloaded and used as a scaffolding for torchaudio build.
Now even though we did not change any code or FFmpeg version, it turned out that this causes segmentation
fault on Ubuntu when using system Python and FFmpeg 4.4 installed via aptitude.
While investigating the issue, I swapped the said pre-built FFmpeg scaffolding with FFmpeg 4.4 from aptitude,
and the segmentation fault did not happen. This indicates that it is binary compatibility issue.
Before #3460, each binary build job was building FFmpeg 4.1.8 using the same compiler used to build torchaudio,
but after #3460 the environments to build FFmpeg 4.1.8 and torchaudio are different. My hypothesis is that
this difference is causing some ABI incompatibility when linking against FFmpeg 4.4. (Also, I don't remember well,
but I read somewhere that 4.4 has a different ABI)
Through experiments, it turned out upgrading the pre-built FFmpeg scaffolding to 4.4 resolves this.
So this commit upgrade the pre-built FFmpeg 4 to 4.4.
The potential (yet unconfirmed) downside is that torchaudio will no longer work with 4.1, 4.2, and 4.3.
Since FFmpeg 4.4 is what Ubuntu 20.04 and 22.04 support by default, and Google Colab is also on 20.04,
I think it is more important to support 4.4.
Therefore we drop the support for 4.1-4.3 from normal build (and official distributions). Those who wish to
use 4.1-4.3 can build torchaudio from source by linking to specific FFmpeg.
Pull Request resolved: #3561
Reviewed By: hwangjeff
Differential Revision: D48340201
Pulled By: mthrok
fbshipit-source-id: 7ece82910f290c7cf83f58311c4cf6a384e8795e
Copy file name to clipboardExpand all lines: docs/source/installation.rst
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Please refer to https://pytorch.org/get-started/locally/ for the details.
16
16
each of which requires a corresponding PyTorch distribution.
17
17
18
18
.. note::
19
-
This software was compiled against an unmodified copies of FFmpeg, with the specific rpath removed so as to enable the use of system libraries. The LGPL source can be downloaded from the following locations: `n4.1.8 <https://github.com/FFmpeg/FFmpeg/releases/tag/n4.1.8>`__ (`license <https://github.com/FFmpeg/FFmpeg/blob/n4.1.8/COPYING.LGPLv2.1>`__), `n5.0.3 <https://github.com/FFmpeg/FFmpeg/releases/tag/n5.0.3>`__ (`license <https://github.com/FFmpeg/FFmpeg/blob/n5.0.3/COPYING.LGPLv2.1>`__) and `n6.0 <https://github.com/FFmpeg/FFmpeg/releases/tag/n6.0>`__ (`license <https://github.com/FFmpeg/FFmpeg/blob/n6.0/COPYING.LGPLv2.1>`__).
19
+
This software was compiled against an unmodified copies of FFmpeg, with the specific rpath removed so as to enable the use of system libraries. The LGPL source can be downloaded from the following locations: `n4.1.8 <https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.4>`__ (`license <https://github.com/FFmpeg/FFmpeg/blob/n4.4.4/COPYING.LGPLv2.1>`__), `n5.0.3 <https://github.com/FFmpeg/FFmpeg/releases/tag/n5.0.3>`__ (`license <https://github.com/FFmpeg/FFmpeg/blob/n5.0.3/COPYING.LGPLv2.1>`__) and `n6.0 <https://github.com/FFmpeg/FFmpeg/releases/tag/n6.0>`__ (`license <https://github.com/FFmpeg/FFmpeg/blob/n6.0/COPYING.LGPLv2.1>`__).
20
20
21
21
Dependencies
22
22
------------
@@ -25,18 +25,28 @@ Dependencies
25
25
26
26
Please refer to the compatibility matrix bellow for supported PyTorch versions.
27
27
28
+
.. _optional_dependencies:
29
+
28
30
Optional Dependencies
29
31
~~~~~~~~~~~~~~~~~~~~~
30
32
33
+
.. _ffmpeg:
34
+
31
35
* `FFmpeg <https://ffmpeg.org>`__
32
36
33
37
Required to use :py:mod:`torchaudio.io` module. and ``backend="ffmpeg"`` in
34
38
`I/O functions <./torchaudio.html#i-o>`__.
35
39
36
40
Starting version 2.1, TorchAudio official binary distributions are compatible with
37
-
FFmpeg version 6, 5 and 4. At runtime, TorchAudio first looks for FFmpeg 6,
41
+
FFmpeg version 6, 5 and 4. (>=4.4, <7). At runtime, TorchAudio first looks for FFmpeg 6,
38
42
if not found, then it continues to looks for 5 and move on to 4.
39
43
44
+
There are multiple ways to install FFmpeg libraries.
45
+
Please refer to the official documentation for how to install FFmpeg.
46
+
If you are using Anaconda Python distribution,
47
+
``conda install -c conda-forge 'ffmpeg<7'`` will install
48
+
compatible FFmpeg libraries.
49
+
40
50
If you need to specify the version of FFmpeg TorchAudio searches and links, you can
41
51
specify it via the environment variable ``TORCHAUDIO_USE_FFMPEG_VERSION``. For example,
42
52
by setting ``TORCHAUDIO_USE_FFMPEG_VERSION=5``, TorchAudio will only look for FFmpeg
@@ -46,6 +56,11 @@ Optional Dependencies
46
56
the FFmpeg integration entirely by setting the environment variable
47
57
``TORCHAUDIO_USE_FFMPEG=0``.
48
58
59
+
There are multiple ways to install FFmpeg libraries.
60
+
If you are using Anaconda Python distribution,
61
+
``conda install -c conda-forge 'ffmpeg<7'`` will install
62
+
compatible FFmpeg libraries.
63
+
49
64
.. note::
50
65
51
66
When searching for FFmpeg installation, TorchAudio looks for library files
0 commit comments