Opened 4 years ago

Closed 4 years ago

#2498 closed defect (worksforme)

Concat two files.

Reported by: Mista_D Owned by:
Priority: normal Component: avfilter
Version: 1.2 Keywords: concat libx264
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Convert image to h.264 mp4 file, attempting to concat it to the same format mp4 file.

Single pass encoding works, two pass encoding fails.

http://pastebin.ca/2365371

ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Mar 19 2013 16:30:31 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-52)
configuration: --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 -lass -lfontconfig -lexpat -lfreetype' --disable-encoder=libgsm --disable-decoder=libgsm --disable-doc --enable-libvpx --enable-libass
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Attachments (4)

10.mp4 (454.9 KB) - added by Mista_D 4 years ago.
source video material.
1.PNG (32.3 KB) - added by Mista_D 4 years ago.
p1.mp4 (1.0 MB) - added by Mista_D 4 years ago.
p2.mp4 (1.2 MB) - added by Mista_D 4 years ago.

Change History (12)

Changed 4 years ago by Mista_D

source video material.

Changed 4 years ago by Mista_D

comment:1 Changed 4 years ago by Mista_D

MP4Box behaves similarly, it freezes the first part of the concatenated file and plays the other.

comment:2 Changed 4 years ago by cehoyos

Please post your failing command line together with the complete, uncut console output.

comment:3 Changed 4 years ago by Mista_D

+ ffmpeg27 -y -threads 4 -i 10.mp4 -vcodec libx264 -s 800x448 -b:v 1200k -maxrate 1500k -bufsize 240k -refs 4 -bf 0 -coder 1 -flags +loop+cgop -mbtree 1 -fast-pskip 1 -psy 1 -mpv_flags +strict_gop -me_method umh -me_range 24 -subq 7 -partitions +parti4x4+parti8x8+partp8x8 -g 86 -keyint_min 12 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -dts_delta_threshold 1 -threads 0 -profile:v main -pix_fmt yuv420p -pass 1 -an v.mp4
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 8 2013 15:24:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/ --enable-avfilter --enable-bzlib --enable-gpl --enable-libass --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-swscale --enable-zlib --disable-avdevice --disable-devices --disable-decoder=libgsm --disable-encoder=libgsm --disable-doc --disable-shared --extra-ldflags=-static --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2 -lz -lpthread -lvpx -lfribidi -lfontconfig -lexpat -lfreetype -lass' --yasmexe=/yasm
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '10.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104

Duration: 00:00:10.05, start: 0.021333, bitrate: 370 kb/s

Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 800x448 [SAR 224:225 DAR 16:9], 300 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:

handler_name : VideoHandler?

Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s
Metadata:

handler_name : SoundHandler?

[libx264 @ 0x1bc34680] using SAR=224/225
[libx264 @ 0x1bc34680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1bc34680] profile Main, level 3.0
[libx264 @ 0x1bc34680] 264 - core 130 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=24 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=86 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1200 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 vbv_maxrate=1500 vbv_bufsize=240 nal_hrd=none ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'v.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 800x448 [SAR 224:225 DAR 16:9], q=10-51, pass 1, 1200 kb/s, 24k tbn, 23.98 tbc
Metadata:

handler_name : VideoHandler?

Stream mapping:

Stream #0:0 -> #0:0 (h264 -> libx264)

Press [q] to stop, ? for help
frame= 186 fps=0.0 q=12.0 size= 289kB time=00:00:05.04 bitrate= 468.8kbits/s dup=1 drop=0
frame= 242 fps=0.0 q=-1.0 Lsize= 1088kB time=00:00:10.09 bitrate= 882.8kbits/s dup=1 drop=0
video:1086kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.161955%
[libx264 @ 0x1bc34680] frame I:6 Avg QP:10.12 size: 8016
[libx264 @ 0x1bc34680] frame P:236 Avg QP:10.88 size: 4505
[libx264 @ 0x1bc34680] mb I I16..4: 76.6% 0.0% 23.4%
[libx264 @ 0x1bc34680] mb P I16..4: 18.8% 0.0% 0.0% P16..4: 41.9% 0.0% 0.0% 0.0% 0.0% skip:39.3%
[libx264 @ 0x1bc34680] coded y,uvDC,uvAC intra: 29.7% 55.2% 37.8% inter: 13.4% 24.4% 4.0%
[libx264 @ 0x1bc34680] i16 v,h,dc,p: 44% 36% 15% 5%
[libx264 @ 0x1bc34680] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 37% 23% 2% 3% 1% 3% 1% 2%
[libx264 @ 0x1bc34680] i8c dc,h,v,p: 56% 29% 11% 3%
[libx264 @ 0x1bc34680] Weighted P-Frames: Y:8.9% UV:8.5%
[libx264 @ 0x1bc34680] kb/s:880.83
+ ffmpeg27 -y -threads 4 -i 10.mp4 -vcodec libx264 -s 800x448 -b:v 1200k -maxrate 1500k -bufsize 240k -refs 4 -bf 0 -coder 1 -flags +loop+cgop -mbtree 1 -fast-pskip 1 -psy 1 -mpv_flags +strict_gop -me_method umh -me_range 24 -subq 7 -partitions +parti4x4+parti8x8+partp8x8 -g 86 -keyint_min 12 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -dts_delta_threshold 1 -threads 0 -profile:v main -pix_fmt yuv420p -pass 2 -ac 2 -b:a 128k -ar 48000 v.mp4
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 8 2013 15:24:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/ --enable-avfilter --enable-bzlib --enable-gpl --enable-libass --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-swscale --enable-zlib --disable-avdevice --disable-devices --disable-decoder=libgsm --disable-encoder=libgsm --disable-doc --disable-shared --extra-ldflags=-static --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2 -lz -lpthread -lvpx -lfribidi -lfontconfig -lexpat -lfreetype -lass' --yasmexe=/yasm
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '10.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104

Duration: 00:00:10.05, start: 0.021333, bitrate: 370 kb/s

Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 800x448 [SAR 224:225 DAR 16:9], 300 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:

handler_name : VideoHandler?

Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s
Metadata:

handler_name : SoundHandler?

[libx264 @ 0xefe1700] using SAR=224/225
[libx264 @ 0xefe1700] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0xefe1700] target: 1200.00 kbit/s, expected: 1041.77 kbit/s, avg QP: 13.2811
[libx264 @ 0xefe1700] profile Main, level 3.0
[libx264 @ 0xefe1700] 264 - core 130 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=4 deblock=1:0:0 analyse=0x1:0x11 me=umh subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=24 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=86 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=2pass mbtree=1 bitrate=1200 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 cplxblur=20.0 qblur=0.5 vbv_maxrate=1500 vbv_bufsize=240 nal_hrd=none ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'v.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 800x448 [SAR 224:225 DAR 16:9], q=10-51, pass 2, 1200 kb/s, 24k tbn, 23.98 tbc
Metadata:

handler_name : VideoHandler?

Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
Metadata:

handler_name : SoundHandler?

Stream mapping:

Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libfaac)

Press [q] to stop, ? for help
frame= 110 fps=0.0 q=10.0 size= 131kB time=00:00:04.60 bitrate= 232.9kbits/s dup=1 drop=0
frame= 152 fps=150 q=10.0 size= 290kB time=00:00:06.35 bitrate= 373.1kbits/s dup=1 drop=0
frame= 215 fps=142 q=18.0 size= 676kB time=00:00:08.98 bitrate= 616.8kbits/s dup=1 drop=0
frame= 242 fps=105 q=-1.0 Lsize= 1092kB time=00:00:10.09 bitrate= 886.0kbits/s dup=1 drop=0
video:1005kB audio:80kB subtitle:0 global headers:0kB muxing overhead 0.569222%
[libx264 @ 0xefe1700] frame I:6 Avg QP:11.16 size: 6454
[libx264 @ 0xefe1700] frame P:236 Avg QP:10.79 size: 4196
[libx264 @ 0xefe1700] mb I I16..4: 73.1% 0.0% 26.9%
[libx264 @ 0xefe1700] mb P I16..4: 9.6% 0.0% 2.7% P16..4: 27.7% 11.8% 6.7% 0.0% 0.0% skip:41.5%
[libx264 @ 0xefe1700] coded y,uvDC,uvAC intra: 18.7% 42.8% 29.4% inter: 10.0% 25.1% 6.2%
[libx264 @ 0xefe1700] i16 v,h,dc,p: 48% 35% 8% 10%
[libx264 @ 0xefe1700] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 36% 31% 2% 3% 1% 2% 1% 1%
[libx264 @ 0xefe1700] i8c dc,h,v,p: 59% 30% 9% 2%
[libx264 @ 0xefe1700] Weighted P-Frames: Y:8.9% UV:8.5%
[libx264 @ 0xefe1700] ref P L0: 71.6% 1.9% 19.0% 4.7% 2.7% 0.0%
[libx264 @ 0xefe1700] kb/s:815.50
+ ffmpeg27 -y -f u24le -ac 2 -ar 48000 -i /dev/zero -t 10 -af volume=0 silence.wav
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 8 2013 15:24:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/ --enable-avfilter --enable-bzlib --enable-gpl --enable-libass --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-swscale --enable-zlib --disable-avdevice --disable-devices --disable-decoder=libgsm --disable-encoder=libgsm --disable-doc --disable-shared --extra-ldflags=-static --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2 -lz -lpthread -lvpx -lfribidi -lfontconfig -lexpat -lfreetype -lass' --yasmexe=/yasm
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

[u24le @ 0x10a25620] max_analyze_duration 5000000 reached at 5013333 microseconds
[u24le @ 0x10a25620] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, u24le, from '/dev/zero':

Duration: N/A, bitrate: 2304 kb/s

Stream #0:0: Audio: pcm_u24le, 48000 Hz, stereo, s32, 2304 kb/s

Output #0, wav, to 'silence.wav':

Metadata:

ISFT : Lavf54.63.104
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (pcm_u24le -> pcm_s16le)

Press [q] to stop, ? for help
size= 1876kB time=00:00:10.00 bitrate=1536.1kbits/s
video:0kB audio:1876kB subtitle:0 global headers:0kB muxing overhead 0.004164%
+ ffmpeg27 -y -threads 0 -loop 1 -r 0.1 -i 1.PNG -i silence.wav -t 10 -r 24000/1001 -pix_fmt yuv420p dc1.mp4
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 8 2013 15:24:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/ --enable-avfilter --enable-bzlib --enable-gpl --enable-libass --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-swscale --enable-zlib --disable-avdevice --disable-devices --disable-decoder=libgsm --disable-encoder=libgsm --disable-doc --disable-shared --extra-ldflags=-static --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2 -lz -lpthread -lvpx -lfribidi -lfontconfig -lexpat -lfreetype -lass' --yasmexe=/yasm
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

[image2 @ 0x1af73ce0] max_analyze_duration 5000000 reached at 5000000 microseconds
Input #0, image2, from '1.PNG':

Duration: 00:00:00.04, start: 0.000000, bitrate: N/A

Stream #0:0: Video: png, rgb24, 1920x1080 [SAR 4724:4724 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc

[wav @ 0x1af78840] max_analyze_duration 5000000 reached at 5013333 microseconds
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from 'silence.wav':

Metadata:

encoder : Lavf54.63.104

Duration: 00:00:10.01, bitrate: 1536 kb/s

Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s

[libx264 @ 0x1b43c920] using SAR=1/1
[libx264 @ 0x1b43c920] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1b43c920] profile High, level 4.0
[libx264 @ 0x1b43c920] 264 - core 130 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - 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 lookahead_threads=4 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 'dc1.mp4':

Metadata:

encoder : Lavf54.63.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 24k tbn, 23.98 tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (png -> libx264)
Stream #1:0 -> #0:1 (pcm_s16le -> libfaac)

Press [q] to stop, ? for help
frame= 240 fps=235 q=28.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=239 drop=0
frame= 240 fps=185 q=-1.0 Lsize= 31kB time=00:00:10.00 bitrate= 25.5kbits/s dup=239 drop=0
video:19kB audio:4kB subtitle:0 global headers:0kB muxing overhead 34.632564%
[libx264 @ 0x1b43c920] frame I:1 Avg QP:20.56 size: 1587
[libx264 @ 0x1b43c920] frame P:60 Avg QP: 9.30 size: 78
[libx264 @ 0x1b43c920] frame B:179 Avg QP:12.67 size: 70
[libx264 @ 0x1b43c920] consecutive B-frames: 0.4% 0.0% 1.2% 98.3%
[libx264 @ 0x1b43c920] mb I I16..4: 99.6% 0.0% 0.4%
[libx264 @ 0x1b43c920] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x1b43c920] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0% L0:63.1% L1:36.9% BI: 0.0%
[libx264 @ 0x1b43c920] 8x8 transform intra:0.0% inter:0.0%
[libx264 @ 0x1b43c920] coded y,uvDC,uvAC intra: 0.2% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x1b43c920] i16 v,h,dc,p: 98% 0% 1% 0%
[libx264 @ 0x1b43c920] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 44% 19% 26% 2% 1% 1% 1% 4% 2%
[libx264 @ 0x1b43c920] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x1b43c920] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1b43c920] ref B L0: 50.0% 50.0%
[libx264 @ 0x1b43c920] ref B L1: 98.6% 1.4%
[libx264 @ 0x1b43c920] kb/s:15.00
+ ffmpeg27 -y -threads 4 -i dc1.mp4 -vcodec libx264 -s 800x448 -b:v 1200k -maxrate 1500k -bufsize 240k -refs 4 -bf 0 -coder 1 -flags +loop+cgop -mbtree 1 -fast-pskip 1 -psy 1 -mpv_flags +strict_gop -me_method umh -me_range 24 -subq 7 -partitions +parti4x4+parti8x8+partp8x8 -g 86 -keyint_min 12 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -dts_delta_threshold 1 -threads 0 -profile:v main -pix_fmt yuv420p -an -pass 1 dc.mp4
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 8 2013 15:24:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/ --enable-avfilter --enable-bzlib --enable-gpl --enable-libass --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-swscale --enable-zlib --disable-avdevice --disable-devices --disable-decoder=libgsm --disable-encoder=libgsm --disable-doc --disable-shared --extra-ldflags=-static --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2 -lz -lpthread -lvpx -lfribidi -lfontconfig -lexpat -lfreetype -lass' --yasmexe=/yasm
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dc1.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104

Duration: 00:00:10.03, start: 0.021333, bitrate: 25 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 15 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:

handler_name : VideoHandler?

Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 3 kb/s
Metadata:

handler_name : SoundHandler?

[libx264 @ 0x1be358c0] using SAR=224/225
[libx264 @ 0x1be358c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1be358c0] profile Main, level 3.0
[libx264 @ 0x1be358c0] 264 - core 130 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=24 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=86 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1200 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 vbv_maxrate=1500 vbv_bufsize=240 nal_hrd=none ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'dc.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 800x448 [SAR 224:225 DAR 16:9], q=10-51, pass 1, 1200 kb/s, 24k tbn, 23.98 tbc
Metadata:

handler_name : VideoHandler?

Stream mapping:

Stream #0:0 -> #0:0 (h264 -> libx264)

Press [q] to stop, ? for help
frame= 85 fps=0.0 q=10.0 size= 2kB time=00:00:00.83 bitrate= 18.0kbits/s dup=1 drop=0
frame= 176 fps=174 q=10.0 size= 6kB time=00:00:04.62 bitrate= 10.4kbits/s dup=1 drop=0
frame= 241 fps=170 q=-1.0 Lsize= 12kB time=00:00:10.05 bitrate= 9.7kbits/s dup=1 drop=0
video:10kB audio:0kB subtitle:0 global headers:0kB muxing overhead 17.075290%
[libx264 @ 0x1be358c0] frame I:3 Avg QP:13.74 size: 973
[libx264 @ 0x1be358c0] frame P:238 Avg QP:10.14 size: 28
[libx264 @ 0x1be358c0] mb I I16..4: 99.2% 0.0% 0.8%
[libx264 @ 0x1be358c0] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x1be358c0] coded y,uvDC,uvAC intra: 0.6% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x1be358c0] i16 v,h,dc,p: 96% 0% 4% 0%
[libx264 @ 0x1be358c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 19% 38% 2% 2% 3% 1% 5% 1%
[libx264 @ 0x1be358c0] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x1be358c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1be358c0] kb/s:7.68
+ ffmpeg27 -y -threads 4 -i dc1.mp4 -vcodec libx264 -s 800x448 -b:v 1200k -maxrate 1500k -bufsize 240k -refs 4 -bf 0 -coder 1 -flags +loop+cgop -mbtree 1 -fast-pskip 1 -psy 1 -mpv_flags +strict_gop -me_method umh -me_range 24 -subq 7 -partitions +parti4x4+parti8x8+partp8x8 -g 86 -keyint_min 12 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -dts_delta_threshold 1 -threads 0 -profile:v main -pix_fmt yuv420p -pass 2 -ac 2 -b:a 128k -ar 48000 dc.mp4
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 8 2013 15:24:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/ --enable-avfilter --enable-bzlib --enable-gpl --enable-libass --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-swscale --enable-zlib --disable-avdevice --disable-devices --disable-decoder=libgsm --disable-encoder=libgsm --disable-doc --disable-shared --extra-ldflags=-static --extra-libs='-lx264 -lfaac -lxvidcore -lmp3lame -lpthread -lm -lbz2 -lz -lpthread -lvpx -lfribidi -lfontconfig -lexpat -lfreetype -lass' --yasmexe=/yasm
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dc1.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104

Duration: 00:00:10.03, start: 0.021333, bitrate: 25 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 15 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:

handler_name : VideoHandler?

Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 3 kb/s
Metadata:

handler_name : SoundHandler?

[libx264 @ 0x1eae2940] using SAR=224/225
[libx264 @ 0x1eae2940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1eae2940] target: 1200.00 kbit/s, expected: 11.88 kbit/s, avg QP: 10.0000
[libx264 @ 0x1eae2940] try reducing target bitrate or reducing qp_min (currently 10)
[libx264 @ 0x1eae2940] profile Main, level 3.0
[libx264 @ 0x1eae2940] 264 - core 130 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=4 deblock=1:0:0 analyse=0x1:0x11 me=umh subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=24 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=86 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=2pass mbtree=1 bitrate=1200 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 cplxblur=20.0 qblur=0.5 vbv_maxrate=1500 vbv_bufsize=240 nal_hrd=none ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'dc.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 800x448 [SAR 224:225 DAR 16:9], q=10-51, pass 2, 1200 kb/s, 24k tbn, 23.98 tbc
Metadata:

handler_name : VideoHandler?

Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
Metadata:

handler_name : SoundHandler?

Stream mapping:

Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libfaac)

Press [q] to stop, ? for help
frame= 72 fps=0.0 q=10.0 size= 4kB time=00:00:03.00 bitrate= 10.9kbits/s dup=1 drop=0
frame= 149 fps=148 q=10.0 size= 9kB time=00:00:06.22 bitrate= 11.2kbits/s dup=1 drop=0
frame= 227 fps=151 q=10.0 size= 13kB time=00:00:09.47 bitrate= 11.3kbits/s dup=1 drop=0
frame= 241 fps=150 q=-1.0 Lsize= 21kB time=00:00:10.05 bitrate= 17.1kbits/s dup=1 drop=0
video:11kB audio:4kB subtitle:0 global headers:0kB muxing overhead 41.340084%
[libx264 @ 0x1eae2940] frame I:3 Avg QP:10.11 size: 1087
[libx264 @ 0x1eae2940] frame P:238 Avg QP:10.00 size: 29
[libx264 @ 0x1eae2940] mb I I16..4: 99.2% 0.0% 0.8%
[libx264 @ 0x1eae2940] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x1eae2940] coded y,uvDC,uvAC intra: 0.6% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x1eae2940] i16 v,h,dc,p: 96% 0% 4% 0%
[libx264 @ 0x1eae2940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 19% 27% 3% 4% 2% 1% 5% 2%
[libx264 @ 0x1eae2940] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x1eae2940] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1eae2940] kb/s:8.13
+ echo file v.mp4
+ echo file dc.mp4
+ ffmpeg12 -y -f concat -i list.txt -c copy concat.mp4
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Mar 19 2013 16:30:31 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 -lass -lfontconfig -lexpat -lfreetype' --disable-encoder=libgsm --disable-decoder=libgsm --disable-doc --enable-libvpx --enable-libass
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

[concat @ 0x17ba4520] Estimating duration from bitrate, this may be inaccurate
Input #0, concat, from 'list.txt':

Duration: 00:00:00.00, start: 0.000000, bitrate: 884 kb/s

Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 800x448 [SAR 224:225 DAR 16:9], 816 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 65 kb/s

Output #0, mp4, to 'concat.mp4':

Metadata:

encoder : Lavf54.63.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 800x448 [SAR 224:225 DAR 16:9], q=2-31, 816 kb/s, 23.98 fps, 24k tbn, 24k tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 65 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)

Press [q] to stop, ? for help
frame= 483 fps=0.0 q=-1.0 Lsize= 1111kB time=00:00:20.12 bitrate= 452.5kbits/s
video:1016kB audio:84kB subtitle:0 global headers:0kB muxing overhead 1.016561%

comment:4 Changed 4 years ago by Cigaes

In the future, please try to make your console output more readable: remove all that is not necessary to reproduce the issue (multi-pass, especially encoding for the same output with different streams, tuning options), and remember to put copy-pasted snippets between code-block markup (see the buttons above the text area).

Right now, I can not see anything wrong, you did not show the part that makes you think it fails.

comment:5 Changed 4 years ago by Mista_D

No error reported by FFmpeg, but generated file is broken.

comment:6 Changed 4 years ago by cehoyos

Could you elaborate what "broken" means in this context?

Is the problem also reproducible with an internal encoder (-vcodec mpeg4) or only with libx264?

comment:7 Changed 4 years ago by Mista_D

Try running it. The pastebin has the script and source samples are attached to the ticket.
Output attached, it's not playable at the end.\

If encoded with libx264 as one pass, the two files concatenate fine. (p1.mp4)
If encoded with libx264 as two pass, the first part of the file plays fine, second part does not. (p2.mp4)

Changed 4 years ago by Mista_D

Changed 4 years ago by Mista_D

comment:8 Changed 4 years ago by cehoyos

  • Resolution set to worksforme
  • Status changed from new to closed

Your (exact) command lines work fine here, both with 1.2 and current git head. Since the output files you uploaded are different (different length and no audio codec), I cannot explain the issue.

For future tickets (or if you want to reopen this ticket):
Please always test current git head.
Please use -an (-vn) if it allows to reproduce the problem.
If an issue is reproducible without using libx264, please don't use it, if it is necessary, please explain why (or at least that it is necessary).
No matter if x264 is used or not, please provide the simplest possible command lines that allow to reproduce the problem.
And please do never use external resources (like pastebin) to describe a problem (external resources may disappear), always post all necessary information (command and console output) here into the ticket.

Note: See TracTickets for help on using tickets.