mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
Merge pull request #1443 from ishkong/patch-7
👽️ Update ffrmpeg screenshot command
This commit is contained in:
commit
294bd05dad
4
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
4
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
@ -11,7 +11,7 @@ body:
|
|||||||
## 感谢您愿意填写错误回报!
|
## 感谢您愿意填写错误回报!
|
||||||
## 以下是一些注意事项,请务必阅读让我们能够更容易处理
|
## 以下是一些注意事项,请务必阅读让我们能够更容易处理
|
||||||
|
|
||||||
### ❗ | 确定没有相同问题的ISSUE已被提出. (教程: https://github.com/Mrs4s/go-cqhttp/issues/633)
|
### ❗ | 确定没有相同问题的ISSUE已被提出. (教程: https://forums.go-cqhttp.org/t/topic/141)
|
||||||
### 🌎| 请准确填写环境信息
|
### 🌎| 请准确填写环境信息
|
||||||
### ❔ | 打开DEBUG模式复现,并提供出现问题前后至少 10 秒的完整日志内容。请自行删除日志内存在的个人信息及敏感内容。
|
### ❔ | 打开DEBUG模式复现,并提供出现问题前后至少 10 秒的完整日志内容。请自行删除日志内存在的个人信息及敏感内容。
|
||||||
### ⚠ | 如果涉及内存泄漏/CPU占用异常请打开DEBUG模式并下载pprof性能分析.
|
### ⚠ | 如果涉及内存泄漏/CPU占用异常请打开DEBUG模式并下载pprof性能分析.
|
||||||
@ -24,7 +24,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: 请确保您已阅读以上注意事项,并勾选下方的确认框。
|
label: 请确保您已阅读以上注意事项,并勾选下方的确认框。
|
||||||
options:
|
options:
|
||||||
- label: "我已经仔细阅读上述教程和 [\"提问前需知\"](https://github.com/Mrs4s/go-cqhttp/issues/633)"
|
- label: "我已经仔细阅读上述教程和 [\"提问前需知\"](https://forums.go-cqhttp.org/t/topic/141)"
|
||||||
required: true
|
required: true
|
||||||
- label: "我已经使用 [dev分支版本](https://github.com/Mrs4s/go-cqhttp/actions/workflows/ci.yml) 测试过,问题依旧存在。"
|
- label: "我已经使用 [dev分支版本](https://github.com/Mrs4s/go-cqhttp/actions/workflows/ci.yml) 测试过,问题依旧存在。"
|
||||||
required: true
|
required: true
|
||||||
|
@ -43,6 +43,6 @@ func EncodeMP4(src string, dst string) error { // -y 覆盖文件
|
|||||||
|
|
||||||
// ExtractCover 获取给定视频文件的Cover
|
// ExtractCover 获取给定视频文件的Cover
|
||||||
func ExtractCover(src string, target string) error {
|
func ExtractCover(src string, target string) error {
|
||||||
cmd := exec.Command("ffmpeg", "-i", src, "-y", "-r", "1", "-f", "image2", target)
|
cmd := exec.Command("ffmpeg", "-i", src, "-y", "-ss", "0", "-frames:v", "1", target)
|
||||||
return errors.Wrap(cmd.Run(), "extract video cover failed")
|
return errors.Wrap(cmd.Run(), "extract video cover failed")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user