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

Karen Norton nortok00 at gmail.com
Thu Dec 6 22:19:41 EET 2018

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

> On 07-12-2018 12:49 AM, Karen Norton wrote:
> >
> > Just a few more questions:
> >
> > 1. Where do I find your SU answer that you mention? Is there a link to
> see
> > it?
> It's the SuperUser page you linked to :)
> > 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
> Looks right.
> > 3. Will custom tags display in ffprobe?
> Yes. They do, for me.
> > 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.
> Here's the weird thing. The muxer does write 32 bits. But the demuxer
> treats the high 24 bits as padding and ignores it. In effect, ffmpeg
> will show    (stored-value % 256)
> Mediainfo does the same, which would indicate that this is the iTunes
> spec. However, I find other sources which treat it as full 32-bits. Let
> me look into it. But it can't be a string.
> 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".

LOL... I didn't realize SU meant that superuser page. Haha! I think it
would be very helpful if you updated that page because it comes up a fair
bit in search results. :-)

That's too bad that episode_sort can't be changed to a string but if it can
do a full 32 bits that might resolve the issue.

I just tested adding a custom tag and it worked. It also shows in ffprobe.
Yeah!! So this worked for me:
ffmpeg -i input.mp4 -metadata media_type="10" -metadata title="Law & Order"
-metadata show="Prescription For Death" -metadata season_number="1"
-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

ffprobe shows in the Format section:
format_long_name=QuickTime / MOV
TAG:episode_number=Episode 1
TAG:title=Law & Order
TAG:show=Prescription For Death

This is fantastic!! No metadata limitations. :-D :-D

Is this all in the official ffmpeg documentation? As mentioned I couldn't
find anything and I searched through all of the references for metadata but
it's possible I missed it.

At least this answers my questions and solves my problem.

Thanks again Gyan!!



More information about the ffmpeg-user mailing list