作用:自动识别剧集第一集和原盘等格式,自动挂载中文字幕截图,上传至 pixhost,并返回图片的 BBCode 代码和直链。因 pixhost 限制 10M,若截图超过 10M 会自动压缩重截。

脚本使用方法

基础命令格式

bash <(curl -s https://raw.githubusercontent.com/guyuanwind/Seedbox/refs/heads/main/AutoScreenshot.sh) 参数1 "参数2" "参数3" 参数4

参数详解

参数 1:截图格式与模式(可选)

  • 留空PNG格式 + 挂载中文字幕

    说明:设计初衷是为了不可说的png要求 ,但是目前测试不可说对图片压缩有要求,不完全符合要求待后续更新

  • -fastJPG格式 + 不挂载字幕

    说明:截图速度最快

  • -jpgJPG格式 + 挂载中文字幕

    说明:兼顾中文字幕和速度,推荐此参数

参数 2:视频路径(必须)

  • 视频文件的绝对路径,或包含视频的文件夹路径。

参数 3:保存路径(必须)

  • 截图保存的绝对路径。

参数 4:截图时间点(可选)

  • 不填:默认截取 4 张(时间点均匀分布)。

  • 填写:例如 00:05:00

    说明:如果有多个时间参数,将按照参数数量截取对应张数。


使用举例

1. PNG 格式 + 挂载字幕

bash <(curl -s https://raw.githubusercontent.com/guyuanwind/Seedbox/refs/heads/main/AutoScreenshot.sh) "/home/guyuanwind/Downloads/MovieName" "/home/guyuanwind/screenshots"

2. JPG 格式 + 挂载字幕(推荐)

bash <(curl -s https://raw.githubusercontent.com/guyuanwind/Seedbox/refs/heads/main/AutoScreenshot.sh) -jpg "/home/guyuanwind/Downloads/MovieName" "/home/guyuanwind/screenshots"

3. JPG 格式 + 挂载字幕+指定时间点截图

JPG 格式,挂载字幕,在 00:05:00 处截图 1 张。

bash <(curl -s https://raw.githubusercontent.com/guyuanwind/Seedbox/refs/heads/main/AutoScreenshot.sh) -jpg "/home/guyuanwind/Downloads/MovieName" "/home/guyuanwind/screenshots" 00:05:00

4. 极速模式 (无字幕)

仅快速截图,不挂字幕。

bash <(curl -s bash <(curl -s https://raw.githubusercontent.com/guyuanwind/Seedbox/refs/heads/main/AutoScreenshot.sh) -fast "/home/guyuanwind/Downloads/MovieName" "/home/guyuanwind/screenshots"

总结

主推此命令,固定好截图目录每次直接替换视频文件参数执行即可

bash <(curl -s https://raw.githubusercontent.com/guyuanwind/Seedbox/refs/heads/main/AutoScreenshot.sh) -jpg "/home/guyuanwind/Downloads/MovieName" "/home/guyuanwind/screenshots"