Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting mp3 metadata #589

Closed
pidgeonman opened this issue Sep 1, 2016 · 4 comments
Closed

Setting mp3 metadata #589

pidgeonman opened this issue Sep 1, 2016 · 4 comments

Comments

@pidgeonman
Copy link

I'm trying to set id3 tags (or whatever, let´s just say metadata) in an output mp3 file. I am using


ffMpegProc.addOutputOption('-metadata title="Stairway to heaven"');
ffMpegProc.addOutputOption('-metadata artist="Led Zeppelin"');

but on run it fails:

events.js:141
throw er; // Unhandled 'error' event
^

Error: ffmpeg exited with code 1: metadata artist="Led Zeppelin": Invalid argument

What am I doing wrong? Thanks!

@njoyard
Copy link
Member

njoyard commented Sep 3, 2016

Use the separate flag/arg form: addOutputOption('-metadata', 'title="Stairway to Heaven"'). Automatic splitting of arguments by fluent-ffmpeg only happens when there is only one space.

@njoyard njoyard closed this as completed Sep 3, 2016
@njoyard
Copy link
Member

njoyard commented Sep 3, 2016

(and now I have stairway to heaven stuck in my head 🎸 )

@pidgeonman
Copy link
Author

You should consider putting a sign http://ukeuniversity.net/wp-content/uploads/2014/11/IMG_0359.jpg

PS: Thanks for the answer!

@moshfeu
Copy link

moshfeu commented Jan 10, 2019

A similar very strange problem:

When I have only 1 space it failing but if there are 0 or more than one, it doesn't fail:

Fail

var outputOptions = [
  "-id3v2_version", "4",
  "-metadata", "title=Summertime a",
  "-metadata", "artist=Seasick Steve"
];

new ffmpeg({
  source: stream.pipe(str)
})
.outputOptions(outputOptions)

Doesn't fail

var outputOptions = [
  "-id3v2_version", "4",
  "-metadata", "title=Summertime a",
  "-metadata", "artist=Seasick Steve"
];

new ffmpeg({
  source: stream.pipe(str)
})
.outputOptions(outputOptions)

@njoyard thoughts?

BTW, using addOutputOption instead of putting it in array, solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants