[FFmpeg-user] Help with metadata writing (mp4)... what's possible?

Karen Norton nortok00 at gmail.com
Thu Dec 6 20:26:16 EET 2018


Hello all,

I'm hoping someone can help with understanding writing metadata to files
using ffmpeg. The type of metadata I'm referencing is information such as
movie/song title, artist, album, author, genre, show, etc.

I do all of my encoding to AVC/AAC in the mp4 container. I use these
because it's pretty much guaranteed the file will play on all systems,
browsers and media player software. I'm using version 4.1 of ffmpeg
(windows).

I have used ffmpeg hundreds of times to do this so my questions aren't
about getting it to work.... my questions are around what can be written
with ffmpeg because I can't seem to find definitive info about this. So
here are my questions:
1. Is there an actual ffmpeg documentation page on this? I couldn't find
anything. The only references I could find were from other sites such as:
https://wiki.multimedia.cx/index.php/FFmpeg_Metadata#QuickTime.2FMOV.2FMP4.2FM4A.2Fet_al.
and https://kdenlive.org/en/project/adding-meta-data-to-mp4-video/
2. I quickly went through the mp4 standards document and couldn't find
anything related to these specific keys (ex: "title", "episode_id", etc.)
so I'm trying to understand whether these keys are defined by the mp4
standard or whether each software developer writes their own keys?
3. When I look at the websites mentioned in #1 they are different in so far
as what is available for mp4 through ffmpeg. The wiki site references
seventeen keys for mp4 but the kdenlive site references thirty that are
available. I guess this goes back to finding out exactly what is available
through ffmpeg. Also whether this is the full set available to mp4 as a
standard.
4. Is there anyway to write in custom metadata? I read this is not possible
with ffmpeg for mp4 but is possible with ffmpeg for matroska. I read that
here:
https://superuser.com/questions/1208273/add-new-and-non-defined-metadata-to-a-mp4-file.
So this goes back to whether custom metadata is not available through the
mp4 standard or whether it just hasn't been written for ffmpeg? I would
like to write a custom key/field for TV shows for Episode Number (as in
"episode_number" as a string). The reason I want this is because according
to the kdenlive site sorting (episode_sort) is limited to 0-255 so when it
comes to shows like Law & Order SVU which is already up to about 457
episodes the sorting key doesn't work. In this regard either episode_sort
could be changed or a custom field added. Something like
"title": Law & Order
"show": Prescription For Death
"episode_number": Episode 1 or Ep1 or 1 or One (any of these would be an
acceptable input or as mentioned "episode_sort" is changed).

As a side note this superuser page also references a different number of
available keys than either the wiki site and the kdenlive site which goes
back to finding a comprehensive list with definitions of the keys.

Personally I would like to be able to write in custom fields but I would
also like episode_sort updated to be useful for shows that go beyond 255
episodes. This means episode_sort could remain as a numeric value but
something like "episode_number" would be alphanumeric so the user could
write in the data however they want as in Ep1, Episode 1, 1 or One, etc.

If there is somewhere else I should post this let me know or point me to
the official documentation (not only for mp4 but all files types would be
helpful). I googled and googled until my brain hurt but the only references
I could find are the ones noted above (and others like this).

Thanks.

Karen


More information about the ffmpeg-user mailing list