In [1]:
#@title Check GPU
#@markdown Run this to connect to a Colab Instance, and see what GPU Google gave you.

gpu = !nvidia-smi --query-gpu=gpu_name --format=csv
print(gpu[1])
print("The Tesla T4 and P100 are fast and support hardware encoding. The K80 and P4 are slower.")
print("Sometimes resetting the instance in the 'runtime' tab will give you a different GPU.")


Tesla P100-PCIE-16GB
The Tesla T4 and P100 are fast and support hardware encoding. The K80 and P4 are slower.
Sometimes resetting the instance in the 'runtime' tab will give you a different GPU.

In [2]:
from google.colab import drive
drive.mount('/content/drive')


Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&response_type=code&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly

Enter your authorization code:
··········
Mounted at /content/drive

In [0]:
!mkdir "//content/drive/My Drive/kontext/deold/5"
!mkdir "//content/drive/My Drive/kontext/deold/5b"
!mkdir "//content/drive/My Drive/kontext/deold/5c"


mkdir: cannot create directory ‘//content/drive/My Drive/kontext/deold/5’: File exists
mkdir: cannot create directory ‘//content/drive/My Drive/kontext/deold/5b’: File exists
mkdir: cannot create directory ‘//content/drive/My Drive/kontext/deold/5c’: File exists

In [0]:
!pip install torch torchvision


Requirement already satisfied: torch in /usr/local/lib/python3.6/dist-packages (1.4.0)
Requirement already satisfied: torchvision in /usr/local/lib/python3.6/dist-packages (0.5.0)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from torchvision) (1.12.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from torchvision) (1.18.2)
Requirement already satisfied: pillow>=4.1.1 in /usr/local/lib/python3.6/dist-packages (from torchvision) (7.0.0)

In [0]:
!wget https://github.com/satoshiiizuka/siggraphasia2019_remastering.git


--2020-03-20 20:38:55--  https://github.com/satoshiiizuka/siggraphasia2019_remastering.git
Resolving github.com (github.com)... 140.82.113.4
Connecting to github.com (github.com)|140.82.113.4|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/satoshiiizuka/siggraphasia2019_remastering [following]
--2020-03-20 20:38:55--  https://github.com/satoshiiizuka/siggraphasia2019_remastering
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘siggraphasia2019_remastering.git’

siggraphasia2019_re     [  <=>               ]  92.32K   253KB/s    in 0.4s    

2020-03-20 20:38:56 (253 KB/s) - ‘siggraphasia2019_remastering.git’ saved [94531]


In [0]:
!git clone https://github.com/satoshiiizuka/siggraphasia2019_remastering.git


Cloning into 'siggraphasia2019_remastering'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 23 (delta 4), reused 22 (delta 3), pack-reused 0
Unpacking objects: 100% (23/23), done.

In [0]:
%cd siggraphasia2019_remastering


/content/siggraphasia2019_remastering

In [0]:
!bash download_model.sh


Downloading the RemasterNet (245MB)...
--2020-03-20 20:39:02--  http://iizuka.cs.tsukuba.ac.jp/data/remasternet.pth.tar
Resolving iizuka.cs.tsukuba.ac.jp (iizuka.cs.tsukuba.ac.jp)... 130.158.81.20
Connecting to iizuka.cs.tsukuba.ac.jp (iizuka.cs.tsukuba.ac.jp)|130.158.81.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 256796033 (245M) [application/x-tar]
Saving to: ‘model/remasternet.pth.tar’

model/remasternet.p 100%[===================>] 244.90M  65.9MB/s    in 4.0s    

2020-03-20 20:39:07 (61.2 MB/s) - ‘model/remasternet.pth.tar’ saved [256796033/256796033]

Checking integrity (md5sum)...
Download finished successfully!

In [0]:
from shutil import copyfile

In [0]:
files={'bp1':'bp1_2.00x_640x480.mp4',
       'bp2':'bp2_2.00x_984x720.mp4',
       'bp3':'bp3_2.00x_960x720.mp4',
       'bp4':'bp4_2.00x_960x640.mp4',
       'bp5':'bp5_2.00x_1280x720.mp4',
       'ed':'ed_2.00x_960x720.mp4',
       'kv1':'kv1_2.00x_960x720.mp4',
       'kv2':'kv2_2.00x_640x480.mp4',
       'szf2':'szf2_2.00x_1600x972.mp4'
       }

In [0]:
# memory footprint support libraries/code
!ln -sf /opt/bin/nvidia-smi /usr/bin/nvidia-smi
!pip install gputil
!pip install psutil
!pip install humanize


Collecting gputil
  Downloading https://files.pythonhosted.org/packages/ed/0e/5c61eedde9f6c87713e89d794f01e378cfd9565847d4576fa627d758c554/GPUtil-1.4.0.tar.gz
Building wheels for collected packages: gputil
  Building wheel for gputil (setup.py) ... done
  Created wheel for gputil: filename=GPUtil-1.4.0-cp36-none-any.whl size=7413 sha256=0d16cb9bb0b4b01d35e6e5ac100b297991a7c63c59b783b77b0375ddc3517fa8
  Stored in directory: /root/.cache/pip/wheels/3d/77/07/80562de4bb0786e5ea186911a2c831fdd0018bda69beab71fd
Successfully built gputil
Installing collected packages: gputil
Successfully installed gputil-1.4.0
Requirement already satisfied: psutil in /usr/local/lib/python3.6/dist-packages (5.4.8)
Requirement already satisfied: humanize in /usr/local/lib/python3.6/dist-packages (0.5.1)

In [0]:
import psutil
import humanize
import os
import GPUtil as GPU

GPUs = GPU.getGPUs()
# XXX: only one GPU on Colab and isn’t guaranteed
gpu = GPUs[0]
def printm():
    process = psutil.Process(os.getpid())
    print("Gen RAM Free: " + humanize.naturalsize(psutil.virtual_memory().available), " |     Proc size: " + humanize.naturalsize(process.memory_info().rss))
    print("GPU RAM Free: {0:.0f}MB | Used: {1:.0f}MB | Util {2:3.0f}% | Total     {3:.0f}MB".format(gpu.memoryFree, gpu.memoryUsed, gpu.memoryUtil*100, gpu.memoryTotal))
printm()


Gen RAM Free: 26.3 GB  |     Proc size: 157.4 MB
GPU RAM Free: 16280MB | Used: 0MB | Util   0% | Total     16280MB

In [0]:
#set pixel limits - depends on your video, experiment with what fits in the memory
lims={'bp1':480,
       'bp2':460,
       'bp3':500,
       'bp4':580,
       'bp5':500,
       'ed':570,
       'kv1':630,
       'kv2':390,
       'szf2':500
       }

In [0]:
# #this cell is only for testing your resize limits
# k='3'
# vid='bp5'
# file=files[vid][:-4]+'_12.mp4'
# from_path='"//content/drive/My Drive/kontext/deold/'+k+'/'+file+'"'
# !python remaster.py --input {from_path} --reference_dir {'"//content/drive/My Drive/kontext/deold/4/'+vid+'"'} --mindim {lims[vid]} --gpu

In [0]:
def runner(file,k):
  from_path='"//content/drive/My Drive/kontext/deold/'+k+'/'+file+'"'
  to_path= '//content/drive/My Drive/kontext/deold'
  #with colorization needs a ton (40GB) of GPU memory - leave this alone for now
  # !python remaster.py --input {from_path} --reference_dir {'"//content/drive/My Drive/kontext/deold/4/'+vid+'"'} --mindim {files[vid][-7:-4]} --gpu
  
  # !python remaster.py --input {from_path} --reference_dir {'"//content/drive/My Drive/kontext/deold/4/'+vid+'"'} --mindim {lims[vid]} --gpu
  # copyfile(vid+'_2_out.mp4', to_path+'/5/'+file)
  
  #without colorization can run in much smaller (16GB) GPU memory
  !python remaster.py --input {from_path} --reference_dir {'"//content/drive/My Drive/kontext/deold/4/'+vid+'"'} --mindim {files[vid][-7:-4]} --gpu --disable_colorization
  copyfile(vid+'_2_out.mp4', to_path+'/5b/'+file)

  #without colorization, downscaled
  # !python remaster.py --input {from_path} --reference_dir {'"//content/drive/My Drive/kontext/deold/4/'+vid+'"'} --mindim {lims[vid]} --gpu --disable_colorization
  # copyfile(vid+'_2_out.mp4',to_path+'/5c/'+file)

In [0]:
#experiment with what source videos are you using, 
#deoldified or not (if yes, what was the render factor), 
#and whether you recolor it or not

for vid in ['bp4','bp5','bp3']:
  # runner(files[vid],'2')  
  # runner(files[vid][:-4]+'_12.mp4','3')
  runner(files[vid][:-4]+'_21.mp4','3')


Processing bp4_2.00x_960x640_21.mp4...
100% 901/901 [14:16<00:00,  1.00s/it]ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, image2, from 'tmp/input/%07d.png':
  Duration: 00:00:36.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 960x640, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55fb7c7ebe00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55fb7c7ebe00] profile High, level 3.1
[libx264 @ 0x55fb7c7ebe00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp4_2_in.mp4':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 960x640, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  901 fps= 43 q=-1.0 Lsize=    7771kB time=00:00:35.92 bitrate=1772.3kbits/s speed=1.73x    
video:7760kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.147689%
[libx264 @ 0x55fb7c7ebe00] frame I:4     Avg QP:21.36  size: 45714
[libx264 @ 0x55fb7c7ebe00] frame P:227   Avg QP:24.40  size: 21649
[libx264 @ 0x55fb7c7ebe00] frame B:670   Avg QP:27.86  size:  4251
[libx264 @ 0x55fb7c7ebe00] consecutive B-frames:  0.8%  0.2%  0.0% 99.0%
[libx264 @ 0x55fb7c7ebe00] mb I  I16..4:  6.0% 77.2% 16.8%
[libx264 @ 0x55fb7c7ebe00] mb P  I16..4:  2.8% 12.2%  2.1%  P16..4: 40.9% 24.9%  9.7%  0.0%  0.0%    skip: 7.5%
[libx264 @ 0x55fb7c7ebe00] mb B  I16..4:  0.3%  0.5%  0.1%  B16..8: 36.5%  7.0%  1.6%  direct: 3.8%  skip:50.3%  L0:44.5% L1:45.4% BI:10.2%
[libx264 @ 0x55fb7c7ebe00] 8x8 transform intra:70.5% inter:78.4%
[libx264 @ 0x55fb7c7ebe00] coded y,uvDC,uvAC intra: 63.6% 60.0% 16.2% inter: 22.1% 27.0% 0.7%
[libx264 @ 0x55fb7c7ebe00] i16 v,h,dc,p: 48% 32%  3% 17%
[libx264 @ 0x55fb7c7ebe00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 22% 20%  5%  5%  5%  7%  6%  9%
[libx264 @ 0x55fb7c7ebe00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 23% 12%  5%  6%  7%  6%  7%  6%
[libx264 @ 0x55fb7c7ebe00] i8c dc,h,v,p: 55% 17% 23%  5%
[libx264 @ 0x55fb7c7ebe00] Weighted P-Frames: Y:55.1% UV:38.8%
[libx264 @ 0x55fb7c7ebe00] ref P L0: 49.8% 18.8% 21.1%  7.5%  2.7%
[libx264 @ 0x55fb7c7ebe00] ref B L0: 92.0%  6.6%  1.4%
[libx264 @ 0x55fb7c7ebe00] ref B L1: 97.5%  2.5%
[libx264 @ 0x55fb7c7ebe00] kb/s:1763.61
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, image2, from 'tmp/output/%07d.png':
  Duration: 00:00:36.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 960x640, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55aa0a231e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55aa0a231e00] profile High, level 3.1
[libx264 @ 0x55aa0a231e00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp4_2_out.mp4':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 960x640, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  901 fps= 42 q=-1.0 Lsize=    8217kB time=00:00:35.92 bitrate=1874.0kbits/s speed=1.66x    
video:8206kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.138946%
[libx264 @ 0x55aa0a231e00] frame I:4     Avg QP:22.13  size: 47966
[libx264 @ 0x55aa0a231e00] frame P:240   Avg QP:24.55  size: 21585
[libx264 @ 0x55aa0a231e00] frame B:657   Avg QP:26.84  size:  4611
[libx264 @ 0x55aa0a231e00] consecutive B-frames:  1.8%  2.0%  3.0% 93.2%
[libx264 @ 0x55aa0a231e00] mb I  I16..4:  9.0% 66.1% 24.9%
[libx264 @ 0x55aa0a231e00] mb P  I16..4:  6.0% 12.0%  2.3%  P16..4: 38.4% 25.7% 10.6%  0.0%  0.0%    skip: 5.0%
[libx264 @ 0x55aa0a231e00] mb B  I16..4:  1.5%  2.5%  0.1%  B16..8: 37.7%  7.3%  1.7%  direct: 5.2%  skip:44.0%  L0:41.1% L1:47.1% BI:11.9%
[libx264 @ 0x55aa0a231e00] 8x8 transform intra:60.1% inter:77.7%
[libx264 @ 0x55aa0a231e00] coded y,uvDC,uvAC intra: 31.7% 36.3% 7.7% inter: 24.6% 29.9% 0.6%
[libx264 @ 0x55aa0a231e00] i16 v,h,dc,p: 75% 16%  2%  8%
[libx264 @ 0x55aa0a231e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 13% 30%  3%  3%  3%  4%  3%  5%
[libx264 @ 0x55aa0a231e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 23% 13%  5%  5%  7%  6%  7%  6%
[libx264 @ 0x55aa0a231e00] i8c dc,h,v,p: 61% 10% 26%  3%
[libx264 @ 0x55aa0a231e00] Weighted P-Frames: Y:64.2% UV:41.7%
[libx264 @ 0x55aa0a231e00] ref P L0: 51.5% 21.1% 16.5%  7.9%  3.0%
[libx264 @ 0x55aa0a231e00] ref B L0: 89.8%  7.3%  2.9%
[libx264 @ 0x55aa0a231e00] ref B L1: 98.0%  2.0%
[libx264 @ 0x55aa0a231e00] kb/s:1865.00
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bp4_2_in.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:00:36.04, start: 0.000000, bitrate: 1766 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x640, 1763 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55f3a32c5900] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55f3a32c5900] profile High, level 3.2
[libx264 @ 0x55f3a32c5900] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp4_2_comp.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1928x640, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[Parsed_movie_1 @ 0x55f3a329d2c0] EOF timestamp not reliable
frame=  901 fps= 26 q=-1.0 Lsize=   14396kB time=00:00:35.92 bitrate=3283.1kbits/s speed=1.03x    
video:14384kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.080527%
[libx264 @ 0x55f3a32c5900] frame I:4     Avg QP:21.19  size: 91982
[libx264 @ 0x55f3a32c5900] frame P:238   Avg QP:23.83  size: 38921
[libx264 @ 0x55f3a32c5900] frame B:659   Avg QP:26.79  size:  7735
[libx264 @ 0x55f3a32c5900] consecutive B-frames:  0.6%  5.5%  0.7% 93.2%
[libx264 @ 0x55f3a32c5900] mb I  I16..4:  7.1% 68.7% 24.2%
[libx264 @ 0x55f3a32c5900] mb P  I16..4:  4.3% 12.3%  2.0%  P16..4: 40.9% 23.9%  9.4%  0.0%  0.0%    skip: 7.4%
[libx264 @ 0x55f3a32c5900] mb B  I16..4:  0.7%  1.7%  0.1%  B16..8: 37.7%  6.2%  1.3%  direct: 3.3%  skip:49.1%  L0:43.9% L1:46.9% BI: 9.3%
[libx264 @ 0x55f3a32c5900] 8x8 transform intra:67.0% inter:76.5%
[libx264 @ 0x55f3a32c5900] coded y,uvDC,uvAC intra: 43.3% 46.3% 9.5% inter: 20.3% 24.2% 0.3%
[libx264 @ 0x55f3a32c5900] i16 v,h,dc,p: 64% 22%  3% 11%
[libx264 @ 0x55f3a32c5900] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 17% 26%  3%  3%  4%  4%  4%  6%
[libx264 @ 0x55f3a32c5900] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 22% 13%  5%  5%  7%  6%  7%  5%
[libx264 @ 0x55f3a32c5900] i8c dc,h,v,p: 61% 14% 22%  4%
[libx264 @ 0x55f3a32c5900] Weighted P-Frames: Y:55.9% UV:29.0%
[libx264 @ 0x55f3a32c5900] ref P L0: 52.0% 21.2% 17.9%  6.5%  2.4%
[libx264 @ 0x55f3a32c5900] ref B L0: 91.3%  6.7%  2.0%
[libx264 @ 0x55f3a32c5900] ref B L1: 97.9%  2.1%
[libx264 @ 0x55f3a32c5900] kb/s:3269.36
100% 901/901 [15:35<00:00,  1.04s/it]
Processing bp5_2.00x_1280x720_21.mp4...
100% 827/827 [17:29<00:00,  1.26s/it]ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, image2, from 'tmp/input/%07d.png':
  Duration: 00:00:33.08, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 1280x720, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55fc74c85e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55fc74c85e00] profile High, level 3.1
[libx264 @ 0x55fc74c85e00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp5_2_in.mp4':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  827 fps= 30 q=-1.0 Lsize=   13604kB time=00:00:32.96 bitrate=3381.2kbits/s speed=1.19x    
video:13594kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.078364%
[libx264 @ 0x55fc74c85e00] frame I:5     Avg QP:20.18  size: 71198
[libx264 @ 0x55fc74c85e00] frame P:213   Avg QP:23.00  size: 42369
[libx264 @ 0x55fc74c85e00] frame B:609   Avg QP:27.12  size:  7452
[libx264 @ 0x55fc74c85e00] consecutive B-frames:  1.6%  0.5%  0.7% 97.2%
[libx264 @ 0x55fc74c85e00] mb I  I16..4: 20.1% 75.1%  4.8%
[libx264 @ 0x55fc74c85e00] mb P  I16..4:  5.6% 22.1%  2.8%  P16..4: 28.7% 15.6% 10.1%  0.0%  0.0%    skip:15.1%
[libx264 @ 0x55fc74c85e00] mb B  I16..4:  0.6%  1.3%  0.3%  B16..8: 38.2%  5.1%  2.0%  direct: 4.0%  skip:48.5%  L0:45.4% L1:43.9% BI:10.7%
[libx264 @ 0x55fc74c85e00] 8x8 transform intra:70.5% inter:78.7%
[libx264 @ 0x55fc74c85e00] coded y,uvDC,uvAC intra: 55.1% 57.3% 18.0% inter: 18.5% 23.4% 1.2%
[libx264 @ 0x55fc74c85e00] i16 v,h,dc,p: 57% 27%  8%  9%
[libx264 @ 0x55fc74c85e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 22% 29%  3%  3%  3%  5%  4%  6%
[libx264 @ 0x55fc74c85e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 20% 12%  5%  6%  6%  7%  6%  5%
[libx264 @ 0x55fc74c85e00] i8c dc,h,v,p: 56% 20% 20%  3%
[libx264 @ 0x55fc74c85e00] Weighted P-Frames: Y:46.0% UV:33.8%
[libx264 @ 0x55fc74c85e00] ref P L0: 46.6% 18.6% 22.5%  8.8%  3.5%
[libx264 @ 0x55fc74c85e00] ref B L0: 89.9%  8.6%  1.5%
[libx264 @ 0x55fc74c85e00] ref B L1: 96.3%  3.7%
[libx264 @ 0x55fc74c85e00] kb/s:3366.16
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, image2, from 'tmp/output/%07d.png':
  Duration: 00:00:33.08, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 1280x720, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x555d6fba5e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x555d6fba5e00] profile High, level 3.1
[libx264 @ 0x555d6fba5e00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp5_2_out.mp4':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  827 fps= 27 q=-1.0 Lsize=   13859kB time=00:00:32.96 bitrate=3444.6kbits/s speed=1.07x    
video:13848kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.075990%
[libx264 @ 0x555d6fba5e00] frame I:5     Avg QP:21.53  size: 71383
[libx264 @ 0x555d6fba5e00] frame P:245   Avg QP:23.79  size: 38178
[libx264 @ 0x555d6fba5e00] frame B:577   Avg QP:25.27  size:  7746
[libx264 @ 0x555d6fba5e00] consecutive B-frames:  4.2%  6.3%  5.8% 83.7%
[libx264 @ 0x555d6fba5e00] mb I  I16..4: 14.2% 78.0%  7.8%
[libx264 @ 0x555d6fba5e00] mb P  I16..4:  8.1% 22.7%  2.4%  P16..4: 32.0% 17.3% 10.5%  0.0%  0.0%    skip: 6.9%
[libx264 @ 0x555d6fba5e00] mb B  I16..4:  2.3%  5.6%  0.2%  B16..8: 36.6%  5.1%  1.8%  direct:10.1%  skip:38.1%  L0:42.1% L1:46.2% BI:11.8%
[libx264 @ 0x555d6fba5e00] 8x8 transform intra:68.8% inter:77.4%
[libx264 @ 0x555d6fba5e00] coded y,uvDC,uvAC intra: 23.4% 29.7% 7.5% inter: 23.3% 31.9% 1.3%
[libx264 @ 0x555d6fba5e00] i16 v,h,dc,p: 70% 19%  3%  8%
[libx264 @ 0x555d6fba5e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 11% 39%  2%  2%  2%  3%  2%  3%
[libx264 @ 0x555d6fba5e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 21% 13%  5%  7%  7%  8%  6%  5%
[libx264 @ 0x555d6fba5e00] i8c dc,h,v,p: 68% 11% 19%  2%
[libx264 @ 0x555d6fba5e00] Weighted P-Frames: Y:53.5% UV:36.3%
[libx264 @ 0x555d6fba5e00] ref P L0: 47.8% 21.7% 18.4%  8.4%  3.8%
[libx264 @ 0x555d6fba5e00] ref B L0: 87.5%  8.4%  4.1%
[libx264 @ 0x555d6fba5e00] ref B L1: 97.1%  2.9%
[libx264 @ 0x555d6fba5e00] kb/s:3429.30
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bp5_2_in.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:00:33.08, start: 0.000000, bitrate: 3368 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 3366 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55886c313900] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55886c313900] profile High, level 4.0
[libx264 @ 0x55886c313900] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp5_2_comp.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 2572x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[Parsed_movie_1 @ 0x55886c2eb2c0] EOF timestamp not reliable
frame=  827 fps= 16 q=-1.0 Lsize=   24645kB time=00:00:32.96 bitrate=6125.3kbits/s speed=0.654x    
video:24634kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.043674%
[libx264 @ 0x55886c313900] frame I:5     Avg QP:20.67  size:143862
[libx264 @ 0x55886c313900] frame P:225   Avg QP:23.10  size: 74368
[libx264 @ 0x55886c313900] frame B:597   Avg QP:25.49  size: 13020
[libx264 @ 0x55886c313900] consecutive B-frames:  1.6%  5.6%  2.9% 90.0%
[libx264 @ 0x55886c313900] mb I  I16..4: 17.2% 71.3% 11.5%
[libx264 @ 0x55886c313900] mb P  I16..4:  6.9% 20.2%  2.6%  P16..4: 30.1% 18.7% 10.3%  0.0%  0.0%    skip:11.2%
[libx264 @ 0x55886c313900] mb B  I16..4:  1.2%  3.7%  0.2%  B16..8: 34.3%  6.2%  1.8%  direct: 6.2%  skip:46.4%  L0:45.0% L1:45.4% BI: 9.6%
[libx264 @ 0x55886c313900] 8x8 transform intra:69.4% inter:74.5%
[libx264 @ 0x55886c313900] coded y,uvDC,uvAC intra: 31.8% 37.8% 7.9% inter: 18.5% 23.5% 0.5%
[libx264 @ 0x55886c313900] i16 v,h,dc,p: 65% 22%  5%  8%
[libx264 @ 0x55886c313900] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 14% 33%  2%  2%  2%  3%  2%  4%
[libx264 @ 0x55886c313900] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 22% 13%  4%  6%  6%  8%  5%  5%
[libx264 @ 0x55886c313900] i8c dc,h,v,p: 65% 15% 17%  3%
[libx264 @ 0x55886c313900] Weighted P-Frames: Y:46.7% UV:31.6%
[libx264 @ 0x55886c313900] ref P L0: 49.0% 21.4% 18.9%  7.6%  3.1%
[libx264 @ 0x55886c313900] ref B L0: 90.3%  7.3%  2.4%
[libx264 @ 0x55886c313900] ref B L1: 97.4%  2.6%
[libx264 @ 0x55886c313900] kb/s:6100.29
100% 827/827 [19:19<00:00,  1.40s/it]
Processing bp3_2.00x_960x720_21.mp4...
 15% 460/3149 [08:15<31:50,  1.41it/s]/usr/local/lib/python3.6/dist-packages/skimage/color/colorconv.py:1068: UserWarning: Color data out of range: Z < 0 in 12 pixels
  return xyz2rgb(lab2xyz(lab, illuminant, observer))
 15% 465/3149 [08:19<31:50,  1.40it/s]/usr/local/lib/python3.6/dist-packages/skimage/color/colorconv.py:1068: UserWarning: Color data out of range: Z < 0 in 7 pixels
  return xyz2rgb(lab2xyz(lab, illuminant, observer))
 15% 470/3149 [08:23<33:25,  1.34it/s]/usr/local/lib/python3.6/dist-packages/skimage/color/colorconv.py:1068: UserWarning: Color data out of range: Z < 0 in 6 pixels
  return xyz2rgb(lab2xyz(lab, illuminant, observer))
 16% 505/3149 [09:00<45:34,  1.03s/it]/usr/local/lib/python3.6/dist-packages/skimage/color/colorconv.py:1068: UserWarning: Color data out of range: Z < 0 in 51 pixels
  return xyz2rgb(lab2xyz(lab, illuminant, observer))
100% 3149/3149 [56:54<00:00,  1.97it/s]ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, image2, from 'tmp/input/%07d.png':
  Duration: 00:02:05.96, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 960x720, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55e0d123de00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55e0d123de00] profile High, level 3.1
[libx264 @ 0x55e0d123de00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp3_2_in.mp4':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 960x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 3149 fps= 36 q=-1.0 Lsize=   50896kB time=00:02:05.84 bitrate=3313.2kbits/s speed=1.42x    
video:50858kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.074624%
[libx264 @ 0x55e0d123de00] frame I:30    Avg QP:19.76  size: 46651
[libx264 @ 0x55e0d123de00] frame P:862   Avg QP:24.03  size: 37425
[libx264 @ 0x55e0d123de00] frame B:2257  Avg QP:27.21  size:  8160
[libx264 @ 0x55e0d123de00] consecutive B-frames:  3.1%  3.4%  1.6% 91.8%
[libx264 @ 0x55e0d123de00] mb I  I16..4: 19.7% 74.6%  5.7%
[libx264 @ 0x55e0d123de00] mb P  I16..4:  6.2% 21.7%  2.2%  P16..4: 32.4% 18.6% 12.3%  0.0%  0.0%    skip: 6.7%
[libx264 @ 0x55e0d123de00] mb B  I16..4:  1.5%  3.0%  0.2%  B16..8: 47.7%  6.8%  2.2%  direct: 6.2%  skip:32.4%  L0:43.1% L1:44.3% BI:12.6%
[libx264 @ 0x55e0d123de00] 8x8 transform intra:69.8% inter:76.2%
[libx264 @ 0x55e0d123de00] coded y,uvDC,uvAC intra: 49.9% 61.0% 18.8% inter: 25.7% 37.8% 2.8%
[libx264 @ 0x55e0d123de00] i16 v,h,dc,p: 28% 43% 11% 17%
[libx264 @ 0x55e0d123de00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 31% 27%  3%  3%  2%  5%  3%  5%
[libx264 @ 0x55e0d123de00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 33% 14%  4%  5%  5%  7%  4%  6%
[libx264 @ 0x55e0d123de00] i8c dc,h,v,p: 46% 31% 19%  4%
[libx264 @ 0x55e0d123de00] Weighted P-Frames: Y:31.1% UV:24.4%
[libx264 @ 0x55e0d123de00] ref P L0: 52.3% 17.7% 19.4%  8.7%  1.8%
[libx264 @ 0x55e0d123de00] ref B L0: 88.7%  9.6%  1.7%
[libx264 @ 0x55e0d123de00] ref B L1: 95.7%  4.3%
[libx264 @ 0x55e0d123de00] kb/s:3307.57
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, image2, from 'tmp/output/%07d.png':
  Duration: 00:02:05.96, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 960x720, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55cd5ce81e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55cd5ce81e00] profile High, level 3.1
[libx264 @ 0x55cd5ce81e00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp3_2_out.mp4':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 960x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 3149 fps= 34 q=-1.0 Lsize=   50924kB time=00:02:05.84 bitrate=3315.1kbits/s speed=1.35x    
video:50886kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.074436%
[libx264 @ 0x55cd5ce81e00] frame I:31    Avg QP:21.67  size: 45958
[libx264 @ 0x55cd5ce81e00] frame P:861   Avg QP:24.51  size: 37579
[libx264 @ 0x55cd5ce81e00] frame B:2257  Avg QP:27.63  size:  8120
[libx264 @ 0x55cd5ce81e00] consecutive B-frames:  3.0%  3.3%  3.1% 90.6%
[libx264 @ 0x55cd5ce81e00] mb I  I16..4:  8.5% 82.9%  8.6%
[libx264 @ 0x55cd5ce81e00] mb P  I16..4:  7.9% 17.5%  2.3%  P16..4: 34.9% 20.5% 12.3%  0.0%  0.0%    skip: 4.5%
[libx264 @ 0x55cd5ce81e00] mb B  I16..4:  1.6%  1.6%  0.2%  B16..8: 46.4%  6.9%  2.1%  direct: 8.8%  skip:32.3%  L0:41.5% L1:43.7% BI:14.7%
[libx264 @ 0x55cd5ce81e00] 8x8 transform intra:61.6% inter:76.5%
[libx264 @ 0x55cd5ce81e00] coded y,uvDC,uvAC intra: 41.1% 55.1% 17.6% inter: 28.2% 40.0% 2.6%
[libx264 @ 0x55cd5ce81e00] i16 v,h,dc,p: 27% 41%  7% 25%
[libx264 @ 0x55cd5ce81e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 26% 27%  3%  4%  3%  6%  3%  6%
[libx264 @ 0x55cd5ce81e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 32% 14%  4%  6%  5%  8%  4%  6%
[libx264 @ 0x55cd5ce81e00] i8c dc,h,v,p: 53% 27% 17%  4%
[libx264 @ 0x55cd5ce81e00] Weighted P-Frames: Y:44.0% UV:33.4%
[libx264 @ 0x55cd5ce81e00] ref P L0: 49.6% 19.3% 19.2%  9.3%  2.6%
[libx264 @ 0x55cd5ce81e00] ref B L0: 89.4%  8.5%  2.1%
[libx264 @ 0x55cd5ce81e00] ref B L1: 96.8%  3.2%
[libx264 @ 0x55cd5ce81e00] kb/s:3309.42
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bp3_2_in.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:02:05.96, start: 0.000000, bitrate: 3310 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x720, 3307 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55c339ca1900] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55c339ca1900] profile High, level 4.0
[libx264 @ 0x55c339ca1900] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'bp3_2_comp.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1928x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[Parsed_movie_1 @ 0x55c339c790e0] EOF timestamp not reliable
frame= 3149 fps= 21 q=-1.0 Lsize=   90738kB time=00:02:05.84 bitrate=5906.9kbits/s speed=0.823x    
video:90700kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.042522%
[libx264 @ 0x55c339ca1900] frame I:30    Avg QP:20.75  size: 91673
[libx264 @ 0x55c339ca1900] frame P:878   Avg QP:23.82  size: 66638
[libx264 @ 0x55c339ca1900] frame B:2241  Avg QP:27.41  size: 14109
[libx264 @ 0x55c339ca1900] consecutive B-frames:  3.2%  5.1%  2.0% 89.7%
[libx264 @ 0x55c339ca1900] mb I  I16..4: 13.9% 68.2% 17.9%
[libx264 @ 0x55c339ca1900] mb P  I16..4:  7.7% 16.8%  3.0%  P16..4: 34.5% 21.0% 11.0%  0.0%  0.0%    skip: 6.0%
[libx264 @ 0x55c339ca1900] mb B  I16..4:  1.5%  1.9%  0.2%  B16..8: 45.5%  7.2%  1.8%  direct: 6.4%  skip:35.3%  L0:42.1% L1:46.5% BI:11.3%
[libx264 @ 0x55c339ca1900] 8x8 transform intra:59.5% inter:64.3%
[libx264 @ 0x55c339ca1900] coded y,uvDC,uvAC intra: 40.5% 55.9% 16.3% inter: 24.3% 34.0% 1.2%
[libx264 @ 0x55c339ca1900] i16 v,h,dc,p: 32% 41%  9% 18%
[libx264 @ 0x55c339ca1900] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 28% 27%  3%  3%  3%  5%  3%  5%
[libx264 @ 0x55c339ca1900] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 31% 13%  4%  6%  5%  8%  4%  7%
[libx264 @ 0x55c339ca1900] i8c dc,h,v,p: 52% 28% 17%  4%
[libx264 @ 0x55c339ca1900] Weighted P-Frames: Y:30.2% UV:23.0%
[libx264 @ 0x55c339ca1900] ref P L0: 54.1% 19.3% 18.0%  7.1%  1.5%
[libx264 @ 0x55c339ca1900] ref B L0: 90.0%  8.0%  2.0%
[libx264 @ 0x55c339ca1900] ref B L1: 96.7%  3.3%
[libx264 @ 0x55c339ca1900] kb/s:5898.75
100% 3149/3149 [1:02:30<00:00,  1.19s/it]

In [0]:


In [0]: