[FFmpeg-user] Naming an audio track

Moritz Barsnick barsnick at gmx.net
Mon Nov 3 15:04:42 CET 2014

On Mon, Nov 03, 2014 at 12:12:21 +0100, Moritz Barsnick wrote:

> I do see ffmpeg has a function named mov_write_track_udta_tag(),
> called from mov_write_trak_tag(), called from mov_write_moov_tag(),
> but I don't know if it gets used and whether it does the "right
> thing" from VLC's point of view, and how to get it to write the
> "right thing".

I looked at ffmpeg's source, and figured out that it uses the above
functions to write the trak.udta.name atom for its metadata "title":

$ ffmpeg -y -f lavfi -i testsrc -f lavfi -i sine=f=880 -f lavfi -i sine=f=1000 -map 0 -map 1 -map 2 -t 0.5 -metadata:s:a:0 title="880 sine" -metadata:s:a:1 title="1000 sine" out_ffmpeg.mp4

AtomicParsley now sees reports the tag, just like it did for
HandBrake's file:

$ AtomicParsley out_ffmpeg.mp4 -t 1
User data; level: track=2; atom "name" : 880 sine
User data; level: track=3; atom "name" : 1000 sine

So ffmpeg is basically doing the right thing with "title".
Unfortunately, VLC seems picky about this, and still doesn't display
it. This may or may not have to do with the differing major_brand,
compatible_brands, or the structure of the MOOV atoms. *shrug*

At this point, we'd probably need to look at VLC's source code to
figure this out. :-P There is some udta parsing in VLC's
modules/demux/mp4/mp4.c, in function MP4_TrackCreate(). It doesn't look
picky, but what do I know.


More information about the ffmpeg-user mailing list