mirror of https://github.com/VERT-sh/VERT.git
fix: catch no audio streams
This commit is contained in:
parent
3ad8244e97
commit
21d9358a17
|
@ -19,7 +19,6 @@ export class FFmpegConverter extends Converter {
|
||||||
new FormatInfo("ogg"),
|
new FormatInfo("ogg"),
|
||||||
new FormatInfo("aac"),
|
new FormatInfo("aac"),
|
||||||
new FormatInfo("m4a"),
|
new FormatInfo("m4a"),
|
||||||
// TODO: audio to video where it uses the album cover
|
|
||||||
...videoFormats.map((f) => new FormatInfo(f, true, true, false)),
|
...videoFormats.map((f) => new FormatInfo(f, true, true, false)),
|
||||||
new FormatInfo("wma"),
|
new FormatInfo("wma"),
|
||||||
new FormatInfo("amr"),
|
new FormatInfo("amr"),
|
||||||
|
@ -63,6 +62,14 @@ export class FFmpegConverter extends Converter {
|
||||||
});
|
});
|
||||||
ffmpeg.on("log", (l) => {
|
ffmpeg.on("log", (l) => {
|
||||||
log(["converters", this.name], l.message);
|
log(["converters", this.name], l.message);
|
||||||
|
|
||||||
|
if (l.message.includes("Stream map '0:a:0' matches no streams.")) {
|
||||||
|
error(
|
||||||
|
["converters", this.name],
|
||||||
|
`No audio stream found in ${input.name}.`,
|
||||||
|
);
|
||||||
|
addToast("error", `No audio stream found in ${input.name}.`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const baseURL =
|
const baseURL =
|
||||||
"https://cdn.jsdelivr.net/npm/@ffmpeg/core@0.12.6/dist/esm";
|
"https://cdn.jsdelivr.net/npm/@ffmpeg/core@0.12.6/dist/esm";
|
||||||
|
|
Loading…
Reference in New Issue