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

Karen Norton nortok00 at gmail.com
Thu Dec 6 21:19:00 EET 2018

On Thu, Dec 6, 2018 at 1:56 PM Gyan Doshi <gyandoshi at gmail.com> wrote:

> On 07-12-2018 12:10 AM, Karen Norton wrote:
> >
> > My questions are about finding the full scope of keys that can be written
> > with ffmpeg because the sites I reference give varying sets of keys. I
> > would like to find a comprehensive list of keys for all files in general
> > (video and audio) but for mp4 in particular. I would also like to know
> > about writing custom tags/keys. Is this possible for mp4 in general but
> > more importantly mp4 with ffmpeg. :-D
> The MP4 file format itself does not provide any restrictions on metadata
> keys. The list in my SU answer lists all the iTunes tags that our muxer
> currently supports. Custom global tags are possible if
>     -movflags use_metadata_tags
> is added to the command.
> Then -metadata somekey=somevalue can be stored. I should update my
> answer to reflect this. I can't test this but it's possible that Apple
> applications may not read these or any other tags if this method is used.
> Thanks,
> Gyan
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

Thank you Gyan. This is exactly the information I was looking for. I was
trying to understand whether the limitations were with the mp4 standard or
the keys I found were defined by ffmpeg and you confirmed it isn't a
limitation of the mp4 standard. I'm also so glad to know custom tags can be
written because that directly contradicts the page I found on the superuser

I understand that writing custom tags doesn't mean they will suddenly show
up in software. Ex: If I added in a custom tag called "episode_number" I
won't necessarily see it in software like mediainfo or itunes, etc. but
it's good to know they can be written in case there is software that will
display all tags including custom.

Just a few more questions:

1. Where do I find your SU answer that you mention? Is there a link to see
2. To make sure I understand using that -movflags use_metadata_tags does
this mean my command line would now be:
ffmpeg -i input.mp4 -metadata media_type="10" -metadata show="Law & Order"
-metadata season_number="1" -metadata title="Prescription For Death"
-metadata episode_id="66209" -metadata episode_sort="1" -metadata:s:a:0
language=eng -movflags use_metadata_tags -metadata episode_number="Episode
1" -c:v libx264 --c:a aac output.mp4
3. Will custom tags display in ffprobe?
4. Can episode_sort be changed from Int8 to general number that allows more
than 255 or maybe alphanumeric? As mentioned I can't use this for Law &
Order Special Victims Unit and Law & Order because they are well over 255.

Thanks also to Carl and Peter for your replies!


More information about the ffmpeg-user mailing list