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

Description & Synopsis of AAC #624

Closed
chris-shaw-2011 opened this issue Sep 16, 2020 · 3 comments · Fixed by #629
Closed

Description & Synopsis of AAC #624

chris-shaw-2011 opened this issue Sep 16, 2020 · 3 comments · Fixed by #629

Comments

@chris-shaw-2011
Copy link

Bug description
If I use ffmpeg to set the metadata on an aac file like so

ffmpeg.exe -i "test.m4b" -map a:0 -c:a aac -metadata description="description" -metadata synopsis="synopsis" "test.out.m4b"

Then if I check the metadata with the following code:

import * as mm from "music-metadata"

mm.parseFile("test.out.m4b").then(metadata => {
    console.log(metadata.common.description) //outputs ["synopsis"]
    console.log(metadata.common.synopsis) //common.synopsis doesn't exist
})

Expected behavior

import * as mm from "music-metadata"

mm.parseFile("test.out.m4b").then(metadata => {
    console.log(metadata.common.description) //outputs ["description"]
    console.log(metadata.common.synopsis) //outputs "synopsis"
})

https://wiki.multimedia.cx/index.php/FFmpeg_Metadata

Audio file demonstrating the problem
files.zip

@Borewit
Copy link
Owner

Borewit commented Sep 17, 2020

Current applied mapping:

ffmpeg ffmpeg → m4a m4a → music-metadata m4a → Mp3tag
description desc (description) subtitle DESCRIPTION
synopsis ldes (long description) description PODCASTDESC

@ozelot379 in @6d1dc00 you mapped description to subtitle. Can you explain more about this? Is subtitle not a kind of extension or clarification to a title, instead of a description. You added a specific test for mp3 & m4a for:

  1. short description:
    describe('Short Description', () => {
  2. long description:
    describe('Long Description', () => {

I suppose you did that for a reason.

What about the following mapping, as @chrichris-shaw-2011 proposes: ?

ffmpeg ffmpeg → m4a m4a → music-metadata
description desc (description) description
synopsis ldes (long description) synopsis

@ghost
Copy link

ghost commented Sep 18, 2020

MP3Tag stores SUBTITLE in desc and PODCASTDESC in ldesc for mp4 files.
And for mp3 files it stores SUBTITLE in TIT3 and PODCASTDESC in TDES.

I think, in MP3Tag SUBTITLE means the short description and PODCASTDESC the long description.

Before my PR (#544), the desc and ldesc tags in mp4 files was mapped in the same field description and couldn't used separated, without parse the native tags self.
And for mp3 files TIT3 was mapped to subtitle and TDES was missed.

Because you already named the short description subtitle for mp3, I used the same name for mp4.

But I see, it was a bad idea to name the long description description.

It would be ok for me, if you name the short description description and the long description synopsis, like @chris-shaw-2011 proposes, for both mp3 or mp4 files.
Alternatively, may it's also sense to name it short_description and long_description.

I can adapt my code I use music-metadata, no matter how you decide.

@Borewit I hope this can answer your questions?

@Borewit
Copy link
Owner

Borewit commented Sep 19, 2020

Thanks for your reply @ozelot379, I will follow your recommendation, but I will use description instead of shortDescription for a bit more backward compatibility.

ffmpeg ffmpeg → m4a m4a → music-metadata
description desc (description) description
synopsis ldes (long description) longDescription

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

Successfully merging a pull request may close this issue.

2 participants