[FFmpeg-trac] #6162(undetermined:new): concat protocol can't concat the same mp4 file?
FFmpeg
trac at avcodec.org
Sun Feb 19 07:05:22 EET 2017
#6162: concat protocol can't concat the same mp4 file?
-------------------------------------+-------------------------------------
Reporter: | Type: defect
JohnHawkinson | Priority: normal
Status: new | Version: git-
Component: | master
undetermined | Blocked By:
Keywords: concat | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug: concat protocol can't concat the same mp4 file?
Attempting to combine a 5-second MP4 file with a copy of itself fails, and
produces a 5-second MP4 output instead of a 10-second one.
How to reproduce:
{{{
# Produce a manageable file:
$ ffmpeg -t 5 MVI_6105.mp4 -c copy short5.mp4
$ ffmpeg -i concat:'short5.mp4|short5.mp4' 2x5.mp4 # fails
$ ffmpeg -i concat:'short5.mp4|short5.mp4' -c copy 2x5c.mp4 # also fails
$ cp short5.mp4 short5dupe.mp4
$ ffmpeg -i concat:'short5.mp4|short5dupe.mp4' -c copy 2x5c2.mp4 # also
also fails
# Here we are with copious output, and some ffprobe -ing as well:
$ ffprobe MVI_6105.mp4
ffprobe version git-2017-02-19-3206ea4 Copyright (c) 2007-2017 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-3206ea4 --enable-
shared --enable-pthreads --enable-gpl --enable-version3 --enable-
hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-
ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --disable-lzma --enable-vda
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.101 / 57. 80.101
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MVI_6105.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1CAEP
copyright :
copyright-eng :
creation_time : 2017-02-14T22:11:24.000000Z
Duration: 00:24:26.57, start: 0.000000, bitrate: 7509 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1280x720, 7372 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
(default)
Metadata:
creation_time : 2017-02-14T22:11:24.000000Z
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 127 kb/s (default)
Metadata:
creation_time : 2017-02-14T22:11:24.000000Z
$ ffmpeg -t 5 -i ../MVI_6105.mp4 -c copy short5.mp4
ffmpeg version git-2017-02-19-3206ea4 Copyright (c) 2000-2017 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-3206ea4 --enable-
shared --enable-pthreads --enable-gpl --enable-version3 --enable-
hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-
ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --disable-lzma --enable-vda
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.101 / 57. 80.101
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_6105.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1CAEP
copyright :
copyright-eng :
creation_time : 2017-02-14T22:11:24.000000Z
Duration: 00:24:26.57, start: 0.000000, bitrate: 7509 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1280x720, 7372 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
(default)
Metadata:
creation_time : 2017-02-14T22:11:24.000000Z
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 127 kb/s (default)
Metadata:
creation_time : 2017-02-14T22:11:24.000000Z
Output #0, mp4, to 'short5.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1CAEP
copyright :
copyright-eng :
encoder : Lavf57.66.102
Stream #0:0(eng): Video: h264 (High) ([33][0][0][0] / 0x0021),
yuv420p(tv, bt709), 1280x720, q=2-31, 7372 kb/s, 29.97 fps, 29.97 tbr, 30k
tbn, 30k tbc (default)
Metadata:
creation_time : 2017-02-14T22:11:24.000000Z
Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, fltp, 127 kb/s (default)
Metadata:
creation_time : 2017-02-14T22:11:24.000000Z
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 153 fps=0.0 q=-1.0 Lsize= 4945kB time=00:00:04.99
bitrate=8114.3kbits/s speed= 321x
video:4860kB audio:78kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.128599%
$ ffprobe short5.mp4
ffprobe version git-2017-02-19-3206ea4 Copyright (c) 2007-2017 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-3206ea4 --enable-
shared --enable-pthreads --enable-gpl --enable-version3 --enable-
hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-
ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --disable-lzma --enable-vda
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.101 / 57. 80.101
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'short5.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.102
Duration: 00:00:05.11, start: 0.000000, bitrate: 7933 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1280x720, 7799 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
(default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
$ ffmpeg -i concat:'short5.mp4|short5.mp4' 2x5.mp4
ffmpeg version git-2017-02-19-3206ea4 Copyright (c) 2000-2017 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-3206ea4 --enable-
shared --enable-pthreads --enable-gpl --enable-version3 --enable-
hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-
ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --disable-lzma --enable-vda
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.101 / 57. 80.101
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb94900da00] Found duplicated MOOV Atom.
Skipped it
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:short5.mp4|short5.mp4':
Metadata:
encoder : Lavf57.66.102
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
Duration: 00:00:05.11, start: 0.000000, bitrate: 15866 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1280x720, 7799 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
(default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
[libx264 @ 0x7fb949011600] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fb949011600] profile High, level 3.1
[libx264 @ 0x7fb949011600] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options:
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '2x5.mp4':
Metadata:
compatible_brands: isomiso2avc1mp41
major_brand : isom
minor_version : 512
encoder : Lavf57.66.102
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 1280x720, q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.80.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.80.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 151 fps= 37 q=-1.0 Lsize= 814kB time=00:00:05.01
bitrate=1329.5kbits/s speed=1.23x
video:726kB audio:81kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.825945%
[libx264 @ 0x7fb949011600] frame I:1 Avg QP:22.06 size: 30505
[libx264 @ 0x7fb949011600] frame P:38 Avg QP:22.24 size: 11265
[libx264 @ 0x7fb949011600] frame B:112 Avg QP:24.77 size: 2536
[libx264 @ 0x7fb949011600] consecutive B-frames: 0.7% 0.0% 4.0% 95.4%
[libx264 @ 0x7fb949011600] mb I I16..4: 26.2% 57.1% 16.7%
[libx264 @ 0x7fb949011600] mb P I16..4: 3.4% 5.1% 0.6% P16..4: 31.6%
9.4% 6.0% 0.0% 0.0% skip:43.9%
[libx264 @ 0x7fb949011600] mb B I16..4: 0.5% 1.1% 0.0% B16..8: 29.4%
2.1% 0.3% direct: 0.7% skip:65.9% L0:42.1% L1:53.0% BI: 4.9%
[libx264 @ 0x7fb949011600] 8x8 transform intra:60.1% inter:78.8%
[libx264 @ 0x7fb949011600] coded y,uvDC,uvAC intra: 24.4% 23.6% 4.5%
inter: 5.5% 5.4% 0.0%
[libx264 @ 0x7fb949011600] i16 v,h,dc,p: 27% 35% 10% 28%
[libx264 @ 0x7fb949011600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 23% 38% 3%
4% 3% 4% 3% 3%
[libx264 @ 0x7fb949011600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 19% 12% 5%
6% 6% 6% 7% 4%
[libx264 @ 0x7fb949011600] i8c dc,h,v,p: 73% 13% 13% 2%
[libx264 @ 0x7fb949011600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fb949011600] ref P L0: 61.6% 9.9% 20.4% 8.2%
[libx264 @ 0x7fb949011600] ref B L0: 83.1% 13.2% 3.7%
[libx264 @ 0x7fb949011600] ref B L1: 93.4% 6.6%
[libx264 @ 0x7fb949011600] kb/s:1179.15
[aac @ 0x7fb949014e00] Qavg: 815.755
pb3:test jhawk$ ffmpeg -i concat:'short5.mp4|short5.mp4' -c copy 2x5c.mp4
ffmpeg version git-2017-02-19-3206ea4 Copyright (c) 2000-2017 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-3206ea4 --enable-
shared --enable-pthreads --enable-gpl --enable-version3 --enable-
hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-
ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --disable-lzma --enable-vda
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.101 / 57. 80.101
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f88eb000000] Found duplicated MOOV Atom.
Skipped it
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:short5.mp4|short5.mp4':
Metadata:
encoder : Lavf57.66.102
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
Duration: 00:00:05.11, start: 0.000000, bitrate: 15866 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1280x720, 7799 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
(default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
Output #0, mp4, to '2x5c.mp4':
Metadata:
compatible_brands: isomiso2avc1mp41
major_brand : isom
minor_version : 512
encoder : Lavf57.66.102
Stream #0:0(eng): Video: h264 (High) ([33][0][0][0] / 0x0021),
yuv420p(tv, bt709), 1280x720, q=2-31, 7799 kb/s, 29.97 fps, 29.97 tbr, 30k
tbn, 30k tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 153 fps=0.0 q=-1.0 Lsize= 4945kB time=00:00:04.99
bitrate=8114.3kbits/s speed= 671x
video:4860kB audio:78kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.128757%
$ ffprobe 2x5.mp4
ffprobe version git-2017-02-19-3206ea4 Copyright (c) 2007-2017 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-3206ea4 --enable-
shared --enable-pthreads --enable-gpl --enable-version3 --enable-
hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-
ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --disable-lzma --enable-vda
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.101 / 57. 80.101
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2x5.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.102
Duration: 00:00:05.04, start: 0.000000, bitrate: 1322 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720, 1180 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 131 kb/s (default)
Metadata:
handler_name : SoundHandler
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6162>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list