[FFmpeg-user] ffmpeg fails joining two MPEG2 files

Gilles codecomplete at free.fr
Fri Mar 21 14:59:06 CET 2014


Hello

	Based on the FAQ, I used the following command to join two 2GB MPEG2
files (total time: about 1h) shot with my camcorder:

========================
c:\>ffmpeg -i concat:"M2U00075.MPG|M2U00076.MPG" -c copy
intermediate_all.mpg
ffmpeg version N-61663-g19139d8 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Mar 20 2014 22:01:15 with gcc 4.8.2 (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-libvidstab
--enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavp
ack --enable-libx264 --enable-libx265 --enable-libxavs
--enable-libxvid --enable
-zlib
  libavutil      52. 67.100 / 52. 67.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 34.101 / 55. 34.101
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpeg, from 'concat:M2U00075.MPG|M2U00076.MPG':
  Duration: 01:01:12.92, start: 0.226767, bitrate: 9238 kb/s
    Stream #0:0[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576
[SAR 64:4
5 DAR 16:9], max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
[mpeg @ 03f11260] ac3 in MPEG-1 system streams is not widely
supported, consider
 using the vob or the dvd muxer to force a MPEG-2 program stream.
Output #0, mpeg, to 'intermediate_all.mpg':
  Metadata:
    encoder         : Lavf55.34.101
    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, 5.1(side), 448 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  860 fps=0.0 q=-1.0 size=   36558kB time=00:00:34.36
bitrate=8716.0kbits/
frame= 1756 fps=0.0 q=-1.0 size=   75450kB time=00:01:10.20
bitrate=8804.6kbits/
frame= 2601 fps=1734 q=-1.0 size=  113680kB time=00:01:44.00
bitrate=8954.5kbits
frame= 3442 fps=1721 q=-1.0 size=  151322kB time=00:02:17.64
bitrate=9006.3kbits
frame= 3711 fps=141 q=-1.0 size=  163316kB time=00:02:28.40
bitrate=9015.4kbits/
frame= 3711 fps= 87 q=-1.0 Lsize=  163486kB time=00:02:28.40
bitrate=9024.8kbits
/s
video:154741kB audio:8107kB subtitle:0 data:0 global headers:0kB
muxing overhead
 0.392182%
c:\>
=============================

As shown above, ffmpeg gives up after about 2mn30 into the file.

Here's what MediaInfo says about the first file:
=========================
General
Complete name                            : C:\M2U00075.MPG
Format                                   : MPEG-PS
File size                                : 1.98 GiB
Duration                                 : 30mn 34s
Overall bit rate mode                    : Variable
Overall bit rate                         : 9 265 Kbps

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main at Main
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=12
Duration                                 : 30mn 34s
Bit rate mode                            : Variable
Bit rate                                 : 8 633 Kbps
Maximum bit rate                         : 9 100 Kbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.833
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
Stream size                              : 1.84 GiB (93%)

Audio
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 30mn 33s
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R,
LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -80ms
Stream size                              : 97.9 MiB (5%)
=========================

Any idea what's wrong with the files that prevents ffmpeg from running
that task to completion?

Thank you.



More information about the ffmpeg-user mailing list