[FFmpeg-trac] #2873(FFmpeg:new): ffmpeg concat demuxer fails: mpeg files with different audio and video stream order
FFmpeg
trac at avcodec.org
Fri Aug 16 12:51:06 CEST 2013
#2873: ffmpeg concat demuxer fails: mpeg files with different audio and video
stream order
-------------------------------------+-------------------------------------
Reporter: kadmandux | Type: defect
Status: new | Priority: normal
Component: FFmpeg | Version:
Keywords: concat | unspecified
demuxer | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
I've 2 MPEG files with different order in audio and video stream, which I
want to join:
{{{
ffprobe MU2000134b.mpg
Input #0, mpeg, from 'MU2000134b.mpg':
Duration: 00:00:40.14, start: 0.500000, bitrate: 7713 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR
64:45 DAR 16:9], max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
ffprobe MU2000135b.mpg
Input #0, mpeg, from 'MU2000135b.mpg':
Duration: 00:02:09.82, start: 0.500000, bitrate: 7583 kb/s
Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR
64:45 DAR 16:9], max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
}}}
How to reproduce:
{{{
% ffmpeg -f concat -i lista.txt -c:a copy -c:v copy video.mpg
ffmpeg version N-55393-g3b2e99f Copyright (c) 2000-2013 the FFmpeg
developers
built on Aug 8 2013 21:32:57 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-
libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-
libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-
libxavs --
enable-libxvid --enable-zlib
libavutil 52. 41.100 / 52. 41.100
libavcodec 55. 24.100 / 55. 24.100
libavformat 55. 13.102 / 55. 13.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
[concat @ 026eb160] Estimating duration from bitrate, this may be
inaccurate
Input #0, concat, from 'lista.txt':
Duration: 00:00:00.00, start: 0.000000, bitrate: 256 kb/s
Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR
16:9]
, max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Output #0, mpeg, to 'video.mpg':
Metadata:
encoder : Lavf55.13.102
Stream #0:0: Video: mpeg2video, yuv420p, 720x576 [SAR 64:45 DAR 16:9],
q=2-3
1, max. 9100 kb/s, 25 fps, 90k tbn, 25 tbc
Stream #0:1: Audio: ac3, 48000 Hz, stereo, 256 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 368 fps=0.0 q=-1.0 size= 14306kB time=00:00:14.90
bitrate=7863.3kbits/
frame= 718 fps=717 q=-1.0 size= 27334kB time=00:00:28.90
bitrate=7747.0kbits/
frame= 915 fps=608 q=-1.0 size= 34646kB time=00:00:36.78
bitrate=7715.9kbits/
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=3763 size=41205
[mpeg @ 03a9ba40] packet too large, ignoring buffer limits to mux it
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=3763 size=41205
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=5788 size=41205
[mpeg @ 03a9ba40] packet too large, ignoring buffer limits to mux it
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=5788 size=41205
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=7825 size=41205
[mpeg @ 03a9ba40] packet too large, ignoring buffer limits to mux it
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=7825 size=41205
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=9862 size=41205
[mpeg @ 03a9ba40] packet too large, ignoring buffer limits to mux it
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=9862 size=41205
[mpeg @ 03a9ba40] buffer underflow i=1 bufi=11899 size=41205
}}}
The problem doesn't appears if, before the join operation, you reorder the
streams (with "-map" option) to have the same order in both files.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2873>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list