# ffmpeg -i tv-recording.mkv -threads 2 -map 0 -c:v libx264 -preset medium -tune film -crf 23 -c:a copy -c:s copy encoded.mkv
ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.3 (Debian 4.9.3-3)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      54. 27.100 / 54. 31.100
  libavcodec     56. 41.100 / 56. 60.100
  libavformat    56. 36.100 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 'tv-recording.mkv':
  Metadata:
    ENCODER         : Lavf56.36.100
  Duration: 01:58:33.76, start: 0.017000, bitrate: 4903 kb/s
    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, SAR 1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
    Stream #0:1(deu?): Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s (default)
[libx264 @ 0x1d55d60] using SAR=1/1
[libx264 @ 0x1d55d60] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
[libx264 @ 0x1d55d60] profile High, level 3.0
[libx264 @ 0x1d55d60] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:-1:-1 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.15 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-3 threads=2 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
[matroska @ 0x1dd5ac0] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, matroska, to 'encoded.mkv':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 720x576 [SAR 1:1 DAR 5:4], q=-1--1, 25 fps, 1k tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc56.41.100 libx264
    Stream #0:1(deu?): Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, 192 kb/s (default)
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=177833 fps= 34 q=-1.0 Lsize= 1268360kB time=01:58:33.72 bitrate=1460.6kbits/s
video:1098302kB audio:166728kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.263293%
[libx264 @ 0x1d55d60] frame I:2132  Avg QP:20.38  size: 29733
[libx264 @ 0x1d55d60] frame P:88876 Avg QP:24.40  size:  9606
[libx264 @ 0x1d55d60] frame B:86825 Avg QP:26.89  size:  2390
[libx264 @ 0x1d55d60] consecutive B-frames: 19.9% 40.0% 15.4% 24.8%
[libx264 @ 0x1d55d60] mb I  I16..4: 10.2% 78.8% 11.0%
[libx264 @ 0x1d55d60] mb P  I16..4:  2.0% 12.2%  1.3%  P16..4: 30.9% 12.9%  7.2%  0.0%  0.0%    skip:33.5%
[libx264 @ 0x1d55d60] mb B  I16..4:  0.2%  1.2%  0.2%  B16..8: 28.7%  4.2%  1.0%  direct: 1.9%  skip:62.8%  L0:39.0% L1:48.4% BI:12.7%
[libx264 @ 0x1d55d60] 8x8 transform intra:78.5% inter:74.5%
[libx264 @ 0x1d55d60] coded y,uvDC,uvAC intra: 59.3% 25.2% 4.1% inter: 16.6% 5.4% 0.2%
[libx264 @ 0x1d55d60] i16 v,h,dc,p: 42% 20% 11% 27%
[libx264 @ 0x1d55d60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 11% 29%  4%  4%  7%  4%  9%  4%
[libx264 @ 0x1d55d60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 10% 16%  6%  7% 11%  5%  9%  3%
[libx264 @ 0x1d55d60] i8c dc,h,v,p: 75%  9% 15%  1%
[libx264 @ 0x1d55d60] Weighted P-Frames: Y:6.0% UV:2.4%
[libx264 @ 0x1d55d60] ref P L0: 60.9% 16.0% 15.7%  7.0%  0.5%
[libx264 @ 0x1d55d60] ref B L0: 83.0% 15.6%  1.4%
[libx264 @ 0x1d55d60] ref B L1: 96.2%  3.8%
[libx264 @ 0x1d55d60] kb/s:1264.79

