[FFmpeg-trac] #1598(undetermined:open): muxing raw h264 into mpegts (and mkv) fails
FFmpeg
trac at avcodec.org
Thu Nov 1 23:12:48 CET 2012
#1598: muxing raw h264 into mpegts (and mkv) fails
-------------------------------------+-------------------------------------
Reporter: Mista_D | Owner:
Type: defect | Status: open
Priority: normal | Component:
Version: git-master | undetermined
Keywords: mpegts h264 | Resolution:
av_interleaved_write_frame | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Mista_D):
Attempted demuxing with MP4Box instead of FFmpeg:
1. encode with FFmpeg.
2. demux with FFmpeg.
3. remux with FFmpeg fails.
2a. demux with MP4box.
3a. remux with FFmepg successful.
=====step1=====
ffmpeg1 -threads 0 -i ~/ava/7.ts -threads 0 -t 10 -an 10.mp4
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 9 2012 11:06:13 with gcc 4.1.2 (GCC) 20080704 (Red Hat
4.1.2-52)
configuration: --prefix=/home/dennisp/010_64 --enable-static --enable-
postproc --enable-gpl --enable-avfilter --enable-libx264 --enable-libxvid
--enable-libmp3lame --enable-nonfree --enable-pthreads --enable-swscale
--enable-runtime-cpudetect --disable-devices --disable-avdevice --enable-
libfaac --extra-ldflags=-static --disable-shared --enable-bzlib --enable-
zlib --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2
-lz -lpthread -lvpx' --disable-encoder=libgsm --disable-decoder=libgsm
--disable-doc --enable-libvpx --disable-encoder=ass --disable-demuxer=ass
--disable-muxer=ass --disable-decoder=ass
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mpegts, from '/home/dennisp/ava/7.ts':
Duration: 00:00:19.87, start: 1.400000, bitrate: 19968 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 104857 kb/s, 23.98 fps, 23.98 tbr,
90k tbn, 47.95 tbc
Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, s16, 384 kb/s
File '10.mp4' already exists. Overwrite ? [y/N] y
using SAR=1/1
[libx264 @ 0x1aed8840] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.2
[libx264 @ 0x1aed8840] profile High, level 3.1
[libx264 @ 0x1aed8840] 264 - core 124 - H.264/MPEG-4 AVC codec - Copyleft
2003-2012 - 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=24
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=23 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 '10.mp4':
Metadata:
encoder : Lavf54.29.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720
[SAR 1:1 DAR 16:9], q=-1--1, 24k tbn, 23.98 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Press [q] to stop, [?] for help
frame= 240 fps= 24 q=-1.0 Lsize= 6089kB time=00:00:09.92
bitrate=5025.2kbits/s
video:6087kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.040960%
[libx264 @ 0x1aed8840] frame I:3 Avg QP:22.78 size: 95179
[libx264 @ 0x1aed8840] frame P:204 Avg QP:25.42 size: 27018
[libx264 @ 0x1aed8840] frame B:33 Avg QP:27.53 size: 13178
[libx264 @ 0x1aed8840] consecutive B-frames: 72.5% 27.5% 0.0% 0.0%
[libx264 @ 0x1aed8840] mb I I16..4: 5.2% 86.6% 8.1%
[libx264 @ 0x1aed8840] mb P I16..4: 1.4% 8.8% 0.7% P16..4: 49.7%
22.5% 10.0% 0.0% 0.0% skip: 6.9%
[libx264 @ 0x1aed8840] mb B I16..4: 0.3% 1.4% 0.1% B16..8: 48.2%
11.5% 2.8% direct: 4.4% skip:31.2% L0:38.9% L1:45.2% BI:15.9%
[libx264 @ 0x1aed8840] 8x8 transform intra:81.2% inter:76.3%
[libx264 @ 0x1aed8840] coded y,uvDC,uvAC intra: 69.9% 92.6% 57.3% inter:
39.9% 56.1% 9.8%
[libx264 @ 0x1aed8840] i16 v,h,dc,p: 31% 18% 11% 39%
[libx264 @ 0x1aed8840] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 16% 24% 6% 8%
7% 8% 6% 8%
[libx264 @ 0x1aed8840] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 16% 14% 6% 12%
10% 10% 6% 6%
[libx264 @ 0x1aed8840] i8c dc,h,v,p: 50% 19% 19% 12%
[libx264 @ 0x1aed8840] Weighted P-Frames: Y:1.5% UV:0.5%
[libx264 @ 0x1aed8840] ref P L0: 69.6% 24.4% 4.1% 1.8% 0.1%
[libx264 @ 0x1aed8840] ref B L0: 95.5% 4.5%
[libx264 @ 0x1aed8840] kb/s:4980.75
=====step2=====
ffmpeg1 -i 10.mp4 -codec copy ffdemux.h264
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 9 2012 11:06:13 with gcc 4.1.2 (GCC) 20080704 (Red Hat
4.1.2-52)
configuration: --prefix=/home/dennisp/010_64 --enable-static --enable-
postproc --enable-gpl --enable-avfilter --enable-libx264 --enable-libxvid
--enable-libmp3lame --enable-nonfree --enable-pthreads --enable-swscale
--enable-runtime-cpudetect --disable-devices --disable-avdevice --enable-
libfaac --extra-ldflags=-static --disable-shared --enable-bzlib --enable-
zlib --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2
-lz -lpthread -lvpx' --disable-encoder=libgsm --disable-decoder=libgsm
--disable-doc --enable-libvpx --disable-encoder=ass --disable-demuxer=ass
--disable-muxer=ass --disable-decoder=ass
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '10.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.29.104
Duration: 00:00:10.01, start: 0.000000, bitrate: 4983 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 4981 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
47.95 tbc
Metadata:
handler_name : VideoHandler
Output #0, h264, to 'ffdemux.h264':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.29.104
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720
[SAR 1:1 DAR 16:9], q=2-31, 4981 kb/s, 23.98 fps, 90k tbn, 23.98 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 240 fps=0.0 q=-1.0 Lsize= 6087kB time=00:00:09.92
bitrate=5023.1kbits/s
video:6087kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.000000%
=====step3=====
ffmpeg1 -i ffdemux.h264 -codec copy ffremux.mp4
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 9 2012 11:06:13 with gcc 4.1.2 (GCC) 20080704 (Red Hat
4.1.2-52)
configuration: --prefix=/home/dennisp/010_64 --enable-static --enable-
postproc --enable-gpl --enable-avfilter --enable-libx264 --enable-libxvid
--enable-libmp3lame --enable-nonfree --enable-pthreads --enable-swscale
--enable-runtime-cpudetect --disable-devices --disable-avdevice --enable-
libfaac --extra-ldflags=-static --disable-shared --enable-bzlib --enable-
zlib --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2
-lz -lpthread -lvpx' --disable-encoder=libgsm --disable-decoder=libgsm
--disable-doc --enable-libvpx --disable-encoder=ass --disable-demuxer=ass
--disable-muxer=ass --disable-decoder=ass
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
ffdemux.h264: Invalid data found when processing input
=====step2a=====
MP4Box -raw 1 10.mp4 -out mp4box_demux.h264
Extracting MPEG-4 AVC-H264 stream to h264
=====step3a=====
ffmpeg1 -i mp4box_demux.h264 -codec copy ff_remux.mp4
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 9 2012 11:06:13 with gcc 4.1.2 (GCC) 20080704 (Red Hat
4.1.2-52)
configuration: --prefix=/home/dennisp/010_64 --enable-static --enable-
postproc --enable-gpl --enable-avfilter --enable-libx264 --enable-libxvid
--enable-libmp3lame --enable-nonfree --enable-pthreads --enable-swscale
--enable-runtime-cpudetect --disable-devices --disable-avdevice --enable-
libfaac --extra-ldflags=-static --disable-shared --enable-bzlib --enable-
zlib --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2
-lz -lpthread -lvpx' --disable-encoder=libgsm --disable-decoder=libgsm
--disable-doc --enable-libvpx --disable-encoder=ass --disable-demuxer=ass
--disable-muxer=ass --disable-decoder=ass
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[h264 @ 0x30077a0] max_analyze_duration 5000000 reached at 5005000
[h264 @ 0x30077a0] Estimating duration from bitrate, this may be
inaccurate
Input #0, h264, from 'mp4box_demux.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p, 1280x720 [SAR 1:1 DAR 16:9],
23.98 fps, 23.98 tbr, 1200k tbn, 47.95 tbc
Output #0, mp4, to 'ff_remux.mp4':
Metadata:
encoder : Lavf54.29.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720
[SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 1200k tbn, 1200k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x300f260] pts has no value
Last message repeated 239 times
frame= 240 fps=0.0 q=-1.0 Lsize= 6090kB time=00:00:09.88
bitrate=5048.0kbits/s
video:6087kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.054389%
===========END=============
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1598#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list