Skip to content

Conversation

@Diniboy1123
Copy link
Contributor

Hi,

I came across some flac files that were shipped inside mp4 containers. Since mp4ff has no support for those, I tried to add them myself.

Resources I used:

ID3v2 support is minimal. The idea is that if someone wants to parse it fully, they should use an ID3v2 parser. I thought a complete implementation here would be out of scope and fairly complex. For my use-case it's perfectly enough if I can just extract the raw data.

I am not too familiar with the project internals yet so I am sure there are some parts that could be improved. For that reason I allowed the edits by maintainers and feel free to refactor anything you come across.

@tobbee
Copy link
Collaborator

tobbee commented Jan 7, 2026

@Diniboy1123 Thanks for your PR. I think it looks good in general. The main detail I consider should be changed is the ID3 language. It is encoded in the same way as the language in mdhd box with 5-bits per character. This means that only a small set of strings are possible, so it may be better to keep the representation uint16 as in mdhd, and have some methods to set and get the string value. In particular, I think it makes sense to have a setter that returns an error if the string cannot be represented with the 5-bit per character, for example because it includes capital letters, digits or is too long or short (spaces cannot be represented either). That check is not available in MdhdBox, so it is maybe pushing things a bit too far.

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 this pull request may close these issues.

2 participants