#7111 non-negative timestamp expected:Traceback (most recent call last): File

200.195**8 Posted at: 1 hour ago

non-negative timestamp expected:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 118, in faster_whisper
File "faster_whisper\transcribe.py", line 460, in transcribe
File "faster_whisper\utils.py", line 124, in format_timestamp
AssertionError: non-negative timestamp expected

speech_timestamps=[[0, 1152], [1152, 5232], [5232, 9616], [9616, 13840], [13840, 18064], [18064, 22288], [22288, 26512], [26512, 30736], [30736, 34960], [34960, 39184], [39184, 43008], [43008, 45328], [45328, 49680], [49680, 54016], [54016, 58352], [58352, 61712], [61712, 65648], [65648, 68208], [68208, 70304], [70304, 74800], [74800, 75168], [75168, 79488], [79488, 83728], [83728, 84240], [84240, 88656], [88656, 88928], [88928, 93264], [93264, 97488], [97488, 100752], [100752, 102352], [102352, 106704], [106704, 110928], [110928, 112064], [112064, 116400], [116400, 116928], [116928, 121296], [121296, 124432], [124432, 128720], [128720, 132944], [132944, 137168], [137168,
......
gative timestamp expected

speech_timestamps=[[0, 1152], [1152, 5232], [5232, 9616], [9616, 13840], [13840, 18064], [18064, 22288], [22288, 26512], [26512, 30736], [30736, 34960], [34960, 39184], [39184, 43008], [43008, 45328], [45328, 49680], [49680, 54016], [54016, 58352], [58352, 61712], [61712, 65648], [65648, 68208], [68208, 70304], [70304, 74800], [74800, 75168], [75168, 79488], [79488, 83728], [83728, 84240], [84240, 88656], [88656, 88928], [88928, 93264], [93264, 97488], [97488, 100752], [100752, 102352], [102352, 106704], [106704, 110928], [110928, 112064], [112064, 116400], [116400, 116928], [116928, 121296], [121296, 124432], [124432, 128720], [128720, 132944], [132944, 137168], [137168, 141472], [141472, 142768], [142768, 147264], [147264, 147616], [147616, 151840], [151840, 156336], [156336, 160208], [160208, 163520], [163520, 167824], [167824, 169840], [169840, 173856], [173856, 178160], [178160, 180528], [180528, 184528], [184528, 188896], [188896, 193296], [193296, 197520], [197520, 201744], [201744, 203856], [203856, 208176], [208176, 212400], [212400, 216624], [216624, 217664], [217664, 220915]]

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/JOHN/Videos/Python Django MasterClass/1. Projeto 1/18. How Django URL Patterns Work Internally.mp4,
输出结果保存到文件夹: C:/Users/JOHN/Videos/Python Django MasterClass/1. Projeto 1/D/18. How Django URL Patterns Work Internally-mp4,
临时文件夹: C:/Users/JOHN/Documents/DUBLADOR/win-pyvideotrans-v4.09/tmp/14496/d0583504a8
已选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), large-v3-turbo, 发音语言: English, 断句方式:默认断句
TranslateSrt:Microsoft Translate (Free),原始语言:English,目标语言:Portuguese, 未选 SendSRT
TTS Service:Edge-TTS (Free), 角色:Antonio(Male/BR), 配音语言:Portuguese, 未选 二次语音识别
音量:+0%, 语速:-10%, 未选 音频加速, 未选 视频慢速
未选 移除字幕间空隙, 未选 强制对齐字幕和声音
字幕: No Subtitles


=
system:Windows-10-10.0.19045-SP0
version:v4.09
frozen:True
language:en
root_dir:C:/Users/JOHN/Documents/DUBLADOR/win-pyvideotrans-v4.09

1 Replies

#1 DeepSeek reply at 1 hour ago

This error is caused by a known VAD (Voice Activity Detection) timestamp generation bug in faster-whisper on pyVideoTrans v4.09. The speech_timestamps list you see contains segments where the end time is slightly after the start time, but some internal calculation generates a negative timestamp during transcription, triggering AssertionError: non-negative timestamp expected inside format_timestamp.

This specific issue has been addressed in newer versions through optimization of the VAD segmentation algorithm and removal of the problematic pre-splitting logic.

Immediate fix

  1. Upgrade to the latest version (v4.12) — the VAD cut algorithm was optimized and related bugs were fixed. Download the full package or patch from the official site and overwrite your current installation. Your settings in videotrans/params.json and videotrans/cfg.json will be preserved.
  2. Rename the input video to a simple English name with no spaces or special characters, e.g. django_lesson_18.mp4, and place it in a shallow path like D:/videos/. The current path C:/Users/JOHN/Videos/Python Django MasterClass/1. Projeto 1/18. How Django URL Patterns Work Internally.mp4 contains spaces and periods that can cause parsing issues.
  3. If you cannot upgrade immediately, try these workarounds:

    • In 菜单 → 工具 → 高级选项 → 语音识别参数, increase the 静音分割持续毫秒 value (e.g. from 500 to 1000) to reduce VAD segment count.
    • Switch the model from large-v3-turbo to medium or small — the turbo model is more prone to this bug.
    • Temporarily uncheck CUDA加速 and rerun to confirm whether the GPU path triggers the bug.
  4. Clear the cache before retrying: delete the contents of the tmp/ folder in the software root, and ensure 清理已生成 is checked at the start (your log shows it already is).

If the error persists after upgrading to v4.12, please provide the full log from logs/ (the latest date .log file) — copy the bottom 30 lines of the traceback so I can analyze further.

请查阅相关文档:

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