#8703 Error during subtitle translation stage [Local LLM (OpenAI-compatible)] Translation returned empty outputself=[LocalLLM]

2a01**6a0c Posted at: 22 hours ago

Error during subtitle translation stage [Local LLM (OpenAI-compatible)] Translation returned empty output
self=[LocalLLM]: uuid='82bdb98da9', proxy_str=None, translate_type=9, is_test=False, source_code='Simplified Chinese', target_code='French', common_target_code='fr', api_url='http://localhost:11434/v1', model_name='qwen3.5:9b', trans_thread=40, wait_sec=0.0, local_dir=None, is_cuda=False, aisendsrt=True, ainame='localllm', temperature=0.1, max_tokens=8192, reasoning_effort=None, extra_body=None
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 113, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 82, in run
File "videotrans\translator\_base.py", line 167, in _run_srt
videotrans.configure.excepts.TranslateSrtError: Translation returned empty output
self=[LocalLLM]: uuid='82bdb98da9', proxy_str=None, translate_type=9, is_test=False, source_code='Simplified Chinese', target_code='French', common_target_code='fr', api_url='http://localhost:11434/v1', model_name='qwen3.5:9b', trans_thread=40, wait_sec=0.0, local_dir=None, is_cuda=False, aisendsrt=True, ainame='localllm', temperature=0.1, max_tokens=8192, reasoning_effort=None, extra_body=None

trk=Translation V/A 单视频模式
Select Media File: C:/Users/moi/Downloads/youtube-video.mp4,
Output Directory: C:/Users/moi/Downloads/_video_out/youtube-video-mp4,
self.cfg.cache_folder='C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106/tmp/25744/82bdb98da9'
Selected Clear Output, Not-Selected Enable CUDA
STT Service:faster-whisper(Built-in), large-v3-turbo, Spoken: Simplified Chinese
Max Speech Duration (s): 5s
Min Speech Duration (ms): 3000ms
Min Silence Duration for Split (ms): 600ms
VAD Speech Threshold: 0.45
VAD Engine: silero
Compute Type:default
Beam Size:5
Best Of:5
Condition on Previous Text:False
Repetition Penalty:1.0
Compression Ratio Threshold:2.4
TranslateSrt:Local LLM (OpenAI-compatible),Spoken:Simplified Chinese,Target:French
Selected SendSRT, AI Translation Batch Size (Lines):40
TTS Service:Edge-TTS (Free), Voices:Antoine(Male/CA), Target:French
Volume:+0%, Speed:+0%, Selected TTS Speedup, Not-Selected Slow Video
Selected Trim Start/End Silence in Dubbed Segments
Silence Removal Intensity: default
Soft Subtitles
Selected Output MP4 Only
video duration:39320ms
video information:{'video_fps': 25.0, 'r_frame_rate': 25.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 640, 'height': 360, 'time': 39320, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='82bdb98da9', name='C:/Users/moi/Downloads/youtube-video.mp4', dirname='C:/Users/moi/Downloads', noextname='youtube-video', basename='youtube-video.mp4', ext='mp4', target_dir='C:/Users/moi/Downloads/_video_out/youtube-video-mp4', cache_folder='C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106/tmp/25744/82bdb98da9', is_cuda=False, source_language='Simplified Chinese', source_language_code='zh-cn', source_sub='C:/Users/moi/Downloads/_video_out/youtube-video-mp4/zh-cn.srt', source_wav='C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106/tmp/25744/82bdb98da9/zh-cn.wav', source_wav_output='C:/Users/moi/Downloads/_video_out/youtube-video-mp4/zh-cn.m4a', target_language='French', target_language_code='fr', target_sub='C:/Users/moi/Downloads/_video_out/youtube-video-mp4/fr.srt', target_wav='C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106/tmp/25744/82bdb98da9/target.wav', target_wav_output='C:/Users/moi/Downloads/_video_out/youtube-video-mp4/fr.m4a', translate_type=9, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Antoine(Male/CA)', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='zh', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='C:/Users/moi/Downloads/_video_out/youtube-video-mp4/youtube-video.mp4', novoice_mp4='C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106/tmp/25744/82bdb98da9/novoice.mp4', is_separate=False, embed_bgm=True, instrument='C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106/tmp/25744/82bdb98da9/instrument.wav', vocal='C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106/tmp/25744/82bdb98da9/vocal.wav', clear_cache=True, background_music='', subtitle_type=2, only_out_mp4=True, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=39320


=
system:Windows-10-10.0.26300-SP0
version:v4.18
frozen:True
language:en_US
root_dir:C:/Users/moi/Downloads/win-pyvideotrans-v4.18-1106

1 Replies

#1 DeepSeek reply at 22 hours ago

This is caused by a local small model (9B) being unable to reliably return output that follows the format required by the prompt — combined with the settings SendSRT + AI Translation Batch Size 40 + trans_thread=40, the model either exhausted max_tokens=8192 on thinking/reasoning and returned nothing, or returned text that could not be parsed as valid SRT, so the result was treated as empty output.

Handling steps (in this order):

  1. Turn off thinking mode. Open Menu → Translation Settings → LocalLLM (OpenAI-compatible), set Thinking Depth / reasoning to none (the default default does not pass thinking parameters, so the model decides on its own; Qwen3-series models will consume all of max_tokens). If the interface does not allow turning it off for this model, raise the channel's max output tokens instead.
  2. Uncheck SendSRT first to force plain-text, line-by-line submission; this is the most reliable mode for local small models. If you must keep SRT mode, reduce Advanced Options → Subtitle Translation → AI Translation Batch Size (Lines) from 40 to 1–5.
  3. Reduce concurrency. Set the translation concurrency (trans_thread) to 1 — Ollama processes requests serially, so 40 concurrent requests will time out or return empty responses.
  4. Trim the prompt. If you use SendSRT, edit software directory/videotrans/prompts/srt/localllm.txt; if not, edit software directory/videotrans/prompts/text/localllm.txt. Local 7B–9B models have weak instruction-following ability and can easily output irrelevant text or XML tags; simplify the prompt. Do not modify or delete content wrapped in {}; these are variables that the program replaces automatically.
  5. Verify the service itself can handle it: send a direct request to http://localhost:11434/v1 with the same model name to confirm it is available and is not truncated by an output length limit configured in Ollama (for example, an excessively small num_predict).
  6. Clear the cache and retry: delete the files under software directory/tmp/translate_cache/, and check Clear Output on the main interface before running again.

If the problem persists after the above, switch the translation channel to DeepSeek (with a very low charge) or another online flagship model; a locally deployed 9B model has limited ability to output stable SRT format.

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