Skip to content

Instantly share code, notes, and snippets.

@rogerallen
Last active December 7, 2015 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerallen/426203d3a580898bd864 to your computer and use it in GitHub Desktop.
Save rogerallen/426203d3a580898bd864 to your computer and use it in GitHub Desktop.
test ffmpeg concat
> ./test_ffmpeg.sh
ffmpeg version N-77045-ga16243a Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 20.100 / 6. 20.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, concat, from 'test_ffmpeg.list':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 300x200, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 00000066a6fa8080] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 00000066a6fa8080] profile High, level 1.3
[libx264 @ 00000066a6fa8080] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 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=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 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 'Muybridge_race_horse_animated.mp4':
Metadata:
encoder : Lavf57.19.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 300x200, q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc57.16.101 libx264
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[concat @ 00000066a6f9bc80] DTS -230575710986777 < 0 out of order
DTS -230575710986777, next:40000 st:0 invalid dropping
PTS -230575710986777, next:40000 invalid dropping st:0
DTS -230575710986777, next:40000 st:0 invalid dropping
PTS -230575710986777, next:40000 invalid dropping st:0
DTS -230575710986777, next:40000 st:0 invalid dropping
PTS -230575710986777, next:40000 invalid dropping st:0
DTS -230575710986777, next:40000 st:0 invalid dropping
PTS -230575710986777, next:40000 invalid dropping st:0
DTS -230575710986777, next:40000 st:0 invalid dropping
PTS -230575710986777, next:40000 invalid dropping st:0
DTS -230575710986777, next:40000 st:0 invalid dropping
PTS -230575710986777, next:40000 invalid dropping st:0
DTS -230575710986777, next:40000 st:0 invalid dropping
PTS -230575710986777, next:40000 invalid dropping st:0
frame= 4 fps=0.0 q=-1.0 Lsize= 14kB time=00:00:00.06 bitrate=1678.8kbits/s dup=0 drop=11
video:13kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.745002%
[libx264 @ 00000066a6fa8080] frame I:1 Avg QP:27.65 size: 3553
[libx264 @ 00000066a6fa8080] frame P:1 Avg QP:28.98 size: 3402
[libx264 @ 00000066a6fa8080] frame B:2 Avg QP:29.12 size: 2731
[libx264 @ 00000066a6fa8080] consecutive B-frames: 25.0% 0.0% 75.0% 0.0%
[libx264 @ 00000066a6fa8080] mb I I16..4: 24.3% 46.2% 29.6%
[libx264 @ 00000066a6fa8080] mb P I16..4: 14.2% 28.7% 15.8% P16..4: 19.0% 12.1% 5.3% 0.0% 0.0% skip: 4.9%
[libx264 @ 00000066a6fa8080] mb B I16..4: 7.5% 16.0% 8.5% B16..8: 36.2% 18.8% 7.9% direct: 2.8% skip: 2.2% L0:45.3% L1:38.7% BI:16.1%
[libx264 @ 00000066a6fa8080] 8x8 transform intra:48.0% inter:60.1%
[libx264 @ 00000066a6fa8080] direct mvs spatial:0.0% temporal:100.0%
[libx264 @ 00000066a6fa8080] coded y,uvDC,uvAC intra: 63.4% 0.0% 0.0% inter: 53.8% 0.0% 0.0%
[libx264 @ 00000066a6fa8080] i16 v,h,dc,p: 5% 49% 7% 39%
[libx264 @ 00000066a6fa8080] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 13% 9% 10% 13% 9% 14% 6% 12%
[libx264 @ 00000066a6fa8080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 12% 13% 9% 14% 8% 13% 8% 14%
[libx264 @ 00000066a6fa8080] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 00000066a6fa8080] Weighted P-Frames: Y:100.0% UV:0.0%
[libx264 @ 00000066a6fa8080] ref B L1: 73.8% 26.2%
[libx264 @ 00000066a6fa8080] kb/s:745.02
#!/bin/sh
# get images from http://imgur.com/a/TVyJT (Album options -> Download all)
printf "file '%s'\n" ./*.png > test_ffmpeg.list
ffmpeg \
-f concat -i test_ffmpeg.list \
-r 30 -pix_fmt yuv420p \
-c:v libx264 -preset slow \
Muybridge_race_horse_animated.mp4
> ./test_ffmpeg.sh
ffmpeg version 1.1.3 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 26 2013 08:57:06 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --arch=x86_64 --enable-runtime-cpudetect
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[concat @ 0x7fbef1025e00] Estimating duration from bitrate, this may be inaccurate
Input #0, concat, from 'test_ffmpeg.list':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba, 300x200, 25 tbr, 25 tbn, 25 tbc
File 'Muybridge_race_horse_animated.mp4' already exists. Overwrite ? [y/N] y
using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x7fbef1049000] profile High, level 1.3
[libx264 @ 0x7fbef1049000] 264 - core 129 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 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=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 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 'Muybridge_race_horse_animated.mp4':
Metadata:
encoder : Lavf54.59.106
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 300x200, q=-1--1, 15360 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> libx264)
Press [q] to stop, [?] for help
frame= 18 fps=0.0 q=-1.0 Lsize= 47kB time=00:00:00.53 bitrate= 722.0kbits/s dup=3 drop=0
video:46kB audio:0kB subtitle:0 global headers:0kB muxing overhead 2.149967%
[libx264 @ 0x7fbef1049000] frame I:1 Avg QP:27.24 size: 3799
[libx264 @ 0x7fbef1049000] frame P:6 Avg QP:26.44 size: 2972
[libx264 @ 0x7fbef1049000] frame B:11 Avg QP:28.55 size: 2252
[libx264 @ 0x7fbef1049000] consecutive B-frames: 11.1% 11.1% 33.3% 44.4%
[libx264 @ 0x7fbef1049000] mb I I16..4: 26.7% 41.3% 32.0%
[libx264 @ 0x7fbef1049000] mb P I16..4: 6.3% 21.9% 10.3% P16..4: 24.9% 11.3% 7.5% 0.0% 0.0% skip:17.7%
[libx264 @ 0x7fbef1049000] mb B I16..4: 2.9% 10.4% 5.6% B16..8: 40.2% 19.0% 5.9% direct: 2.9% skip:13.1% L0:41.7% L1:50.4% BI: 7.9%
[libx264 @ 0x7fbef1049000] 8x8 transform intra:53.2% inter:64.2%
[libx264 @ 0x7fbef1049000] direct mvs spatial:36.4% temporal:63.6%
[libx264 @ 0x7fbef1049000] coded y,uvDC,uvAC intra: 72.8% 0.0% 0.0% inter: 37.8% 0.0% 0.0%
[libx264 @ 0x7fbef1049000] i16 v,h,dc,p: 13% 43% 5% 39%
[libx264 @ 0x7fbef1049000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 12% 11% 8% 12% 8% 11% 7% 14%
[libx264 @ 0x7fbef1049000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 11% 15% 8% 14% 8% 12% 7% 13%
[libx264 @ 0x7fbef1049000] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x7fbef1049000] Weighted P-Frames: Y:66.7% UV:0.0%
[libx264 @ 0x7fbef1049000] ref P L0: 42.4% 6.4% 13.8% 18.2% 9.2% 4.3% 5.7%
[libx264 @ 0x7fbef1049000] ref B L0: 64.0% 15.7% 12.4% 7.8%
[libx264 @ 0x7fbef1049000] ref B L1: 84.6% 15.4%
[libx264 @ 0x7fbef1049000] kb/s:618.69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment