提交 ce35884e 编写于 作者: A a946547732

Auto Commit

上级 c422f319
...@@ -22,3 +22,28 @@ function getDayOfMonth() { ...@@ -22,3 +22,28 @@ function getDayOfMonth() {
} }
const dayOfMonth = getDayOfMonth(); const dayOfMonth = getDayOfMonth();
console.log(`今天是本月的第 ${dayOfMonth} 天`); console.log(`今天是本月的第 ${dayOfMonth} 天`);
const { spawn } = require('child_process');
//生成一个 mp4 to wav 视频格式转化器
// 执行 FFmpeg 命令行工具
const ffmpeg = spawn('ffmpeg', ['-i', 'input.mp4', 'output.wav']);
// 监听执行结果
ffmpeg.on('close', (code) => {
console.log(`子进程退出,退出码 ${code}`);
});
ffmpeg.on('error', (err) => {
console.error(`出错了:${err}`);
});
ffmpeg.stdout.on('data', (data) => {
console.log(`输出:${data}`);
});
ffmpeg.stderr.on('data', (data) => {
console.error(`错误:${data}`);
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册