Skip to content

Commit 0aaf9a5

Browse files
Remove ffmpeg_utils (#4050)
1 parent a645da6 commit 0aaf9a5

File tree

9 files changed

+3
-546
lines changed

9 files changed

+3
-546
lines changed

docs/source/build.ffmpeg.rst

Lines changed: 0 additions & 473 deletions
This file was deleted.

docs/source/build.jetson.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ Verify the installation by checking the version and CUDA device accessibility.
148148
149149
print(torchaudio.__version__)
150150
151-
torchaudio.utils.ffmpeg_utils.get_build_config()
152-
153151
.. code-block::
154152
155153
2.0.0a0+2ead941

docs/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ model implementations and application components.
4343
build.linux
4444
build.windows
4545
build.jetson
46-
build.ffmpeg
4746

4847
.. toctree::
4948
:maxdepth: 1

docs/source/torchaudio.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ The following table summarizes the backends.
7373
* - 1
7474
- FFmpeg
7575
- Linux, macOS, Windows
76-
- Use :py:func:`~torchaudio.utils.ffmpeg_utils.get_audio_decoders` and
77-
:py:func:`~torchaudio.utils.ffmpeg_utils.get_audio_encoders`
78-
to retrieve the supported codecs.
7976

8077
This backend Supports various protocols, such as HTTPS and MP4, and file-like objects.
8178
* - 3

docs/source/utils.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ torchaudio.utils
88
.. warning::
99
Starting with version 2.8, we are refactoring TorchAudio to transition it
1010
into a maintenance phase. As a result:
11-
- ``sox_utils`` and `ffmpeg_utils`` are deprecated in 2.8 and will be removed in 2.9.
11+
- ``sox_utils`` are deprecated in 2.8 and will be removed in 2.9.
1212
- The decoding and encoding capabilities of PyTorch for both audio and video
1313
are being consolidated into TorchCodec.
1414
Please see https://github.com/pytorch/audio/issues/3902 for more information.
@@ -21,4 +21,3 @@ torchaudio.utils
2121
:template: autosummary/utils.rst
2222

2323
sox_utils
24-
ffmpeg_utils

src/torchaudio/utils/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44

55

66
__all__ = [
7-
"ffmpeg_utils",
87
]

src/torchaudio/utils/ffmpeg_utils.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

test/torchaudio_unittest/common_utils/case_utils.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import torio
1414
from torch.testing._internal.common_utils import TestCase as PytorchTestCase
1515
from torchaudio._internal.module_utils import eval_env, is_module_available
16-
from torchaudio.utils.ffmpeg_utils import get_video_decoders, get_video_encoders
1716

1817

1918
class TempDirMixin:
@@ -245,7 +244,7 @@ def skipIfNoModule(module, display_name=None):
245244
key="ON_PYTHON_310",
246245
)
247246
skipIfNoAudioDevice = _skipIf(
248-
not (_IS_FFMPEG_AVAILABLE and torchaudio.utils.ffmpeg_utils.get_output_devices()),
247+
not _IS_FFMPEG_AVAILABLE,
249248
reason="No output audio device is available.",
250249
key="NO_AUDIO_OUT_DEVICE",
251250
)
@@ -263,16 +262,7 @@ def skipIfNoModule(module, display_name=None):
263262

264263
def skipIfNoHWAccel(name):
265264
key = "NO_HW_ACCEL"
266-
if not _IS_FFMPEG_AVAILABLE:
267-
return _skipIf(True, reason="ffmpeg features are not available.", key=key)
268-
if not torch.cuda.is_available():
269-
return _skipIf(True, reason="CUDA is not available.", key=key)
270-
if torchaudio._extension._check_cuda_version() is None:
271-
return _skipIf(True, "Torchaudio is not compiled with CUDA.", key=key)
272-
if name not in get_video_decoders() and name not in get_video_encoders():
273-
return _skipIf(True, f"{name} is not in the list of available decoders or encoders", key=key)
274-
return _pass
275-
265+
return _skipIf(True, reason="ffmpeg features are not available.", key=key)
276266

277267
def zip_equal(*iterables):
278268
"""With the regular Python `zip` function, if one iterable is longer than the other,

test/torchaudio_unittest/utils/ffmpeg_utils_test.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)