[FFmpeg-trac] #3918(avcodec:new): MP2 audio encoder increases stream duration

FFmpeg trac at avcodec.org
Tue Sep 2 20:56:57 CEST 2014


#3918: MP2 audio encoder increases stream duration
---------------------------------+----------------------------------
             Reporter:  abc123   |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  avcodec  |                  Version:  2.3
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+----------------------------------
 Summary of the bug:

 When using the "mp2" audio encoder, the output file is longer than the
 input file by an amount that depends on the original duration.

 In the example (5 minute) file, the output duration was increased by 2
 seconds. For a movie length title, I have observed increases of around 10
 seconds. The input content does not appear to matter.

 How to reproduce:
 {{{
 % ffmpeg -i ~/tmp/test.mp3 ~/out.mp2
 ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers
   built on Sep  2 2014 11:24:19 with gcc 4.6 (Ubuntu/Linaro
 4.6.3-1ubuntu5)
   configuration:
   libavutil      52. 92.100 / 52. 92.100
   libavcodec     55. 69.100 / 55. 69.100
   libavformat    55. 48.100 / 55. 48.100
   libavdevice    55. 13.102 / 55. 13.102
   libavfilter     4. 11.100 /  4. 11.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
 Input #0, mp3, from '/home/user/tmp/test.mp3':
   Duration: 00:04:53.46, start: 0.025056, bitrate: 327 kb/s
     Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
 Output #0, mp2, to '/home/user/out.mp2':
     Stream #0:0: Audio: mp2, 44100 Hz, stereo, s16, 384 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (mp3 (native) -> mp2 (native))
 Press [q] to stop, [?] for help
 size=   13756kB time=00:04:53.44 bitrate= 384.0kbits/s
 video:0kB audio:13756kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.000000%

 % ffprobe ~/out.mp2
 ffprobe version 2.3.3 Copyright (c) 2007-2014 the FFmpeg developers
   built on Sep  2 2014 11:24:19 with gcc 4.6 (Ubuntu/Linaro
 4.6.3-1ubuntu5)
   configuration:
   libavutil      52. 92.100 / 52. 92.100
   libavcodec     55. 69.100 / 55. 69.100
   libavformat    55. 48.100 / 55. 48.100
   libavdevice    55. 13.102 / 55. 13.102
   libavfilter     4. 11.100 /  4. 11.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
 [mp3 @ 0x2c41020] Estimating duration from bitrate, this may be inaccurate
 Input #0, mp3, from '/home/user/out.mp2':
   Duration: 00:04:55.00, start: 0.000000, bitrate: 381 kb/s
     Stream #0:0: Audio: mp2, 44100 Hz, stereo, s16p, 381 kb/s
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

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


More information about the FFmpeg-trac mailing list