[FFmpeg-trac] #2157(avformat:new): -metadata track=1/10 and AAC issues

FFmpeg trac at avcodec.org
Sun Jan 20 10:44:39 CET 2013


#2157: -metadata track=1/10 and AAC issues
------------------------------------+------------------------------------
             Reporter:  Atarikid    |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by Atarikid):

 Ok here follows all information I can give you - including how it works
 fine with mp3 and a example file.

 First let us show how it should work.

 /Users/atarikid/Desktop/ffmpeg -i /Users/atarikid/Desktop/source.m4a -c:a
 libmp3lame -metadata track=1/10 /Users/atarikid/Desktop/output.mp3

 ffmpeg version N-48986-g9a038a9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 19 2013 08:27:49 with llvm-gcc 4.2.1 (LLVM build
 2336.11.00)
   configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-pthreads
 --disable-shared --enable-static --enable-libmp3lame --enable-libopus
 --enable-libvorbis --enable-libfaac --enable-postproc --enable-runtime-
 cpudetect --disable-debug --disable-network --disable-doc --enable-small
 --enable-nonfree
   libavutil      52. 15.100 / 52. 15.100
   libavcodec     54. 89.100 / 54. 89.100
   libavformat    54. 61.100 / 54. 61.100
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 32.100 /  3. 32.100
   libswscale      2.  1.103 /  2.  1.103
   libswresample   0. 17.102 /  0. 17.102
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/atarikid/Desktop/source.m4a':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     encoder         : Lavf54.61.100
   Duration: 00:00:04.85, start: 0.023220, bitrate: 98 kb/s
     Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
 fltp, 95 kb/s
     Metadata:
       handler_name    : SoundHandler
 File '/Users/atarikid/Desktop/output.mp3' already exists. Overwrite ?
 [y/N] y
 Output #0, mp3, to '/Users/atarikid/Desktop/output.mp3':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     TRCK            : 1/10
     TSSE            : Lavf54.61.100
     Stream #0:0(und): Audio: mp3, 44100 Hz, stereo, fltp
     Metadata:
       handler_name    : SoundHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (aac -> libmp3lame)
 Press [q] to stop, [?] for help
 size=      77kB time=00:00:04.85 bitrate= 129.2kbits/s
 video:0kB audio:76kB subtitle:0 global headers:0kB muxing overhead
 0.419663%




 Reading the output file:

 /Users/atarikid/Desktop/ffmpeg -i /Users/atarikid/Desktop/output.mp3

 ffmpeg version N-48986-g9a038a9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 19 2013 08:27:49 with llvm-gcc 4.2.1 (LLVM build
 2336.11.00)
   configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-pthreads
 --disable-shared --enable-static --enable-libmp3lame --enable-libopus
 --enable-libvorbis --enable-libfaac --enable-postproc --enable-runtime-
 cpudetect --disable-debug --disable-network --disable-doc --enable-small
 --enable-nonfree
   libavutil      52. 15.100 / 52. 15.100
   libavcodec     54. 89.100 / 54. 89.100
   libavformat    54. 61.100 / 54. 61.100
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 32.100 /  3. 32.100
   libswscale      2.  1.103 /  2.  1.103
   libswresample   0. 17.102 /  0. 17.102
 Input #0, mp3, from '/Users/atarikid/Desktop/output.mp3':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     track           : 1/10
     encoder         : Lavf54.61.100
   Duration: 00:00:04.88, start: 0.000000, bitrate: 128 kb/s
     Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
 At least one output file must be specified


 As you notice the track metadata reads 1/10 as it should.



 Now the same but to m4a

 /Users/atarikid/Desktop/ffmpeg -i /Users/atarikid/Desktop/source.m4a -c:a
 aac -strict -2 -metadata track=1/10 /Users/atarikid/Desktop/output.m4a


 ffmpeg version N-48986-g9a038a9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 19 2013 08:27:49 with llvm-gcc 4.2.1 (LLVM build
 2336.11.00)
   configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-pthreads
 --disable-shared --enable-static --enable-libmp3lame --enable-libopus
 --enable-libvorbis --enable-libfaac --enable-postproc --enable-runtime-
 cpudetect --disable-debug --disable-network --disable-doc --enable-small
 --enable-nonfree
   libavutil      52. 15.100 / 52. 15.100
   libavcodec     54. 89.100 / 54. 89.100
   libavformat    54. 61.100 / 54. 61.100
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 32.100 /  3. 32.100
   libswscale      2.  1.103 /  2.  1.103
   libswresample   0. 17.102 /  0. 17.102
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/atarikid/Desktop/source.m4a':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     encoder         : Lavf54.61.100
   Duration: 00:00:04.85, start: 0.023220, bitrate: 98 kb/s
     Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
 fltp, 95 kb/s
     Metadata:
       handler_name    : SoundHandler
 File '/Users/atarikid/Desktop/output.m4a' already exists. Overwrite ?
 [y/N] y
 Output #0, ipod, to '/Users/atarikid/Desktop/output.m4a':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     track           : 1/10
     encoder         : Lavf54.61.100
     Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
 fltp, 128 kb/s
     Metadata:
       handler_name    : SoundHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (aac -> aac)
 Press [q] to stop, [?] for help
 size=      77kB time=00:00:04.85 bitrate= 130.0kbits/s
 video:0kB audio:75kB subtitle:0 global headers:0kB muxing overhead
 2.081122%


 Reading the output file:

 /Users/atarikid/Desktop/ffmpeg -i /Users/atarikid/Desktop/output.m4a


 ffmpeg version N-48986-g9a038a9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 19 2013 08:27:49 with llvm-gcc 4.2.1 (LLVM build
 2336.11.00)
   configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-pthreads
 --disable-shared --enable-static --enable-libmp3lame --enable-libopus
 --enable-libvorbis --enable-libfaac --enable-postproc --enable-runtime-
 cpudetect --disable-debug --disable-network --disable-doc --enable-small
 --enable-nonfree
   libavutil      52. 15.100 / 52. 15.100
   libavcodec     54. 89.100 / 54. 89.100
   libavformat    54. 61.100 / 54. 61.100
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 32.100 /  3. 32.100
   libswscale      2.  1.103 /  2.  1.103
   libswresample   0. 17.102 /  0. 17.102
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/atarikid/Desktop/output.m4a':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     encoder         : Lavf54.61.100
     track           : 1
   Duration: 00:00:04.88, start: 0.023220, bitrate: 129 kb/s
     Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
 fltp, 126 kb/s
     Metadata:
       handler_name    : SoundHandler
 At least one output file must be specified


 The track metadata is now only 1 which is not correct.

 Notes:
 - It doesn't matter if you use aac, libfaac or any other aac encoder.
 - This issue also applies to ALAC encoding
 - All other codecs (ogg, wav, opus, ... ) it works fine as with mp3. So
 its only a .m4a issue


 Hopes this helps fixing this.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2157#comment:8>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list