#3900 RuntimeError: Error embedding final dub

175.159* Posted at: 13 hours ago 👁17

Error embedding final dub
Traceback (most recent call last):
File "/Users/nanj/pyvideotrans/videotrans/util/help_ffmpeg.py", line 261, in runffmpeg

subprocess.run(

File "/Users/nanj/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/subprocess.py", line 526, in run

raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'compose1775055474.298529.txt', '-i', 'novoice.mp4', '-i', 'origin_audio.m4a', '-map', '0:v', '-map', '1:a', '-c:v', 'hevc_videotoolbox', '-c:a', 'copy', '-vf', "subtitles=filename='end.ass'", '-movflags', '+faststart', '-q:v', '58', '-t', '70.433000', 'laste_target.mp4']' returned non-zero exit status 8.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/nanj/pyvideotrans/videotrans/util/help_ffmpeg.py", line 261, in runffmpeg

subprocess.run(

File "/Users/nanj/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/subprocess.py", line 526, in run

raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'compose1775055474.298529.txt', '-i', 'novoice.mp4', '-i', 'origin_audio.m4a', '-map', '0:v', '-map', '1:a', '-c:v', 'libx265', '-c:a', 'copy', '-vf', "subtitles=filename='end.ass'", '-movflags', '+faststart', '-crf', '23', '-preset', 'veryfast', '-t', '70.433000', 'laste_target.mp4']' returned non-zero exit status 8.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/nanj/pyvideotrans/videotrans/task/trans_create.py", line 1548, in _join_video_audio_srt

tools.runffmpeg(cmd, cmd_dir=self.cfg.cache_folder, force_cpu=False)

File "/Users/nanj/pyvideotrans/videotrans/util/help_ffmpeg.py", line 302, in runffmpeg

return runffmpeg(fallback_args, noextname=noextname, uuid=uuid, force_cpu=True,cmd_dir=cmd_dir)

File "/Users/nanj/pyvideotrans/videotrans/util/help_ffmpeg.py", line 307, in runffmpeg

raise RuntimeError(err)

RuntimeError: opening output file laste_target.mp4. opening output files: Filter not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/nanj/pyvideotrans/videotrans/task/_only_one.py", line 120, in run

trk.assembling()

File "/Users/nanj/pyvideotrans/videotrans/task/trans_create.py", line 802, in assembling

self._join_video_audio_srt()

File "/Users/nanj/pyvideotrans/videotrans/task/trans_create.py", line 1551, in _join_video_audio_srt

raise RuntimeError(msg)

RuntimeError: Error embedding final dub


=
system:macOS-15.7.4-arm64-arm-64bit
version:v3.98
frozen:False
language:en
root_dir:/Users/nanj/pyvideotrans
Python: 3.10.19 (main, Feb 12 2026, 00:36:33) [Clang 21.1.4 ]

3 Replies

The error "Filter not found" during the final video synthesis is caused by an issue with the subtitle filter in FFmpeg, specifically when embedding ASS format subtitles. This is a common problem on macOS.

Solution:

  1. Ensure FFmpeg is correctly installed and available in your system's PATH. Since you are using macOS, confirm FFmpeg is installed via Homebrew (brew install ffmpeg) and the installation is complete.
  2. Verify FFmpeg supports the libass filter. Run the following command in your terminal:

    ffmpeg -filters | grep subtitles

    If the output shows subtitles (e.g., ... subtitles ...), the filter is available. If not, you may need to reinstall FFmpeg with the --with-libass flag: brew reinstall ffmpeg --with-libass.

  3. Check the ASS subtitle file. The error might be due to a malformed end.ass file. Ensure the file exists in the temporary working directory and is a valid ASS subtitle file.
  4. Try a workaround by disabling hardware encoding. The log shows the software first tried hevc_videotoolbox (macOS hardware encoder) and then fell back to libx265 (software encoder). You can force software encoding from the start to avoid potential hardware encoder/subtitle filter conflicts:

    • In the software's main interface, go to Menu -> Tools/Options -> Advanced Options.
    • Under the Video Output Control section, check the option 强制软编码视频? (Force software encoding?).
    • Retry the translation task.
  5. Simplify the task. As a test, try processing the same video but select 不嵌入字幕 (Do not embed subtitles) in the main interface. If this succeeds, the issue is isolated to the subtitle embedding step.

If the problem persists after these steps, please check the logs/ folder in your software directory for the most recent log file and provide the bottom 30 lines of the error log for further analysis.

请查阅相关文档:

invalid option: --with-libass.

The error occurs because the --with-libass flag is no longer supported in recent versions of Homebrew's FFmpeg formula. The libass library (required for the subtitles filter) is now typically included by default.

The core issue is that FFmpeg on your macOS system lacks the libass library, causing the "Filter not found" error when trying to embed ASS subtitles.

Solution:

  1. Reinstall FFmpeg with the correct formula:
    First, uninstall the current FFmpeg and then reinstall it. The libass dependency should be pulled in automatically.

    brew uninstall ffmpeg
    brew install ffmpeg
  2. Verify FFmpeg installation and subtitle filter:
    After reinstalling, run the following command to confirm the subtitles filter is available:

    ffmpeg -filters | grep subtitles

    You should see an output line containing subtitles.

  3. Force software encoding in pyVideoTrans (Recommended):
    Hardware encoders on macOS (like hevc_videotoolbox) can sometimes have compatibility issues with complex filters like subtitles.

    • In pyVideoTrans, go to Menu -> Tools/Options -> Advanced Options.
    • Under the Video Output Control section, check the option 强制软编码视频? (Force software encoding?).
    • This will use libx264 or libx265 software encoders, which are more compatible with the subtitle filter.
  4. Retry the translation task after making these changes.

If the error persists, please check the logs/ folder in your software directory for the most recent log file and provide the bottom 30 lines of the error log.

请查阅相关文档:

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.

Related resource