feat: update error message when no stream data

This commit is contained in:
HaveAGitGat 2025-02-25 23:02:51 +00:00
parent 41ec36673b
commit 0f82b5826f
2 changed files with 21 additions and 2 deletions

View file

@ -39,10 +39,20 @@ const plugin = (args:IpluginInputArgs):IpluginOutputArgs => {
const container = getContainer(args.inputFileObj._id);
let streams = [];
try {
streams = JSON.parse(JSON.stringify(args.inputFileObj.ffProbeData.streams));
} catch (err) {
const message = `Error parsing FFprobe streams, it seems FFprobe could not scan the file: ${JSON.stringify(err)}`;
args.jobLog(message);
throw new Error(message);
}
const ffmpegCommand = {
init: true,
inputFiles: [],
streams: JSON.parse(JSON.stringify(args.inputFileObj.ffProbeData.streams)).map((stream:Istreams) => ({
streams: streams.map((stream:Istreams) => ({
...stream,
removed: false,
mapArgs: [