[FFmpeg-user] Naming an audio track

Moritz Barsnick barsnick at gmx.net
Mon Nov 3 10:21:39 CET 2014


On Mon, Nov 03, 2014 at 01:47:23 +0000, Carl Eugen Hoyos wrote:
> > $ HandBrakeCLI [...] --aname "Name of audio track 1,Name of audio track 2"
> If somebody could now either upload a small sample or 
> provide an actual command line, we could try to 
> implement the missing feature...

Sorry, I was quite tired and didn't know what I was thinking.

I'm attaching an artificially created file, as it's smaller than most
log files. ;-)

Created as such:
$ 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 in.mkv
$ HandBrakeCLI -i in.mkv -o out.mp4 --audio 1,2 --aname "880 Hz sine wave,1 kHz sine wave"

Sorry, my HandBrake is really old and has problems with the video, but
the point is moot: VLC shows the two audio tracks of out.mp4 exactly as
I tagged them with the HandBrake command line.

BTW, using ffmpeg, I notice that when I use
'-metadata:s:a:0 name="880 sine"', the file creation process shows me:
    Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 44100 Hz, mono, s16, 96 kb/s (default)
    Metadata:
      name            : 880 sine
      encoder         : Lavc56.10.100 libfdk_aac
yet ffprobe fails to display the "name" metadata in the resulting file.
This field - if it is a metadata field - does not seem to be supported
by the MP4 muxer, and again ffmpeg is "lying" ;-) about its metadata
creation - similar to the thread I started recently.

Moritz

P.S.: I can actually see the "tags" in a hexdump of the HandBrake
created file:

0000-21E0: A6 00 00 00 1C 73 74 73 - 63 00 00 00 00 00 00 00  .....stsc.......
0000-21F0: 01 00 00 00 01 00 00 00 - 17 00 00 00 01 00 00 00  ................
0000-2200: 14 73 74 63 6F 00 00 00 - 00 00 00 00 01 00 00 05  .stco...........
0000-2210: 56 00 00 00 20 75 64 74 - 61 00 00 00 18 6E 61 6D  V... udta....nam
0000-2220: 65 38 38 30 20 48 7A 20 - 73 69 6E 65 20 77 61 76  e880 Hz sine wav
0000-2230: 65 00 00 02 2F 74 72 61 - 6B 00 00 00 5C 74 6B 68  e.../trak...\tkh
0000-2240: 64 00 00 00 02 D0 7C F6 - 53 D0 7C F6 53 00 00 00  d.....|.S.|.S...
0000-2250: 03 00 00 00 00 00 00 5C - 00 00 00 00 00 00 00 00  .......\........

I do not know, though, whether "name" is a header such as "stco" or
"udta".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.mp4
Type: application/octet-stream
Size: 9421 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20141103/ca342f8f/attachment.obj>


More information about the ffmpeg-user mailing list