mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 21:46:12 +08:00
修复编排合并视频功能没有正确提示升级uTools版本的bug
This commit is contained in:
parent
775132df8f
commit
b9005cbe88
@ -1,3 +1,11 @@
|
||||
const checkFFmpeg = () => {
|
||||
if (!utools.runFFmpeg) {
|
||||
quickcommand.showSystemMessageBox("请先升级uTools到6.1.0及以上版本");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 运行FFmpeg命令并显示进度条
|
||||
* @param {string[]} args FFmpeg命令参数
|
||||
@ -11,12 +19,8 @@
|
||||
* @returns {Promise} 返回Promise
|
||||
*/
|
||||
async function runFFmpeg(args, options = {}) {
|
||||
if (!utools.runFFmpeg) {
|
||||
quickcommand.showSystemMessageBox(
|
||||
"请先升级uTools到6.1.0及以上版本"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!checkFFmpeg()) return;
|
||||
|
||||
const {
|
||||
text = "处理中...",
|
||||
position = "bottom-right",
|
||||
@ -234,6 +238,8 @@ async function extractAudio(input, output, options = {}) {
|
||||
* utools接口目前好像有问题,无法结束录制
|
||||
*/
|
||||
async function recordScreen(output, options = {}) {
|
||||
if (!checkFFmpeg()) return;
|
||||
|
||||
const { fps = 30, overwrite = false } = options;
|
||||
|
||||
const args = [];
|
||||
@ -456,6 +462,7 @@ async function addWatermark(input, watermark, output, options = {}) {
|
||||
* @param {boolean} options.overwrite 是否覆盖已存在的文件
|
||||
*/
|
||||
async function mergeVideos(inputs, output, options = {}) {
|
||||
if (!checkFFmpeg()) return;
|
||||
const { overwrite = false } = options;
|
||||
|
||||
// 先获取第一个视频的分辨率
|
||||
|
Loading…
x
Reference in New Issue
Block a user