#1202 识别只用了64秒,我却等了很久快半小时感觉.....什么问题啊

2405:9800* Posted at: 2 days ago 👁22

2025-10-29 09:59:31,916 - VideoTrans - INFO - 平台: Windows。正在按优先级检测最佳的 'h264' 编码器: ['nvenc', 'qsv', 'amf']
2025-10-29 09:59:34,625 - VideoTrans - INFO - PyTorch 报告 CUDA 不可用,跳过 nvenc 测试。
2025-10-29 09:59:34,625 - VideoTrans - INFO - 正在尝试测试编码器: h264_qsv...
2025-10-29 09:59:36,139 - VideoTrans - WARNING - 失败: 编码器 'h264_qsv' 测试失败。FFmpeg 返回码: 2981409195
2025-10-29 09:59:36,139 - VideoTrans - INFO - 正在尝试测试编码器: h264_amf...
2025-10-29 09:59:36,443 - VideoTrans - INFO - 成功: 编码器 'h264_amf' 测试通过。
2025-10-29 09:59:36,445 - VideoTrans - INFO - 已选择硬件编码器: h264_amf
2025-10-29 09:59:36,445 - VideoTrans - INFO - 最终确定的编码器: h264_amf
2025-10-29 10:05:36,100 - VideoTrans - INFO - Starting call to 'videotrans.recognition._openairecognapi.OpenaiAPIRecogn._exec', this is the 1st time calling it.
2025-10-29 10:06:13,139 - VideoTrans - INFO - 返回缓存的编解码器 ('Windows', 264): h264_amf
2025-10-29 10:06:14,654 - VideoTrans - INFO - Starting call to 'videotrans.recognition._openairecognapi.OpenaiAPIRecogn._exec', this is the 1st time calling it.
2025-10-29 10:32:55,925 - VideoTrans - INFO - Starting call to 'videotrans.recognition._openairecognapi.OpenaiAPIRecogn._exec', this is the 1st time calling it.
2025-10-29 10:34:00,254 - VideoTrans - INFO - Finished call to 'videotrans.recognition._openairecognapi.OpenaiAPIRecogn._exec' after 64.328(s), this was the 1st time calling it.
2025-10-29 10:34:10,260 - VideoTrans - INFO - Starting call to 'videotrans.recognition._openairecognapi.OpenaiAPIRecogn._exec', this is the 2nd time calling it.


Application started at 2025-10-29 10:36:04

2025-10-29 10:36:04,983 - VideoTrans - INFO - 平台: Windows。正在按优先级检测最佳的 'h264' 编码器: ['nvenc', 'qsv', 'amf']
2025-10-29 10:36:06,528 - VideoTrans - INFO - CUDA 不可用,跳过 nvenc 测试。
2025-10-29 10:36:06,528 - VideoTrans - INFO - 正在测试编码器是否可用: h264_qsv...
2025-10-29 10:36:07,133 - VideoTrans - WARNING - 硬件编码器 'h264_qsv' 不可用
2025-10-29 10:36:07,133 - VideoTrans - WARNING - 硬件编码器 'h264_qsv' 不可用
2025-10-29 10:36:07,134 - VideoTrans - INFO - 正在测试编码器是否可用: h264_amf...
2025-10-29 10:36:07,348 - VideoTrans - INFO - 硬件编码器 'h264_amf' 可用。
2025-10-29 10:36:07,351 - VideoTrans - INFO - 已选择硬件编码器: h264_amf
2025-10-29 10:36:07,351 - VideoTrans - INFO - 最终确定使用的编码器: h264_amf
最终确定使用的编码器: h264_amf
2025-10-29 10:36:21,102 - VideoTrans - INFO - 返回缓存的编解码器 ('Windows', 264): h264_amf
2025-10-29 10:36:23,574 - VideoTrans - INFO - Starting call to 'videotrans.recognition._openairecognapi.OpenaiAPIRecogn._exec', this is the 1st time calling it.
等待 uuid_signal 线程退出
Attempting to kill ffmpeg processes for user: catty
Successfully killed ffmpeg processes using taskkill

1 Replies

从日志分析,您遇到的主要问题是硬件编码器检测和CUDA不可用导致的等待时间过长。

核心问题:

  1. CUDA不可用:日志显示"PyTorch 报告 CUDA 不可用",导致无法使用NVIDIA硬件编码器(nvenc)
  2. 编码器检测耗时:每次启动都要重新检测硬件编码器,这个过程需要几秒钟
  3. 实际识别时间:虽然语音识别本身只用了64秒,但前面的编码器检测和准备阶段消耗了大量时间

解决方案:

  1. 启用CUDA加速(如果有NVIDIA显卡)

    • 更新显卡驱动到最新版本
    • 确保安装了合适的CUDA工具包
    • 在软件设置中勾选"CUDA加速"
  2. 优化编码器设置

    • 在"工具/选项 -> 高级选项"中,可以手动指定编码器为"h264_amf",避免每次检测
    • 或者直接使用软件编码器"libx264",虽然稍慢但更稳定
  3. 检查系统环境

    • 确保软件安装在纯英文路径下
    • 关闭其他占用GPU资源的程序

如果问题依旧,建议提供更完整的日志文件以便进一步分析。

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