[FFmpeg-user] mp4 concatenation (muxer) problems -- invalid output?
John A Hawkinson
jhawk at mit.edu
Mon Feb 20 03:33:22 EET 2017
Hi:
I filed a bug yesterday and Cigaes suggested my problem wasn't
really a bug and I should seek out help here, so I'm doing so. (Would it
be better for me to try to do this in html email with some markup instead
of plain text? Sorry there's so much ffmpeg/ffprobe output involved.)
See https://trac.ffmpeg.org/ticket/6163 and especially "short1.mp4" at
https://trac.ffmpeg.org/attachment/ticket/6162/short1.mp4
My ultimate goal is to take a series of MP4 video files that are
recorded nearly consecutive with a few seconds of gap in between, and
stitch them together with freeze-frames, and replace their audio with
separately-recorded mp3 audio, all ideally without having to do major
transcoding or being stuck with expensive realtime rendering steps. The
target of this workflow is typically Youtube. (My workflow for this
tends to involve lining up the clips in Premiere Pro, exporting an EDL,
and then producing ffmpeg commandlines from the EDL.) I've done this
successfully in the past, although this time I am running into problems.
--------------------
I cut down my original 24-minute MP4 video to a 1-second version
for test replication purposes with "ffmpeg -t 1 -i ../MVI_6105.mp4 -c
copy short1.mp4" (See
https://trac.ffmpeg.org/ticket/6162?replyto=6#comment:1
for the ffmpeg output).
Then I extracted a PNG still with "ffmpeg -i short1.mp4 -frames:v 1
-f image2 f1.png"; so far so good.
My intention is to then produce a freeze-frame MP4 from that still
and concatenate it with the original video, and that's where I start to
run into problems. Cigaes suggested that having audio in in "short1.mp4"
but not in the video from the freeze-frame meant I was not obeying the
concat demuxer requirement of "All files must have the same streams
(same codecs, same time base, etc.)." requirement. In the past I thought
I had done this successfully, but to avoid those issues while
investigating the bug, I re-extracted the 1-second video with "-an" to
remove audio:
pb3:test jhawk$ ffmpeg -t 1 -i ../MVI_6105.mp4 -c copy -an short1s.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 'short1s.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 mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 33 fps=0.0 q=-1.0 Lsize= 1153kB time=00:00:00.96
bitrate=9764.4kbits/s speed= 310x
video:1152kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.100941%
----------
Here's the ffprobe output:
pb3:test jhawk$ ffprobe short1s.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 'short1s.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.102
Duration: 00:00:01.10, start: 0.000000, bitrate: 8574 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661),
yuv420p(tv, bt709), 1280x720, 8572 kb/s, 29.97 fps, 29.97 tbr, 30k
tbn, 60k tbc (default)
Metadata:
handler_name : VideoHandler
--------------------
Next, I frame-hold the PNG for 3.933 seconds; In #6163 I was advised
that -r 29.97 might be wrong, but I don't know why it would be or what
would be better -- without it I get 25fps which seems clearly wrong:
pb3:test jhawk$ ffmpeg -loop 1 -i f1.png -t 3.933 -pix_fmt yuv420p -r 29.97 h5.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, png_pipe, from 'f1.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgb24(pc), 1280x720, 25 fps, 25 tbr, 25
tbn, 25 tbc
File 'h5.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0x7f9975000c00] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7f9975000c00] profile High, level 3.1
[libx264 @ 0x7f9975000c00] 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 'h5.mp4':
Metadata:
encoder : Lavf57.66.102
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 1280x720, q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc
Metadata:
encoder : Lavc57.80.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 56 fps=0.0 q=29.0 size= 55kB time=00:00:00.10
bitrate=4474.0kbits/s dup=9 drop=0 speed=0.197x frame= 104 fps=103
q=29.0 size= 58kB time=00:00:01.70 bitrate= 279.3kbits/s dup=17
drop=0 speed=1.69x frame= 117 fps= 80 q=-1.0 Lsize= 64kB
time=00:00:03.80 bitrate= 137.6kbits/s dup=19 drop=0 speed=2.61x
video:62kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 3.542316%
[libx264 @ 0x7f9975000c00] frame I:1 Avg QP:15.63 size: 53680
[libx264 @ 0x7f9975000c00] frame P:29 Avg QP:15.71 size: 156
[libx264 @ 0x7f9975000c00] frame B:87 Avg QP:32.33 size: 49
[libx264 @ 0x7f9975000c00] consecutive B-frames: 0.9% 0.0% 0.0% 99.1%
[libx264 @ 0x7f9975000c00] mb I I16..4: 7.5% 65.5% 27.0%
[libx264 @ 0x7f9975000c00] mb P I16..4: 0.0% 0.0% 0.0% P16..4:
1.1% 0.1% 0.0% 0.0% 0.0% skip:98.8%
[libx264 @ 0x7f9975000c00] mb B I16..4: 0.0% 0.0% 0.0% B16..8:
0.4% 0.0% 0.0% direct: 0.0% skip:99.6% L0:15.3% L1:84.7% BI: 0.0%
[libx264 @ 0x7f9975000c00] 8x8 transform intra:65.5% inter:98.8%
[libx264 @ 0x7f9975000c00] coded y,uvDC,uvAC intra: 70.9% 47.1% 30.8%
inter: 0.0% 0.1% 0.0%
[libx264 @ 0x7f9975000c00] i16 v,h,dc,p: 21% 36% 6% 37%
[libx264 @ 0x7f9975000c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 25% 16%
4% 4% 5% 4% 5% 6%
[libx264 @ 0x7f9975000c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 45% 20% 7%
5% 5% 6% 4% 6% 3%
[libx264 @ 0x7f9975000c00] i8c dc,h,v,p: 61% 15% 20% 4%
[libx264 @ 0x7f9975000c00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f9975000c00] ref P L0: 97.3% 0.0% 2.2% 0.5%
[libx264 @ 0x7f9975000c00] ref B L0: 55.6% 44.4%
[libx264 @ 0x7f9975000c00] ref B L1: 90.5% 9.5%
[libx264 @ 0x7f9975000c00] kb/s:128.06
pb3:test jhawk$ ffprobe h5.mp4
ffprobe version git-2017-02-19-aa2b752 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-aa2b752 --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 'h5.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.102
Duration: 00:00:03.90, start: 0.000000, bitrate: 134 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 129 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
--------------------
So, now I want to concatenate the held frame (3.9 seconds) with the
video (1.1 seconds). Their formats are not EXACTLY the same, as reported
by ffprobe, but they are close:
Duration: 00:00:03.90, start: 0.000000, bitrate: 134 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 129 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Duration: 00:00:01.10, start: 0.000000, bitrate: 8574 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 8572 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
So here's the concatenation, the first time without -c copy, so it
should be slower but more likely to work (?):
pb3:test jhawk$ echo -e 'ffconcat version 1.0\n\nfile h5.mp4\nfile short1s.mp4\n' > concat7
pb3:test jhawk$ ffmpeg -f concat -i concat7 concat7t.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 @ 0x7f8184016c00] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'concat7':
Duration: N/A, start: 0.000000, bitrate: 129 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 129 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc
Metadata:
handler_name : VideoHandler
[libx264 @ 0x7f818580d200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7f818580d200] profile High, level 3.1
[libx264 @ 0x7f818580d200] 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 'concat7t.mp4':
Metadata:
encoder : Lavf57.66.102
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc
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 mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f8184016c00] Auto-inserting h264_mp4toannexb bitstream filter8x
[h264 @ 0x7f818580d800] top block unavailable for requested intra mode -1
[h264 @ 0x7f818580d800] error while decoding MB 0 0, bytestream 119433
[h264 @ 0x7f818580d800] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
[h264 @ 0x7f8184801600] illegal modification_of_pic_nums_idc 10
[h264 @ 0x7f8184801600] decode_slice_header error
[h264 @ 0x7f8184801600] no frame!
[h264 @ 0x7f8184801c00] illegal modification_of_pic_nums_idc 18
[h264 @ 0x7f8184801c00] decode_slice_header error
[h264 @ 0x7f8184801c00] no frame!
[h264 @ 0x7f8185026600] illegal modification_of_pic_nums_idc 30
[h264 @ 0x7f8185026600] decode_slice_header error
[h264 @ 0x7f8185026600] no frame!
[h264 @ 0x7f818500f800] illegal modification_of_pic_nums_idc 16
[h264 @ 0x7f818500f800] decode_slice_header error
[h264 @ 0x7f818500f800] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818580d800] illegal modification_of_pic_nums_idc 14
[h264 @ 0x7f818580d800] decode_slice_header error
[h264 @ 0x7f818580d800] no frame!
[h264 @ 0x7f8184801600] illegal modification_of_pic_nums_idc 24
[h264 @ 0x7f8184801600] decode_slice_header error
[h264 @ 0x7f8184801600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
Last message repeated 1 times
[h264 @ 0x7f8184801c00] illegal modification_of_pic_nums_idc 14
[h264 @ 0x7f8184801c00] decode_slice_header error
[h264 @ 0x7f8184801c00] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f8185026600] illegal modification_of_pic_nums_idc 14
[h264 @ 0x7f8185026600] decode_slice_header error
[h264 @ 0x7f8185026600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818500f800] illegal modification_of_pic_nums_idc 26
[h264 @ 0x7f818500f800] decode_slice_header error
[h264 @ 0x7f818500f800] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818580d800] illegal modification_of_pic_nums_idc 14
[h264 @ 0x7f818580d800] decode_slice_header error
[h264 @ 0x7f818580d800] no frame!
[h264 @ 0x7f8184801600] illegal modification_of_pic_nums_idc 14
[h264 @ 0x7f8184801600] decode_slice_header error
[h264 @ 0x7f8184801600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
Last message repeated 1 times
[h264 @ 0x7f8184801c00] illegal modification_of_pic_nums_idc 26
[h264 @ 0x7f8184801c00] decode_slice_header error
[h264 @ 0x7f8184801c00] no frame!
[h264 @ 0x7f8185026600] illegal modification_of_pic_nums_idc 14
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f8185026600] decode_slice_header error
[h264 @ 0x7f8185026600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818500f800] illegal modification_of_pic_nums_idc 14
[h264 @ 0x7f818500f800] decode_slice_header error
[h264 @ 0x7f818500f800] no frame!
[h264 @ 0x7f818580d800] top block unavailable for requested intra mode -1
[h264 @ 0x7f818580d800] error while decoding MB 0 0, bytestream 126059
[h264 @ 0x7f818580d800] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
Error while decoding stream #0:0: Invalid data found when processing input
Last message repeated 1 times
[h264 @ 0x7f8184801600] illegal modification_of_pic_nums_idc 26
[h264 @ 0x7f8184801600] decode_slice_header error
[h264 @ 0x7f8184801600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f8184801c00] illegal modification_of_pic_nums_idc 14
[h264 @ 0x7f8184801c00] decode_slice_header error
[h264 @ 0x7f8184801c00] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f8185026600] illegal modification_of_pic_nums_idc 22
[h264 @ 0x7f8185026600] decode_slice_header error
[h264 @ 0x7f8185026600] no frame!
[h264 @ 0x7f818500f800] illegal modification_of_pic_nums_idc 10
[h264 @ 0x7f818500f800] decode_slice_header error
[h264 @ 0x7f818500f800] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818580d800] illegal modification_of_pic_nums_idc 8
[h264 @ 0x7f818580d800] decode_slice_header error
[h264 @ 0x7f818580d800] no frame!
[h264 @ 0x7f8184801600] illegal modification_of_pic_nums_idc 22
[h264 @ 0x7f8184801600] decode_slice_header error
[h264 @ 0x7f8184801600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
Last message repeated 1 times
[h264 @ 0x7f8184801c00] illegal modification_of_pic_nums_idc 12
[h264 @ 0x7f8184801c00] decode_slice_header error
[h264 @ 0x7f8184801c00] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f8185026600] illegal modification_of_pic_nums_idc 10
[h264 @ 0x7f8185026600] decode_slice_header error
[h264 @ 0x7f8185026600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818500f800] illegal modification_of_pic_nums_idc 22
[h264 @ 0x7f818500f800] decode_slice_header error
[h264 @ 0x7f818500f800] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818580d800] illegal modification_of_pic_nums_idc 10
[h264 @ 0x7f818580d800] decode_slice_header error
[h264 @ 0x7f818580d800] no frame!
[h264 @ 0x7f8184801600] illegal modification_of_pic_nums_idc 12
[h264 @ 0x7f8184801600] decode_slice_header error
[h264 @ 0x7f8184801600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
Last message repeated 1 times
[h264 @ 0x7f8184801c00] illegal modification_of_pic_nums_idc 20
[h264 @ 0x7f8184801c00] decode_slice_header error
[h264 @ 0x7f8184801c00] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f8185026600] illegal modification_of_pic_nums_idc 10
[h264 @ 0x7f8185026600] decode_slice_header error
[h264 @ 0x7f8185026600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818500f800] illegal modification_of_pic_nums_idc 6
[h264 @ 0x7f818500f800] decode_slice_header error
[h264 @ 0x7f818500f800] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7f818580d800] left block unavailable for requested intra4x4 mode -1
[h264 @ 0x7f818580d800] error while decoding MB 0 0, bytestream 116021
[h264 @ 0x7f818580d800] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
[h264 @ 0x7f8184801600] illegal modification_of_pic_nums_idc 26
[h264 @ 0x7f8184801600] decode_slice_header error
[h264 @ 0x7f8184801600] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
Last message repeated 1 times
[h264 @ 0x7f8184801c00] illegal modification_of_pic_nums_idc 16
[h264 @ 0x7f8184801c00] decode_slice_header error
[h264 @ 0x7f8184801c00] no frame!
frame= 333 fps=199 q=29.0 size= 129kB time=00:00:09.34 bitrate= 113.4kbits/s dup=214 drop=0 speed=5.59x Error while decoding stream #0:0: Invalid data found when processing input
frame= 405 fps=161 q=-1.0 Lsize= 141kB time=00:00:13.41 bitrate= 86.3kbits/s dup=285 drop=0 speed=5.32x
video:136kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.091612%
[libx264 @ 0x7f818580d200] frame I:2 Avg QP:14.28 size: 56781
[libx264 @ 0x7f818580d200] frame P:102 Avg QP:17.83 size: 81
[libx264 @ 0x7f818580d200] frame B:301 Avg QP:32.31 size: 55
[libx264 @ 0x7f818580d200] consecutive B-frames: 0.7% 0.5% 0.0% 98.8%
[libx264 @ 0x7f818580d200] mb I I16..4: 6.6% 67.1% 26.4%
[libx264 @ 0x7f818580d200] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.4% 0.0% 0.0% 0.0% 0.0% skip:99.6%
[libx264 @ 0x7f818580d200] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.5% 0.0% 0.0% direct: 0.0% skip:99.5% L0:37.3% L1:62.7% BI: 0.0%
[libx264 @ 0x7f818580d200] 8x8 transform intra:67.2% inter:94.1%
[libx264 @ 0x7f818580d200] coded y,uvDC,uvAC intra: 69.5% 46.9% 30.1% inter: 0.0% 0.1% 0.0%
[libx264 @ 0x7f818580d200] i16 v,h,dc,p: 21% 31% 11% 36%
[libx264 @ 0x7f818580d200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 26% 13% 4% 4% 5% 4% 5% 6%
[libx264 @ 0x7f818580d200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 45% 20% 7% 5% 5% 6% 4% 6% 3%
[libx264 @ 0x7f818580d200] i8c dc,h,v,p: 61% 15% 20% 4%
[libx264 @ 0x7f818580d200] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f818580d200] ref P L0: 76.7% 0.1% 8.4% 14.7%
[libx264 @ 0x7f818580d200] ref B L0: 51.6% 48.1% 0.3%
[libx264 @ 0x7f818580d200] ref B L1: 98.4% 1.6%
[libx264 @ 0x7f818580d200] kb/s:81.92
--------------------
This does not work. When I run VLC on this output, I get the still held
for about 13 seconds. That's consistent with ffprobe showing me a 13.5
second duration:
pb3:test jhawk$ ffprobe concat7t.mp4
ffprobe version git-2017-02-19-aa2b752 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-aa2b752 --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 'concat7t.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.102
Duration: 00:00:13.51, start: 0.000000, bitrate: 85 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 82 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
--------------------
Maybe it's still to try this with -c copy, but since that's my eventual
goal and it seems to be a different code path, here's how that goes. It
also does not work:
pb3:test jhawk$ ffmpeg -f concat -i concat7 -c copy concat7.mp4
ffmpeg version git-2017-02-19-aa2b752 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-aa2b752 --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 @ 0x7fe47180f400] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'concat7':
Duration: N/A, start: 0.000000, bitrate: 129 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 129 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc
Metadata:
handler_name : VideoHandler
Output #0, mp4, to 'concat7.mp4':
Metadata:
encoder : Lavf57.66.102
Stream #0:0(und): Video: h264 (High) ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=2-31, 129 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 11988 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe472808000] Auto-inserting h264_mp4toannexb bitstream filter
frame= 150 fps=0.0 q=-1.0 Lsize= 1216kB time=00:00:12.19 bitrate= 817.4kbits/s speed= 627x
video:1214kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.208274%
--------------------
It gives a similar but not identical result in VLC -- still plays
for 4 seconds and then VLC hangs playback for a few seconds, then
I see the still for a few more, but never the video.
ffprobe reports:
pb3:test jhawk$ ffprobe concat7.mp4
ffprobe version git-2017-02-19-aa2b752 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-aa2b752 --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 'concat7.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.102
Duration: 00:00:12.34, start: 0.000000, bitrate: 807 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 805 kb/s, 12.15 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
--------------------
That is, it shows a duration of 12.34 seconds. Nothing like the expected
4.9 seconds, and also differnet form the invokation without -c copy.
What more information can I provide here, and how can I show it clearly?
Is the problem related to the difference bween "yuv420p" and
"yuv420p(tv, bt709)"? Or perhaps the "59.94 tbc" versus "60k tbc"?
If so, how do I correct those things?
----------------------------------------
P.S.: As a crude workaround, I had some limited success making videos
hold without going through the still PNG file with
ffmpeg -i MVI_6105.MP4 -filter_complex \
"[0]trim=start_frame=0:end_frame=1,loop=30:1:0,setpts=N/FRAME_RATE/TB[fade]; \
[fade][0]concat,format=yuv420p" -an -t 1 ff1.mp4
ffmpeg -f concat -i c1 -c copy ff10.mp4
ffmpeg -f concat -i c3 -c copy ff100.mp4
ffmpeg -f concat -i c4 -t 118.533 -c copy f1.mp4
Where c1 was 10 repetitions of ff1.mp4 and c3 was 10 reptitions of
ff10.mp4. But this was not very satisfying and I am not sure I
constructed the -filter_coplex command correctly (I'm pretty sure I did
not), and setting the first loop parameter to anything higher than 100
or so appeared to cause big problems, hence the iterative concatenation
approach.
I think I'd like to understand how to get this working with the original
workflow involving stills, even though maybe beign able to use the the
concat filter might ultimately be a superior approach, although it feels
very confusing to me.
----------------------------------------
Thanks!
--jhawk at mit.edu
John Hawkinson
More information about the ffmpeg-user
mailing list