Open ivanm376 opened 6 years ago
acutally. has anyone found a solution?
I had to rewrite the addCommand
function to check if given command equals -metadata
then it will not check if it exists in commands array.
this.addCommand = function (command, argument) {
if (command == "-metadata") {
commands.push(command);
if (argument != undefined)
commands.push(argument);
} else if (utils.in_array(command, commands) === false) {
// Add the new command
commands.push(command);
// Add the argument to new command
if (argument != undefined)
commands.push(argument);
} else
throw errors.renderError('command_already_exists', command);
}
Alternatively you can do the following...
var metadata = [];
for (const prop in meta) {
metadata.push(`${prop}="${meta[prop]}"`);
}
stream.addCommand(`-metadata`, metadata.join(` -metadata `));
Trying to set metadata as described in https://multimedia.cx/eggs/supplying-ffmpeg-with-metadata/
And getting this error:
Shouldn't multiple -metadata options be allowed ?