当前位置:首页>python>python 用whisper做一个 video 处理字幕工具 ffmpeg

python 用whisper做一个 video 处理字幕工具 ffmpeg

  • 2026-02-28 01:11:39
python 用whisper做一个 video 处理字幕工具 ffmpeg

仓库地址

gitee.com/bobobobbb/py_whisper_ffm...

背景

嗯,拿到很多 video,学习的,但是没字幕啊。直接听,效率没那么高,
转笔记麻烦。

win11 实时字幕还得挂着,线上一些网站提供的服务太垃圾了。

索性自己整一个吧。

整体思路

  1. 用 whisper(本地开源模型)对视频做语音识别,生成字幕文件(srt 或 vtt)。
  2. 再写一个简单解析脚本,把字幕里的文本部分抽取出来,按顺序写入 txt

整个流程全本地,不依赖云服务。

配环境

下在 ffmpeg

注意 很多博主说去 镜像站下 https://www.gyan.dev/ffmpeg/builds/,实际上慢的要死。

这里建议大家直接去 github 下,起码自己还能加速一下。

github.com/GyanD/codexffmpeg/relea...

速度 提上来了。

  1. 下载完成后,把压缩包解压到一个固定目录,比如:

    D:\apps\ffmpeg

    解压后一般是这种结构:

    D:\apps\ffmpeg
        └─ ffmpeg-6.x-full_build
            ├─ bin
            │   ├─ ffmpeg.exe
            │   ├─ ffprobe.exe
            │   └─ ...
            └─ ...

记住 bin 目录路径,例如:

D:\apps\ffmpeg\ffmpeg-6.x-full_build\bin

二、把 ffmpeg 加到系统 PATH

  1. 在桌面右键 “此电脑” → 属性 → 左边 “高级系统设置”
  2. 点 “环境变量 (N)…”
  3. 在 “系统变量” 里找到 Path → 选中 → 点击 “编辑”

点击 “新建”,把刚才的 bin 路径粘进去,例如:

D:\apps\ffmpeg\ffmpeg-6.x-full_build\bin
  1. 一路确定关闭所有窗口。

注意:改完 PATH 之后,要重新打开一个新的 PowerShell / CMD 窗口,旧窗口里看不到更新。


三、验证 ffmpeg 是否可用

新开一个终端(不要用之前那个窗口):

ffmpeg -version

如果能看到版本信息,就说明 PATH 配好了。

代码

代码:视频生成 srt 字幕

import whisper
import os

defvideo_to_srt(video_path, model_size="small", language="zh"):
"""
    :param video_path: 视频文件路径
    :param model_size: 模型大小 tiny/base/small/medium/large
    :param language: 语言,中文 zh,英文 en,自动检测用 None
    """

# 加载模型(首次会自动下载)
    model = whisper.load_model(model_size)

# 识别
    result = model.transcribe(video_path, language=language)

# 输出 srt 文件路径
    base, _ = os.path.splitext(video_path)
    srt_path = base +".srt"

# 写入 srt
withopen(srt_path,"w", encoding="utf-8")as f:
        counter =1
for seg in result["segments"]:
            start = seg["start"]
            end = seg["end"]
            text = seg["text"].strip()

defformat_time(t):
                h =int(//3600)
                m =int((%3600)//60)
                s =int(%60)
                ms =int((-int(t))*1000)
returnf"{h:02d}:{m:02d}:{s:02d},{ms:03d}"

            f.write(f"{counter}\n")
            f.write(f"{format_time(start)} --> {format_time(end)}\n")
            f.write(text +"\n\n")
            counter +=1

print("SRT 生成完成:", srt_path)
return srt_path

if __name__ =="__main__":
    video_file =r"D:\video\example.mp4"# 改成你自己的路径
    video_to_srt(video_file, model_size="small", language="zh")

说明:

  • model_size
    • 显卡好可以用 medium,效果更好。
    • 机器一般就用 small/base
  • language
    • 中文视频用 "zh"
    • 英文视频用 "en"
    • 不确定就 language=None 让它自动检测。

把 srt 字幕解析为 txt(纯文本)

1
00:00:00,000-->00:00:02,000
这是第一句字幕

2
00:00:02,000-->00:00:04,000
这是第二句字幕

代码:srt 转 txt

import os
import re

defsrt_to_txt(srt_path):
    base, _ = os.path.splitext(srt_path)
    txt_path = base +".txt"

    lines =[]
withopen(srt_path,"r", encoding="utf-8")as f:
for line in f:
            line = line.strip()
# 跳过空行、数字行、时间轴行
ifnot line:
continue
if line.isdigit():
continue
if re.match(r"\d{2}:\d{2}:\d{2},\d{3} -->", line):
continue
# 其它认为是字幕正文
            lines.append(line)

# 合并写入 txt,可按你喜好处理:直接一行一条、或合并成一段
withopen(txt_path,"w", encoding="utf-8")as f:
for l in lines:
            f.write(+"\n")

print("TXT 生成完成:", txt_path)
return txt_path

if __name__ =="__main__":
    srt_file =r"D:\video\example.srt"# 改成你的 srt 路径
    srt_to_txt(srt_file)

整合为一个脚本

import os
import re
import whisper

defvideo_to_srt(video_path, model_size="small", language="zh"):
    model = whisper.load_model(model_size)
    result = model.transcribe(video_path, language=language)

    base, _ = os.path.splitext(video_path)
    srt_path = base +".srt"

withopen(srt_path,"w", encoding="utf-8")as f:
        counter =1
for seg in result["segments"]:
            start = seg["start"]
            end = seg["end"]
            text = seg["text"].strip()

defformat_time(t):
                h =int(//3600)
                m =int((%3600)//60)
                s =int(%60)
                ms =int((-int(t))*1000)
returnf"{h:02d}:{m:02d}:{s:02d},{ms:03d}"

            f.write(f"{counter}\n")
            f.write(f"{format_time(start)} --> {format_time(end)}\n")
            f.write(text +"\n\n")
            counter +=1

return srt_path

defsrt_to_txt(srt_path):
    base, _ = os.path.splitext(srt_path)
    txt_path = base +".txt"

    lines =[]
withopen(srt_path,"r", encoding="utf-8")as f:
for line in f:
            line = line.strip()
ifnot line:
continue
if line.isdigit():
continue
if re.match(r"\d{2}:\d{2}:\d{2},\d{3} -->", line):
continue
            lines.append(line)

withopen(txt_path,"w", encoding="utf-8")as f:
for l in lines:
            f.write(+"\n")

return txt_path

if __name__ =="__main__":
    video_file =r"D:\video\example.mp4"# 改成你的视频路径
    srt_file = video_to_srt(video_file, model_size="small", language="zh")
    txt_file = srt_to_txt(srt_file)
print("全部完成:", txt_file)

执行结果。

也就 2 分钟得视频,怎么这么慢。。

你们可以根据自己电脑配置进行修改代码配置的哈。

成果

进阶版本代码

我的测试机笔记本是 3080 显卡,cpu 是 11th Gen Intel® Core™ i7-11800H @ 2.30GHz (2.30 GHz),内存 32.0 GB

  • 扫描一个目录下所有视频文件
  • 用 GPU(3080)+ whisper medium 模型识别
  • 生成 .srt 和 .txt 两种文件
  • 预设笔记本性能参数(GPU、batch、fp16 等)

依赖确认

虚拟环境里先装好:

pip install --upgrade pip
pip install openai-whisper torch

如果你本地还没装 GPU 版 torch,可以直接试一下,whisper 会自动尝试用 GPU;
如果报错说没有 CUDA,再按官方指引装对应 CUDA 版本的 torch。

批量处理脚本:batch_video_to_txt.py

import os
import re
import torch
import whisper
from typing import List

# -------------------- 配置区域 --------------------

# 要批量处理的视频目录(改成你的目录)
VIDEO_DIR =r"D:\work\videos"

# 支持的视频扩展名
VIDEO_EXTS ={".mp4",".mkv",".avi",".mov",".flv",".wmv",".m4v"}

# whisper 模型大小:tiny / base / small / medium / large
# 你 3080 + 32G,建议直接用 medium,效果和速度比较均衡
WHISPER_MODEL_SIZE ="medium"

# 语言:中文 "zh",英文 "en",None 自动检测
LANGUAGE =None# 如果大部分是中文,也可以写成 "zh"

# 是否强制使用 GPU(如果有)
USE_GPU =True

# -------------------- 工具函数 --------------------

deflist_videos(root:str)-> List[str]:
"""递归扫描目录下所有视频文件"""
    files =[]
for dirpath, _, filenames in os.walk(root):
for name in filenames:
            ext = os.path.splitext(name)[1].lower()
if ext in VIDEO_EXTS:
                files.append(os.path.join(dirpath, name))
return files

defformat_timestamp(t:float)->str:
"""秒 -> SRT 时间格式 00:00:00,000"""
    h =int(//3600)
    m =int((%3600)//60)
    s =int(%60)
    ms =int((-int(t))*1000)
returnf"{h:02d}:{m:02d}:{s:02d},{ms:03d}"

defsave_srt(result:dict, srt_path:str):
"""whisper 识别结果保存为 .srt"""
withopen(srt_path,"w", encoding="utf-8")as f:
for i, seg inenumerate(result["segments"], start=1):
            start = seg["start"]
            end = seg["end"]
            text = seg["text"].strip()

            f.write(f"{i}\n")
            f.write(f"{format_timestamp(start)} --> {format_timestamp(end)}\n")
            f.write(text +"\n\n")

defsrt_to_txt(srt_path:str)->str:
"""从 .srt 提取纯文本,保存为 .txt"""
    base, _ = os.path.splitext(srt_path)
    txt_path = base +".txt"

    lines =[]
withopen(srt_path,"r", encoding="utf-8")as f:
for line in f:
            line = line.strip()
ifnot line:
continue
if line.isdigit():
continue
if re.match(r"\d{2}:\d{2}:\d{2},\d{3} -->", line):
continue
            lines.append(line)

withopen(txt_path,"w", encoding="utf-8")as f:
for l in lines:
            f.write(+"\n")

return txt_path

# -------------------- 主逻辑 --------------------

defmain():
# 检查 CUDA
if USE_GPU and torch.cuda.is_available():
        device ="cuda"
else:
        device ="cpu"

print(f"使用设备: {device}")
print(f"加载 whisper 模型: {WHISPER_MODEL_SIZE}")

# 加载模型(放外面,只加载一次,批量用)
    model = whisper.load_model(WHISPER_MODEL_SIZE, device=device)

# 性能参数:你 3080,可以开 fp16 + 合理的 beam_size
# (如果要自定义可以改这里)
    common_kwargs ={
"fp16": device =="cuda",# GPU 用 fp16,CPU 用 fp32
"beam_size":5,
"best_of":5,
}

if LANGUAGE:
        common_kwargs["language"]= LANGUAGE

# 扫描所有视频
    videos = list_videos(VIDEO_DIR)
ifnot videos:
print(f"目录下没有找到视频文件: {VIDEO_DIR}")
return

print(f"在 {VIDEO_DIR} 发现 {len(videos)} 个视频文件")

for idx, video_path inenumerate(videos, start=1):
        base, ext = os.path.splitext(video_path)
        srt_path = base +".srt"
        txt_path = base +".txt"

print(f"\n[{idx}/{len(videos)}] 处理: {video_path}")

# 如果已经有 txt,默认跳过(避免重复算)
if os.path.exists(txt_path):
print(f"已存在 txt,跳过: {txt_path}")
continue

# 如果已经有 srt,就直接转 txt
if os.path.exists(srt_path):
print(f"已存在 srt,直接生成 txt: {srt_path}")
            srt_to_txt(srt_path)
print(f"完成 txt: {txt_path}")
continue

# 识别
print("开始识别(whisper.transcribe)...")
        result = model.transcribe(video_path,**common_kwargs)

# 保存 srt
        save_srt(result, srt_path)
print(f"完成 srt: {srt_path}")

# srt -> txt
        txt_path = srt_to_txt(srt_path)
print(f"完成 txt: {txt_path}")

print("\n全部视频处理完毕。")

if __name__ =="__main__":
    main()

使用方式

  1. 把脚本保存为:batch_video_to_txt.py
  2. 把你要处理的视频都放到一个目录,例如:D:\work\videos
  3. 根据实际情况修改脚本顶部配置:
VIDEO_DIR =r"D:\work\videos"
WHISPER_MODEL_SIZE ="medium"# 也可以试试 "large"
LANGUAGE =None# 全中文可以写成 "zh"
  1. 在虚拟环境中运行:
cd D:\work\py\video_to_txt
.\venv\Scripts\activate

python batch_video_to_txt.py

处理逻辑:

  • 每个视频生成:xxx.srt + xxx.txt
  • 如果已存在 .txt,默认跳过该视频;
  • 如果有 .srt 没 .txt,只做 srt→txt,不重复识别。
本作品采用《CC 协议》,转载必须注明作者和本文链接

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-28 07:13:14 HTTP/2.0 GET : https://f.mffb.com.cn/a/477593.html
  2. 运行时间 : 0.203955s [ 吞吐率:4.90req/s ] 内存消耗:4,379.53kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=102723eb235f8d5557d6ac753c784fc1
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000943s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001504s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.010894s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.006741s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001246s ]
  6. SELECT * FROM `set` [ RunTime:0.005329s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001264s ]
  8. SELECT * FROM `article` WHERE `id` = 477593 LIMIT 1 [ RunTime:0.000966s ]
  9. UPDATE `article` SET `lasttime` = 1772233994 WHERE `id` = 477593 [ RunTime:0.009313s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000491s ]
  11. SELECT * FROM `article` WHERE `id` < 477593 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000844s ]
  12. SELECT * FROM `article` WHERE `id` > 477593 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.007110s ]
  13. SELECT * FROM `article` WHERE `id` < 477593 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003372s ]
  14. SELECT * FROM `article` WHERE `id` < 477593 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001378s ]
  15. SELECT * FROM `article` WHERE `id` < 477593 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001269s ]
0.207103s