#8855 the function is not working Re-embed BGM

85.206**3 Posted at: 10 hours ago

the function is not working Re-embed BGM

3 Replies

#1 DeepSeek reply at 10 hours ago

"Re-embed BGM" (Re-embed BGM) does not generate the background audio by itself — it only mixes back an already existing instrument.wav. If that file was not produced (you did not check Separate Vocal/BGM) and was not placed manually, the option has nothing to mix in and appears to "do nothing".

Check in this order:

  1. Open More Settings.. and confirm both Separate Vocal/BGM and Re-embed BGM are checked — Re-embed BGM alone has no source audio.
  2. Confirm dubbing is actually enabled (a voice is selected in Voices); with No voice there is no new audio track to mix BGM into.
  3. Run one video, then open the result folder _video_out/{video name}-{ext}/ (e.g. _video_out/001-mp4/) and verify instrument.wav exists. If it is missing, vocal separation failed — check the log for the separation step.
  4. Check BGM Volume. It is a 0.0–2.0 multiplier; at or near 0 the BGM is effectively silent. Set it to 0.8–1.0.
  5. If the dubbing is longer than the background audio, check Extend BGM / Loop BGM — otherwise the tail has no BGM.

If you are supplying your own background audio instead of using the built-in separation:

  1. Name the files exactly vocal.wav (vocals) and instrument.wav (BGM), WAV format.
  2. Copy both into _video_out/{video name}-{ext}/ next to the source video's output folder.
  3. Do not check Clear Output, or those files are deleted before use.
  4. Keep Separate Vocal/BGM and Re-embed BGM checked.

Note the built-in separation runs on CPU only and is slow; GPU-based separation with a third-party tool (e.g. UVR5) is faster for the same result.

If instrument.wav exists, volume is non-zero, and the output video still has no background sound, the cause cannot be determined from this description. Provide the software version, whether it is the Windows pre-packaged build or source deployment, and the last ~30 lines of the latest file in the logs/ folder.

Please refer to the related documentation:

#2 85.206**3 reply at 9 hours ago

Selected Separate Vocal/BGM, Model:spleeter,Selected Re-embed BGM, Background Audio Volume Multiplier:0.8, Loop BGM
self.cfg=TaskCfgVTT(uuid='ff3f01265b', name='C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/1. Teacher and Course.mp4', dirname='C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction', noextname='1. Teacher and Course', basename='1. Teacher and Course.mp4', ext='mp4', target_dir='C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/_video_out/1. Teacher and Course-mp4', cache_folder='D:/win-pyvideotrans-v4.18/tmp/15972/ff3f01265b', is_cuda=False, source_language='English', source_language_code='en', source_sub='C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/_video_out/1. Teacher and Course-mp4/en.srt', source_wav='D:/win-pyvideotrans-v4.18/tmp/15972/ff3f01265b/en.wav', source_wav_output='C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/_video_out/1. Teacher and Course-mp4/en.m4a', target_language='Russian', target_language_code='ru', target_sub='C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/_video_out/1. Teacher and Course-mp4/ru.srt', target_wav='D:/win-pyvideotrans-v4.18/tmp/15972/ff3f01265b/target.wav', target_wav_output='C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/_video_out/1. Teacher and Course-mp4/ru.m4a', translate_type=9, tts_type=24, volume='
......
rans-v4.18/tmp/15972/ff3f01265b/faster-en-1795085925.813831.log', 'is_cuda': False, 'no_speech_threshold': 0.6, 'threshold': 0.45, 'condition_on_previous_text': False, 'audio_file': 'D:/win-pyvideotrans-v4.18/tmp/15972/ff3f01265b/en.wav', 'local_dir': 'D:/win-pyvideotrans-v4.18/models/models--Systran--faster-whisper-large-v3', 'compute_type': 'default', 'jianfan': False, 'audio_duration': 53174, 'hotwords': '', 'prompt': '', 'beam_size': 5, 'best_of': 5, 'temperature': '0.0', 'repetition_penalty': 1.0, 'compression_ratio_threshold': 2.4, 'max_speech_ms': 5000, 'min_speech_ms': 3000, 'min_silence_duration_ms': 600, 'uuid': 'ff3f01265b', 'subtitle_srt': 'D:/win-pyvideotrans-v4.18/tmp/faster-20261119-13_58_45.srt', 'device_index': 0, 'raw_device_name': 'cuda', 'device_name': 'cuda'}
kwargs={'detect_language': 'en', 'model_name': 'large-v3', 'logs_file': 'D:/win-pyvideotrans-v4.18/tmp/15972/ff3f01265b/faster-en-1795085925.813831.log', 'is_cuda': False, 'no_speech_threshold': 0.6, 'threshold': 0.45, 'condition_on_previous_text': False, 'audio_file': 'D:/win-pyvideotrans-v4.18/tmp/15972/ff3f01265b/en.wav', 'local_dir': 'D:/win-pyvideotrans-v4.18/models/models--Systran--faster-whisper-large-v3', 'compute_type': 'default', 'jianfan': False, 'audio_duration': 53174, 'hotwords': '', 'prompt': '', 'beam_size': 5, 'best_of': 5, 'temperature': '0.0', 'repetition_penalty': 1.0, 'compression_ratio_threshold': 2.4, 'max_speech_ms': 5000, 'min_speech_ms': 3000, 'min_silence_duration_ms': 600, 'uuid': 'ff3f01265b', 'subtitle_srt': 'D:/win-pyvideotrans-v4.18/tmp/faster-20261119-13_58_45.srt', 'device_index': 0, 'raw_device_name': 'cuda', 'device_name': 'cuda'}
[DEBUG] 开始加载 faster-whisper模型large-v3,数据类型:default
[DEBUG] [faster_whisper] 加载模型large-v3: is_cuda=False,raw_device='cuda', running on cuda,_compute_type='default'
[DEBUG] 直接传递完整音频,由faster-whisper内部VAD处理,返回字级时间戳数据
[DEBUG] faster-whisper模式下,对large-v3模型返回的字级时间戳进行断句
[DEBUG] 由字级时间戳重新断句完毕
[DEBUG] faster-whisper下已临时保存识别结果到 D:/win-pyvideotrans-v4.18/tmp/faster-20261119-13_58_45.srt,防止进程崩溃后永久等待
[DEBUG] [新进程任务 title='Model: large-v3'] 已返回
[DEBUG] [新进程任务 结束:title='Model: large-v3'],耗时10.105443954467773s

[DEBUG] 字幕翻译前参数:[{'source_code': 'English'}, {'target_code': 'Russian'}, {'common_target_code': 'ru'}, {'uuid': 'ff3f01265b'}, {'is_test': False}, {'is_cuda': False}, {'translate_type': 9}]

[DEBUG] 以SRT字幕块翻译,每次翻译 40 条字幕块,翻译后暂停0.0s
[DEBUG] 本次跳过翻译,使用缓存
[DEBUG] 原始字幕行数:10, 翻译后行数:10
[DEBUG] 原始语言字幕和目标语言字幕行数一致,均为 source_len=10

[DEBUG] line_roles={}
[DEBUG] 文字配音前参数:[{'language': 'ru'}, {'uuid': 'ff3f01265b'}, {'play': False}, {'tts_type': 24}, {'is_cuda': False}, {'is_redubb': False}, {'model_name': None}]
[DEBUG] self.volume='+0%', self.rate='+0%', self.pitch='+0Hz'

[DEBUG] 设定配音最大线程数: 4,实际 4 线程配音, 待配音字幕长度: 10
[DEBUG] 本次 OpenAI TTS 配音成功 10 个,失败 0 个
[DEBUG] 配音结束后,移除原始字幕中所有标点

[DEBUG] 开始语音视频字幕对齐处理:音频加速=False, 视频慢速=False
[DEBUG] 未选中任何变速,进入普通拼接模式。
[DEBUG] 音频片段连接后,实际时长 53160ms, 已生成到: D:/win-pyvideotrans-v4.18/tmp/15972/ff3f01265b/target.wav

[DEBUG] 合并背景音 beishu=1,atime=53173,vtime=53159
[DEBUG] 最终合并视频前:音频时长 53160ms, 视频时长: 53160ms
[DEBUG] 当前原始视频是标准264, 输出也是264,未视频慢速,未嵌入硬字幕,实现无损输出。
[DEBUG] 上次缓存的编码器:app_cfg.codec_cache={'Windows-264': 'h264_nvenc', 'Windows-265': 'hevc_nvenc'}
[DEBUG] 返回缓存的编解码器 Windows-264: h264_nvenc
[DEBUG] [最终视频合成]copy模式,无需重新编码:
['-y', '-progress', 'compose1795085938.078906.txt', '-i', 'novoice.mp4', '-i', 'will_embed.m4a', '-map', '0:v', '-map', '1:a', '-c:v', 'copy', '-c:a', 'copy', '-movflags', '+faststart', 'laste_target.mp4']

#3 DeepSeek reply at 9 hours ago

The BGM merge step did run — the log confirms 合并背景音 beishu=1,atime=53173,vtime=53159 followed by the final mux of will_embed.m4a. So "Re-embed BGM" is not silently skipping; the problem is the source BGM it mixed in: instrument.wav is missing/empty/silent, or the volume multiplier was applied wrong (log shows beishu=1, not the 0.8 you set).

Check in this order:

  1. Verify the separation output. Open C:/Users/makar/Videos/HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/_video_out/1. Teacher and Course-mp4/ and play instrument.wav. If it does not exist or is silent, vocal separation failed and there was nothing to re-embed.
  2. The model name "spleeter" is not a documented vocal-separation model. The documented ones are dpdfnet2.onnx (default, CPU), dpdfnet8.onnx (slower, slightly higher quality) and, via audio.cpp, zipenhancer / mel_band_roformer (GPU). Go to Menu -> Tools/Options -> Advanced Options -> General -> Vocal Separation Model and pick one of those instead; an unsupported/mismatched model fails the separation stage without a clear message.
  3. Rename the input file. 1. Teacher and Course.mp4 sits under a deep path with spaces, dots and underscores (HS-226_MOPs Motion_Operators_for_Houdini/01_Introduction/). Windows command-line paths over 260 characters and names containing spaces/dots/emoji frequently break FFmpeg sub-steps. Move it to a shallow ASCII path, e.g. D:/videos/lesson1.mp4, with no leading number+dot and no spaces.
  4. Re-run with Clear Output checked so the stale instrument.wav/will_embed.m4a from this run are discarded. Keep Separate Vocal/BGM and Re-embed BGM both checked — Re-embed BGM alone has no source audio.
  5. Re-apply the BGM volume. The log records beishu=1 although you set 0.8, so the multiplier was not carried over. Open More Settings, re-set Background Audio Volume Multiplier to ~0.8–1.0 and confirm it persists before starting.

Alternative (fastest, GPU-accelerated): separate the audio externally with a third-party tool such as UVR5, then place the results in the output folder as exactly vocal.wav and instrument.wav (WAV format), keeping Separate Vocal/BGM + Re-embed BGM checked and Clear Output unchecked.

If instrument.wav exists, plays correctly, and the final video still has no background sound, the cause cannot be determined from this excerpt — the pasted log begins at the recognition stage and contains no separation-stage lines (and the cfg dump is truncated, so is_separate is unverifiable). Provide the last ~30 lines of the latest file in logs/ covering the preparation/separation stage, plus confirmation that is_separate=True in cfg.

Please refer to the related documentation:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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 via ko-fi.com

Related resource