HydrogenAudio

Digital Audio/Video => General A/V => Topic started by: polemon on 2017-09-17 03:12:37

Title: looking for MP4 metadata editor for linux
Post by: polemon on 2017-09-17 03:12:37
So, editing the metadata on MP4 files is incredibly cumbersome.

I can't use exiv2, because most fields aren't really writable.
I can't (really) use MP4Box, because the current builds for Linux seem to be kinda broken, and the current code doesn't compile.

The only thing I can use, is FFmpeg. However editing metadata with FFmpeg is incredibly cumbersome, as it cannot edit the fields in-place.

Simply extracting all metadata as JSON, edit the JSON file, and then writing that back to the MP4 file would be probably my favorite way of editing the metadata.
Title: Re: looking for MP4 metadata editor for linux
Post by: nu774 on 2017-09-17 10:13:44
Try atomicparsley ( http://atomicparsley.sourceforge.net/ ).
Title: Re: looking for MP4 metadata editor for linux
Post by: polemon on 2017-09-17 12:35:11
Try atomicparsley ( http://atomicparsley.sourceforge.net/ ).
Couple errors which had to be corrected to make it compile, but alright, I'll try it.
Title: Re: looking for MP4 metadata editor for linux
Post by: nu774 on 2017-09-17 13:05:06
Well if you were lucky you just only needed to run something like apt-get install atomicparsley, but you could still  use some patches from distro like this:
https://packages.debian.org/sid/video/atomicparsley
Title: Re: looking for MP4 metadata editor for linux
Post by: polemon on 2017-09-17 13:44:45
Well if you were lucky you just only needed to run something like apt-get install atomicparsley, but you could still  use some patches from distro like this:
https://packages.debian.org/sid/video/atomicparsley
No, I'm not a user of a deb-based distro.
I've since compiled it since, and I'm playing around with it. I can set the Atom and ISO fields, but reading them is a bit confusing.
Title: Re: looking for MP4 metadata editor for linux
Post by: polemon on 2017-09-17 21:23:19
Hmm, when I run ./AtomicParsley file.mp4 -T 1 it  prints the Atom tree, but it doesn't parse it further. I.e. I can see all sorts of cryptic 4-letter codes and size information, but that's about it.

When running ./AtomicParsley file.mp4 -t 1 it displays the textual data that is extractable from the file, but it doesn't really seem to correspond to the Atom tree.

Also, I cannot change the codec data, things like setting a language code, change things like sampling parameters, etc.
Title: Re: looking for MP4 metadata editor for linux
Post by: polemon on 2017-09-17 22:38:30
OK, I ended up compiling MP4box (https://gpac.wp.imt.fr/mp4box/) and using that to edit the language codes for the tracks of my file.

It wasn't exactly pleasant, though. The documentation and/or help the tools come with are cumbersome, let alone the actual usage of these tools.

MP4box -lang 1=und video.mp4 is what let me set the language code.
Title: Re: looking for MP4 metadata editor for linux
Post by: lameboy on 2017-09-19 15:34:50
Have you tried Kid3?

https://kid3.sourceforge.io/
Title: Re: looking for MP4 metadata editor for linux
Post by: jaybeee on 2017-09-19 20:14:42
Have you tried Kid3?

https://kid3.sourceforge.io/
I don't use Linux but that program looks great.
Title: Re: looking for MP4 metadata editor for linux
Post by: polemon on 2017-09-19 20:53:45
Have you tried Kid3?

https://kid3.sourceforge.io/
Just checked it out: it cannot edit metadata relating to the streams. It can only edit things like Author, Year of publishing, trackname, etc. It cannot edit the language tags of the audio stream, or suchlike.
Title: Re: looking for MP4 metadata editor for linux
Post by: eahm on 2017-09-19 23:32:47
MusicBrainz Picard?
Title: Re: looking for MP4 metadata editor for linux
Post by: polemon on 2017-09-20 05:06:04
MusicBrainz Picard?
OK, luckily this one's also in my distro's repos. I've had a quick look, and it's also just a tag editor caring about the typical, file-wide metadata, like author, data, year of release, track numbers, and things like album art.

But again, it doesn't seem to be able to understand stream related information. I cannot set the stream language, or things like stream order, etc.

As I see it, MP4 holds three versions of tag information, or at least three widely supported sets of tag information.
These are the ones used by iTunes, ISO defined tags, and 3gpp defined tags. They seem to overlap in some but not all.

I still haven't exactly wrapped my head around how the metadata is stored. As I understand it, it's technically a tree structure that is stored somewhere in the file, but MP4 seems to be able to contain more than one format for metadata.

Maybe I'm barking up the wrong tree, and should find out more how MP4 files store file and stream information first...
If this leads to nowhere I'll see how libraries read that file information. lavf should be able to get the full complement of all MP4 metadata, I'd imagine.
Title: Re: looking for MP4 metadata editor for linux
Post by: eahm on 2017-09-20 08:25:35
Can foobar2000 do what you're looking for? Could you try it with Wine?
Title: Re: looking for MP4 metadata editor for linux
Post by: Porcus on 2017-09-20 10:15:28
Is there a powerful-yet-userfriendly MP4 editor like you want it, for any OS?
Too lazy to try, but have you seen this cross-platform MP4box GUI? https://sourceforge.net/projects/javamp4boxgui/


As I see it, MP4 holds three versions of tag information, or at least three widely supported sets of tag information.
These are the ones used by iTunes, ISO defined tags, and 3gpp defined tags. They seem to overlap in some but not all.

I still haven't exactly wrapped my head around how the metadata is stored. As I understand it, it's technically a tree structure that is stored somewhere in the file, but MP4 seems to be able to contain more than one format for metadata.

Yeah, others have had issues with the multiple mysterious ways of MP4 metadata ... https://hydrogenaud.io/index.php/topic,111855.0.html