[FFmpeg-trac] #2697(undetermined:new): MP3 output duration incorrect in OS X

FFmpeg trac at avcodec.org
Sat Jun 22 22:59:05 CEST 2013


#2697: MP3 output duration incorrect in OS X
-------------------------------------+-------------------------------------
               Reporter:  llogan     |                  Owner:
                   Type:  defect     |                 Status:  new
               Priority:  normal     |              Component:
                Version:  git-       |  undetermined
  master                             |               Keywords:  mp3
             Blocked By:             |               Blocking:
Reproduced by developer:  0          |  Analyzed by developer:  0
-------------------------------------+-------------------------------------
 Quicktime Player 10.2 (603.17) and Finder 10.8.3 on OS X 10.8.4 report
 duration as 5:43 instead of 5:00 when using default settings. iTunes
 11.0.4 reports proper duration.

 Command lines and outputs from a Linux machine.
 {{{
 $ ./ffmpeg -f lavfi -i sine=d=300 duration.mp3
 ffmpeg version N-54122-g03cd3be Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jun 20 2013 12:18:56 with gcc 4.8.1 (GCC)
   configuration: --prefix=/home/lrcd/ffmpeg_build --extra-
 cflags=-I/home/lrcd/ffmpeg_build/include --extra-
 ldflags=-L/home/lrcd/ffmpeg_build/lib --bindir=/home/lrcd/bin --extra-
 libs=-ldl --enable-gpl --enable-libfdk-aac --enable-libmp3lame --enable-
 libx264 --enable-nonfree
   libavutil      52. 37.101 / 52. 37.101
   libavcodec     55. 16.100 / 55. 16.100
   libavformat    55.  9.100 / 55.  9.100
   libavdevice    55.  2.100 / 55.  2.100
   libavfilter     3. 77.101 /  3. 77.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, lavfi, from 'sine=d=300':
   Duration: N/A, start: 0.000000, bitrate: 705 kb/s
     Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
 Output #0, mp3, to 'duration.mp3':
   Metadata:
     TSSE            : Lavf55.9.100
     Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, s16p
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le -> libmp3lame)
 Press [q] to stop, [?] for help
 size=    2344kB time=00:05:00.01 bitrate=  64.0kbits/s
 video:0kB audio:2344kB subtitle:0 global headers:0kB muxing overhead
 0.009415%
 }}}

 If -ab is added with a value at or below 52k for this example then time
 will begin to vary. With Finder, 53k results in 5:00, 52k results in 4:17,
 and 32k results in 2:51 (I don't have the commands and outputs for these).
 If output is piped then the duration is correct in Finder and Quicktime.

 {{{
 $ ./ffmpeg -f lavfi -i sine=d=300 -f mp3 - >duration-pipe.mp3
 ffmpeg version N-54122-g03cd3be Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jun 20 2013 12:18:56 with gcc 4.8.1 (GCC)
   configuration: --prefix=/home/lrcd/ffmpeg_build --extra-
 cflags=-I/home/lrcd/ffmpeg_build/include --extra-
 ldflags=-L/home/lrcd/ffmpeg_build/lib --bindir=/home/lrcd/bin --extra-
 libs=-ldl --enable-gpl --enable-libfdk-aac --enable-libmp3lame --enable-
 libx264 --enable-nonfree
   libavutil      52. 37.101 / 52. 37.101
   libavcodec     55. 16.100 / 55. 16.100
   libavformat    55.  9.100 / 55.  9.100
   libavdevice    55.  2.100 / 55.  2.100
   libavfilter     3. 77.101 /  3. 77.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, lavfi, from 'sine=d=300':
   Duration: N/A, start: 0.000000, bitrate: 705 kb/s
     Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
 Output #0, mp3, to 'pipe:':
   Metadata:
     TSSE            : Lavf55.9.100
     Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, s16p
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le -> libmp3lame)
 Press [q] to stop, [?] for help
 size=    2344kB time=00:05:00.01 bitrate=  64.0kbits/s
 video:0kB audio:2344kB subtitle:0 global headers:0kB muxing overhead
 0.001833%
 }}}

 Quicktime Player 7.7.4 for Windows shows the correct times for these
 files. I have not yet checked for a regression and may not have a chance
 to test on this borrowed Apple computer.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2697>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list