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