Skip to content

Instantly share code, notes, and snippets.

@peko
Created November 30, 2014 19:52
Show Gist options
  • Save peko/3410a6d7326a6c69b871 to your computer and use it in GitHub Desktop.
Save peko/3410a6d7326a6c69b871 to your computer and use it in GitHub Desktop.
ffmpeg blending log
> ffmpeg \
> -i background.mp4 \
> -loop 1 -f image2 -i transparent-overlay.png \
> -shortest -y \
> -filter_complex "[1:0][0:0]blend=all_mode=average" \
> overlay.mp4
ffmpeg version 2.4.3- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 4 2014 13:14:24 with gcc 4.8 (Debian 4.8.3-13)
configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --disable-ffserver --enable-libass --enable-gnutls --cc=gcc-4.8
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'background.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.4.101
Duration: 00:01:36.40, start: 0.033333, bitrate: 1132 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 999 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, image2, from 'transparent-overlay.png':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #1:0: Video: png, rgba, 640x360 [SAR 2835:2835 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x3580cc0] using SAR=1/1
[libx264 @ 0x3580cc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x3580cc0] profile High, level 3.0
[libx264 @ 0x3580cc0] 264 - core 142 r50 dd79a61 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=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=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 'overlay.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.4.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
encoder : Lavc56.1.100 libx264
Stream #0:1(eng): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc56.1.100 libvo_aacenc
Stream mapping:
Stream #0:0 (h264) -> blend:bottom (graph 0)
Stream #1:0 (png) -> blend:top (graph 0)
blend (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (aac (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
frame= 81 fps=0.0 q=28.0 size= 78kB time=00:00:03.52 bitrate= 180.7kbits
...
frame= 2468 fps=146 q=-1.0 Lsize= 7220kB time=00:01:38.64 bitrate= 599.6kbits/s
video:5643kB audio:1507kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.981916%
[libx264 @ 0x3580cc0] frame I:11 Avg QP:19.23 size: 16922
[libx264 @ 0x3580cc0] frame P:1104 Avg QP:21.09 size: 4387
[libx264 @ 0x3580cc0] frame B:1353 Avg QP:24.45 size: 553
[libx264 @ 0x3580cc0] consecutive B-frames: 25.4% 0.4% 12.6% 61.6%
[libx264 @ 0x3580cc0] mb I I16..4: 14.3% 65.2% 20.6%
[libx264 @ 0x3580cc0] mb P I16..4: 0.1% 0.9% 0.1% P16..4: 35.2% 17.4% 8.8% 0.0% 0.0% skip:37.4%
[libx264 @ 0x3580cc0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 31.4% 1.0% 0.2% direct: 0.6% skip:66.7% L0:31.0% L1:63.0% BI: 6.0%
[libx264 @ 0x3580cc0] 8x8 transform intra:72.5% inter:64.9%
[libx264 @ 0x3580cc0] coded y,uvDC,uvAC intra: 80.7% 54.2% 7.2% inter: 15.9% 6.9% 0.0%
[libx264 @ 0x3580cc0] i16 v,h,dc,p: 28% 43% 7% 22%
[libx264 @ 0x3580cc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 38% 14% 3% 6% 3% 15% 2% 10%
[libx264 @ 0x3580cc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 41% 11% 3% 7% 3% 15% 2% 10%
[libx264 @ 0x3580cc0] i8c dc,h,v,p: 51% 37% 9% 3%
[libx264 @ 0x3580cc0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x3580cc0] ref P L0: 69.3% 20.7% 8.2% 1.7%
[libx264 @ 0x3580cc0] ref B L0: 96.7% 2.9% 0.4%
[libx264 @ 0x3580cc0] ref B L1: 96.0% 4.0%
[libx264 @ 0x3580cc0] kb/s:468.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment