#5149 [end of libtorchcodec loading traceback].

38.75* Posted at: 9 hours ago

Audio denoising processing failed: Could not load libtorchcodec. Likely causes:

      1. FFmpeg is not properly installed in your environment. We support
         versions 4, 5, 6, 7, and 8, and we attempt to load libtorchcodec
         for each of those versions. Errors for versions not installed on
         your system are expected; only the error for your installed FFmpeg
         version is relevant. On Windows, ensure you've installed the
         "full-shared" version which ships DLLs.
      2. The PyTorch version (2.11.0+cu128) is not compatible with
         this version of TorchCodec. Refer to the version compatibility
         table:
         https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec.
      3. Another runtime dependency; see exceptions below.

    The following exceptions were raised as we tried to load libtorchcodec:
    

[start of libtorchcodec loading traceback]
FFmpeg
......
leNotFoundError: Could not find module 'E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core7.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\VoxCPM\python\lib\site-packages\torchcodec\_internally_replaced_utils.py", line 93, in load_torchcodec_shared_libraries

torch.ops.load_library(core_library_path)

File "E:\VoxCPM\python\lib\site-packages\torch\_ops.py", line 1505, in load_library

raise OSError(f"Could not load this library: {path}") from e

OSError: Could not load this library: E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core7.dll

FFmpeg version 6:
Traceback (most recent call last):
File "E:\VoxCPM\python\lib\site-packages\torch\_ops.py", line 1503, in load_library

ctypes.CDLL(path)

File "E:\VoxCPM\python\lib\ctypes\__init__.py", line 374, in init

self._handle = _dlopen(self._name, mode)

FileNotFoundError: Could not find module 'E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core6.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\VoxCPM\python\lib\site-packages\torchcodec\_internally_replaced_utils.py", line 93, in load_torchcodec_shared_libraries

torch.ops.load_library(core_library_path)

File "E:\VoxCPM\python\lib\site-packages\torch\_ops.py", line 1505, in load_library

raise OSError(f"Could not load this library: {path}") from e

OSError: Could not load this library: E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core6.dll

FFmpeg version 5:
Traceback (most recent call last):
File "E:\VoxCPM\python\lib\site-packages\torch\_ops.py", line 1503, in load_library

ctypes.CDLL(path)

File "E:\VoxCPM\python\lib\ctypes\__init__.py", line 374, in init

self._handle = _dlopen(self._name, mode)

FileNotFoundError: Could not find module 'E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core5.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\VoxCPM\python\lib\site-packages\torchcodec\_internally_replaced_utils.py", line 93, in load_torchcodec_shared_libraries

torch.ops.load_library(core_library_path)

File "E:\VoxCPM\python\lib\site-packages\torch\_ops.py", line 1505, in load_library

raise OSError(f"Could not load this library: {path}") from e

OSError: Could not load this library: E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core5.dll

FFmpeg version 4:
Traceback (most recent call last):
File "E:\VoxCPM\python\lib\site-packages\torch\_ops.py", line 1503, in load_library

ctypes.CDLL(path)

File "E:\VoxCPM\python\lib\ctypes\__init__.py", line 374, in init

self._handle = _dlopen(self._name, mode)

FileNotFoundError: Could not find module 'E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core4.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\VoxCPM\python\lib\site-packages\torchcodec\_internally_replaced_utils.py", line 93, in load_torchcodec_shared_libraries

torch.ops.load_library(core_library_path)

File "E:\VoxCPM\python\lib\site-packages\torch\_ops.py", line 1505, in load_library

raise OSError(f"Could not load this library: {path}") from e

OSError: Could not load this library: E:\VoxCPM\Python\Lib\site-packages\torchcodec\libtorchcodec_core4.dll
[end of libtorchcodec loading traceback].


=
system:Windows-10-10.0.26200-SP0
version:v4.01
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v4.01-0602

1 Replies

这是 TorchCodec 加载 FFmpeg 动态库失败导致的,核心原因是 Windows 系统上的 FFmpeg 未安装 “full-shared” 版本(仅带了 exe 可执行文件,缺少运行时 DLL),或者 TorchCodec 版本与当前 PyTorch 2.11.0 不兼容。

解决方案:

  1. 安装 FFmpeg full-shared 版本

    • FFmpeg 官方 下载 ffmpeg-release-full-shared.7z
    • 解压后将 bin 目录(包含 avcodec-*.dllavformat-*.dll 等)添加到系统 PATH 环境变量中,重启软件
  2. 检查 TorchCodec 与 PyTorch 版本兼容性

  3. 临时绕过(不推荐长期)

    • 在软件主界面取消勾选 “降噪”设置更多参数 中的降噪选项),可跳过该错误继续执行其他任务。

如果上述步骤后仍报错,请提供 logs/ 目录下的最新完整日志文件(约末尾30行)以便进一步分析。

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update. Dondate: ko-fi.com/jianchang512

Related resource

Similar issues already exist