#971 Error embedding subtitle dubbing in final step.

92.47* Posted at: 1 month ago 👁88

Error embedding subtitle dubbing in final step.

=====

Windows-10-10.0.19045-SP0

version:v3.81

frozen:True

language:en

3 Replies

This article was replied by gpt-5-mini
Most likely causes: the final "合成" step cannot find or use the generated subtitle (.srt) or dubbing (.wav) files, the chosen subtitle embedding mode (hard‑burn) fails (font/position/encoding issue), or the app path/permissions are invalid. Please try the steps below in order.

1) Verify generated files exist

1.1. Open the software output/project folder and confirm the target-language .srt and the .wav (dubbing) files were produced. If either is missing, the final step will fail.

1.2. If files are missing, re-run the earlier step(s) and watch for errors in logs.

2) Try a different subtitle embedding mode

2.1. In the main UI, change "字幕嵌入" to "软字幕 (soft subtitle)" or "不嵌入" and re-run the final step. If this succeeds, the problem is with hard‑baking subtitles.

2.2. If soft/subtitleless run succeeds, you can then test manual muxing using the “音视频字幕合并” tool in the app.

3) If hard subtitles failed, adjust hard subtitle style

3.1. Menu -> Tools/Options -> Advanced Options -> Hard subtitle style.

3.2. Reduce "硬字幕字体像素" and reduce the "中日韩单行字符数" setting on the main UI.

3.3. Retry the final step.

4) Check installation path and permissions

4.1. Ensure the prepackaged Windows install was extracted to a pure-English path without spaces and not in a system-protected folder (example recommended: D:\videotrans).

4.2. If it’s currently in a path with spaces/Unicode or under Program Files, re-extract to a correct path and run sp.exe again.

5) Verify alignment/timing issues

5.1. If the error is due to audio/subtitle length mismatch, try adjusting "配音加速" or "视频慢速" settings before finalizing so audio and subtitles align.

6) Re-run the final merge via the app’s merge tool

6.1. Use the "音视频字幕合并" function to manually merge the original video, generated .wav and .srt; note any on-screen error text.

7) Collect logs for further diagnosis

7.1. If the above do not fix it, open the software root logs folder: videotrans/logs/

7.2. Attach the most recent log file (named YYYYMMDD.log) or paste the relevant error lines from that file here so I can analyze the exact failure cause.

If you provide (a) the presence/absence of the .srt and .wav files, (b) the result of switching to soft subtitles, and (c) the latest log file from videotrans/logs/, I will give the next precise fix.


==准备要嵌入的字幕:self.cfg.subtitle_type=2
=
2025-11-04 20:57:15,996 - INFO - 最终确定字幕嵌入类型:2 ,目标字幕语言:eng, 字幕文件:C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/en.srt

2025-11-04 20:57:16,000 - INFO -
最终确定的音视频字幕合并命令为:cmd=['-y', '-progress', 'C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/compose1762311435.9964879.txt', '-i', 'C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/novoice.mp4', '-i', 'C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/target.wav', '-i', 'en.srt', '-c:v', 'copy', '-c:a', 'aac', '-c:s', 'mov_text', '-metadata:s:s:0', 'language=eng', '-b:a', '128k', '-movflags', '+faststart', '-crf', '25', '-preset', 'fast', '-shortest', 'C:/Users/UserName/Videos/pyvideotrans/youtube/_video_out/Situation in Pokrovsk and Kupiansk 11-04-2025/Situation in Pokrovsk and Kupiansk 11-04-2025.mp4']

2025-11-04 20:57:16,316 - WARNING - FFmpeg 命令执行失败 (force_cpu=False)。
命令: ffmpeg -hide_banner -ignore_unknown -threads 0 -y -progress C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/compose1762311435.9964879.txt -i C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/novoice.mp4 -i C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/target.wav -i en.srt -c:v copy -c:a aac -c:s mov_text -metadata:s:s:0 language=eng -b:a 128k -movflags +faststart -global_quality 25 -preset veryfast -shortest C:/Users/UserName/Videos/pyvideotrans/youtube/_video_out/Situation in Pokrovsk and Kupiansk 11-04-2025/Situation in Pokrovsk and Kupiansk 11-04-2025.mp4
错误: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/novoice.mp4':
Metadata:

major_brand     : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder         : Lavf62.1.100

Duration: 00:26:13.87, start: 0.033000, bitrate: 1120 kb/s
Stream #0:00x1: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1117 kb/s, 30 fps, 30 tbr, 90k tbn, start 0.033000 (default)

Metadata:
  handler_name    : VideoHandler
  vendor_id       : [0][0][0][0]

[in#1 @ 00000177619d06c0] Error opening input: No such file or directory
Error opening input file C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/target.wav.
Error opening input files: No such file or directory

2025-11-04 20:57:16,316 - WARNING - 硬件加速失败,将自动回退到 CPU 编码重试...
2025-11-04 20:57:16,482 - WARNING - FFmpeg 命令执行失败 (force_cpu=True)。
命令: ffmpeg -hide_banner -ignore_unknown -threads 0 -y -progress C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/compose1762311435.9964879.txt -i C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/novoice.mp4 -i C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/target.wav -i en.srt -c:v copy -c:a aac -c:s mov_text -metadata:s:s:0 language=eng -b:a 128k -movflags +faststart -crf 25 -preset fast -shortest C:/Users/UserName/Videos/pyvideotrans/youtube/_video_out/Situation in Pokrovsk and Kupiansk 11-04-2025/Situation in Pokrovsk and Kupiansk 11-04-2025.mp4
错误: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/novoice.mp4':
Metadata:

major_brand     : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder         : Lavf62.1.100

Duration: 00:26:13.87, start: 0.033000, bitrate: 1120 kb/s
Stream #0:00x1: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1117 kb/s, 30 fps, 30 tbr, 90k tbn, start 0.033000 (default)

Metadata:
  handler_name    : VideoHandler
  vendor_id       : [0][0][0][0]

[in#1 @ 00000256add591c0] Error opening input: No such file or directory
Error opening input file C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/target.wav.
Error opening input files: No such file or directory

The error is clear: FFmpeg cannot find the dubbing audio file target.wav at the specified path. The file C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/target.wav does not exist.

Solution:

  1. Check the temporary folder:
    Navigate to C:/Users/UserName/Source/Util/VideoDubbing/pyvideotrans/tmp21600/4cd81ff7ef/ and verify if target.wav exists.
  2. If the file is missing:
    This indicates the dubbing (TTS) step failed or was interrupted. You need to re-run the dubbing process:

    • Go back to the main interface.
    • Use the "批量为字幕配音" function.
    • Load your source language subtitle file and the target language subtitle file.
    • Configure the TTS settings and generate the dubbing audio again.
  3. After generating the audio:
    Once target.wav is successfully created in the temporary folder, you can either:

    • Re-run the full translation process from the beginning, or
    • Use the "音视频字幕合并" tool to manually merge the original video (novoice.mp4), the new target.wav, and the target subtitle file (en.srt).

The core issue is that the final synthesis step is trying to use a dubbing file that was never created or was deleted.

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions