chore(repo): 将生产源码基线同步回 main #1
@ -58,14 +58,15 @@ export async function POST(request: Request) {
|
||||
const info = await probeMedia(input, 600);
|
||||
if (!info.hasAudio) throw new Error("当前视频没有音轨");
|
||||
const inputAudio = path.join(dir, "separation-input.wav");
|
||||
const durationSeconds = Math.round(info.duration / 1e6);
|
||||
await ffmpeg(
|
||||
[
|
||||
...mediaSafety,
|
||||
"-i",
|
||||
input,
|
||||
"-vn",
|
||||
"-af",
|
||||
"apad",
|
||||
"-t",
|
||||
String(durationSeconds),
|
||||
"-ac",
|
||||
"2",
|
||||
"-ar",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user