New submission from csm <[email protected]>:
When writing MP3 audio into an MP4 file, the container indicates an mp4a audio
track instead of an mp3 file. Using -f mov to force a different muxer creates a
container that correctly indicates mp3 audio.
Tested with revision 18677 and older; very old versions of ffmpeg (2007) wrote
correct containers.
Tools like flvcheck (output included) or mp4info confirm this:
$ ./ffmpeg_r18677 -y -i Test.avi -vcodec copy -acodec libmp3lame Test.mp4
FFmpeg version UNKNOWN-SVN_r18677, Copyright (c) 2000-2009 Fabrice Bellard, et
al.
configuration: --extra-version=SVN_r18677 --enable-gpl --enable-pthreads
--enable-libmp3lame --enable-libx264 --disable-ffplay --disable-ffserver
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Apr 24 2009 08:53:05, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Seems stream 0 codec frame rate differs from container frame rate: 30.03
(20000000/666033) -> 15.00 (15/1)
Input #0, avi, from 'Test.avi':
Duration: 00:00:05.39, start: 0.000000, bitrate: 1651 kb/s
Stream #0.0: Video: h264, yuv420p, 240x180, 15 tbr, 15.01 tbn, 30.03 tbc
Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Output #0, mp4, to 'Test.mp4':
Stream #0.0: Video: libx264, yuv420p, 240x180, q=2-31, 10000k tbn, 15.01 tbc
Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 81 fps= 0 q=-1.0 Lsize= 56kB time=5.30 bitrate= 85.8kbits/s
video:11kB audio:41kB global headers:0kB muxing overhead 5.418829%
$ flvcheck -v Test.mp4
FLVCheck version 1.0 - Utility to validate flv and mp4 media files.
Copyright (C) 2008 Adobe Systems Incorporated. All rights reserved.
www.adobe.com
File: Test.mp4
ftyp/ 32
free/ 8
mdat/ 53435
moov/ 3409
moov/mvhd/ 108
moov/trak/ 1144
moov/trak/tkhd/ 92
moov/trak/mdia/ 1044
moov/trak/mdia/mdhd/ 32
moov/trak/mdia/hdlr/ 45
moov/trak/mdia/minf/ 959
moov/trak/mdia/minf/vmhd/ 20
moov/trak/mdia/minf/dinf/ 36
moov/trak/mdia/minf/stbl/ 895
moov/trak/mdia/minf/stbl/stsd/ 151
moov/trak/mdia/minf/stbl/stsd/avc1/ 135
moov/trak/mdia/minf/stbl/stsd/avc1/avcC/ 49
moov/trak/mdia/minf/stbl/stts/ 24
moov/trak/mdia/minf/stbl/stsc/ 28
moov/trak/mdia/minf/stbl/stsz/ 344
moov/trak/mdia/minf/stbl/stco/ 340
moov/trak/ 2052
moov/trak/tkhd/ 92
moov/trak/mdia/ 1952
moov/trak/mdia/mdhd/ 32
moov/trak/mdia/hdlr/ 45
moov/trak/mdia/minf/ 1867
moov/trak/mdia/minf/smhd/ 16
moov/trak/mdia/minf/dinf/ 36
moov/trak/mdia/minf/stbl/ 1807
moov/trak/mdia/minf/stbl/stsd/ 87
moov/trak/mdia/minf/stbl/stsd/mp4a/ 71 <-- here it says
this is MP4A
moov/trak/mdia/minf/stbl/stsd/mp4a/esds/ 35
moov/udta/ 97
moov/udta/meta/ 89
moov/udta/meta/hdlr/ 34
moov/udta/meta/hdlr/ 34
moov/udta/meta/ilst/ 43
moov/udta/meta/ilst/©too/ 35
moov/udta/meta/ilst/©too/data/ 27
$ ./ffmpeg_r18677 -y -i Test.avi -vcodec copy -acodec libmp3lame -f mov
Test_mov.mp4
FFmpeg version UNKNOWN-SVN_r18677, Copyright (c) 2000-2009 Fabrice Bellard, et
al.
configuration: --extra-version=SVN_r18677 --enable-gpl --enable-pthreads
--enable-libmp3lame --enable-libx264 --disable-ffplay --disable-ffserver
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Apr 24 2009 08:53:05, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Seems stream 0 codec frame rate differs from container frame rate: 30.03
(20000000/666033) -> 15.00 (15/1)
Input #0, avi, from 'Test.avi':
Duration: 00:00:05.39, start: 0.000000, bitrate: 1651 kb/s
Stream #0.0: Video: h264, yuv420p, 240x180, 15 tbr, 15.01 tbn, 30.03 tbc
Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
[mov @ 0x1060b00]WARNING codec timebase is very high. If duration is too long,
file may not be playable by quicktime. Specify a shorter timebase
or choose different container.
Output #0, mov, to 'Test.mp4':
Stream #0.0: Video: libx264, yuv420p, 240x180, q=2-31, 10000k tbn, 15.01 tbc
Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 81 fps= 0 q=-1.0 Lsize= 56kB time=5.30 bitrate= 85.8kbits/s
video:11kB audio:41kB global headers:0kB muxing overhead 5.402150%
$ flvcheck -v Test_mov.mp4
FLVCheck version 1.0 - Utility to validate flv and mp4 media files.
Copyright (C) 2008 Adobe Systems Incorporated. All rights reserved.
www.adobe.com
File: Test_mov.mp4
ftyp/ 20
wide/ 8
mdat/ 53435
moov/ 3412
moov/mvhd/ 108
moov/trak/ 1188
moov/trak/tkhd/ 92
moov/trak/mdia/ 1088
moov/trak/mdia/mdhd/ 32
moov/trak/mdia/hdlr/ 45
moov/trak/mdia/minf/ 1003
moov/trak/mdia/minf/vmhd/ 20
moov/trak/mdia/minf/hdlr/ 44
moov/trak/mdia/minf/dinf/ 36
moov/trak/mdia/minf/stbl/ 895
moov/trak/mdia/minf/stbl/stsd/ 151
moov/trak/mdia/minf/stbl/stsd/avc1/ 135
moov/trak/mdia/minf/stbl/stsd/avc1/avcC/ 49
moov/trak/mdia/minf/stbl/stts/ 24
moov/trak/mdia/minf/stbl/stsc/ 28
moov/trak/mdia/minf/stbl/stsz/ 344
moov/trak/mdia/minf/stbl/stco/ 340
moov/trak/ 2077
moov/trak/tkhd/ 92
moov/trak/mdia/ 1977
moov/trak/mdia/mdhd/ 32
moov/trak/mdia/hdlr/ 45
moov/trak/mdia/minf/ 1892
moov/trak/mdia/minf/smhd/ 16
moov/trak/mdia/minf/hdlr/ 44
moov/trak/mdia/minf/dinf/ 36
moov/trak/mdia/minf/stbl/ 1788
moov/trak/mdia/minf/stbl/stsd/ 68
moov/trak/mdia/minf/stbl/stsd/.mp3/ 52 <-- and here it is MP3
moov/trak/mdia/minf/stbl/stts/ 24
moov/trak/mdia/minf/stbl/stsc/ 28
moov/trak/mdia/minf/stbl/stsz/ 832
moov/trak/mdia/minf/stbl/stco/ 828
moov/udta/ 31
moov/udta/©enc/ 23
File 'Test.avi' not attached - you can download it from
https://roundup.ffmpeg.org/roundup/ffmpegfile262.
----------
files: Test.avi
messages: 5188
priority: normal
status: new
substatus: new
title: MP3 audio is not correctly embedded into MP4 container
type: bug
_____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue1033>
_____________________________________________________