[FFmpeg-user] gain the highest quality with H264 at a certain bit rate

negin tebyani negin.tebyani at gmail.com
Tue Mar 28 16:20:25 EEST 2017


sorry, I forgot to paste the command:

ffmpeg -i arsenalVScristalPalas.mp4 -movflags faststart -c:v libx264
-x264opts 'keyint=300:min-keyint=25:8x8dct:sliced-threads=0' -qblur 0.5
-deblock 1:1 -flags +loop -b:v 2048k -maxrate 2048k -bufsize 5000k -vf
"scale=-1280:720:flags=spline+full_chroma_inp+full_chroma_int+accurate_rnd+bitexact"
-qcomp 0.60 -qblur 0.5 -acodec copy -b:a 128k -coder 1 -me_range 6
-sc_threshold 42 -bf 10 -qmin 0 -qmax 40 -qblur 0.5 -trellis 2 -mbtree 1
-preset veryslow -ss 00:01:00 -t 00:01:00 quantizer2.mp4

ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg
developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1
--build-suffix=-ffmpeg --toolchain=hardened
--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
--cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping
--disable-decoder=libopenjpeg --disable-decoder=libschroedinger
--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-libmodplug --enable-libmp3lame --enable-libopenjpeg
--enable-libopus --enable-libpulse --enable-librtmp
--enable-libschroedinger --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-libxvid --enable-libzvbi
--enable-openal --enable-opengl --enable-x11grab --enable-libdc1394
--enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264
--enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'arsenalVScristalPalas.mp4':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1mp42
    creation_time   : 2017-01-03 09:36:38
  Duration: 00:11:01.24, start: 0.000000, bitrate: 4407 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 3998 kb/s, 50 fps, 50 tbr, 50 tbn, 100 tbc
(default)
    Metadata:
      creation_time   : 2017-01-03 09:36:38
      handler_name    : Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 384 kb/s (default)
    Metadata:
      creation_time   : 2017-01-03 09:36:38
      handler_name    : Sound Media Handler
File 'quantizer2.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0xedb800] using SAR=1/1
[libx264 @ 0xedb800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
FMA3 AVX2 LZCNT BMI2
[libx264 @ 0xedb800] profile High, level 5.0
[libx264 @ 0xedb800] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec
- Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1
ref=16 deblock=1:1:1 analyse=0x3:0x133 me=umh subme=10 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=6 chroma_me=1 trellis=2 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=10 b_pyramid=2 b_adapt=2
b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=300 keyint_min=25
scenecut=42 intra_refresh=0 rc_lookahead=60 rc=cbr mbtree=1 bitrate=2048
ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=40 qpstep=4 vbv_maxrate=2048
vbv_bufsize=5000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0xe98ba0] Codec for stream 1 does not use global headers but
container format requires global headers
Output #0, mp4, to 'quantizer2.mp4':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1mp42
    encoder         : Lavf56.40.101
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=0-40, 2048 kb/s, 50 fps, 12800 tbn,
50 tbc (default)
    Metadata:
      creation_time   : 2017-01-03 09:36:38
      handler_name    : Video Media Handler
      encoder         : Lavc56.60.100 libx264
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, 384 kb/s (default)
    Metadata:
      creation_time   : 2017-01-03 09:36:38
      handler_name    : Sound Media Handler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0xe98ba0] Starting second pass: moving the moov atom to the
beginning of the file
frame= 3000 fps= 16 q=-1.0 Lsize=   17922kB time=00:01:00.00
bitrate=2447.0kbits/s
video:15041kB audio:2812kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.385285%
[libx264 @ 0xedb800] frame I:11    Avg QP:22.20  size: 51404
[libx264 @ 0xedb800] frame P:709   Avg QP:27.18  size: 12762
[libx264 @ 0xedb800] frame B:2280  Avg QP:33.45  size:  2539
[libx264 @ 0xedb800] consecutive B-frames:  1.7%  5.8% 19.6%  6.7%  4.0%
62.2%  0.0%  0.0%  0.0%  0.0%  0.0%
[libx264 @ 0xedb800] mb I  I16..4: 22.2% 53.2% 24.6%
[libx264 @ 0xedb800] mb P  I16..4: 10.7% 11.6%  1.1%  P16..4: 35.7%  6.6%
 5.2%  0.2%  0.1%    skip:28.7%
[libx264 @ 0xedb800] mb B  I16..4:  0.7%  0.8%  0.1%  B16..8: 31.3%  2.4%
 0.4%  direct: 0.8%  skip:63.4%  L0:43.4% L1:52.7% BI: 3.9%
[libx264 @ 0xedb800] 8x8 transform intra:49.9% inter:65.4%
[libx264 @ 0xedb800] direct mvs  spatial:99.8% temporal:0.2%
[libx264 @ 0xedb800] coded y,uvDC,uvAC intra: 23.1% 27.7% 5.6% inter: 4.1%
4.7% 0.5%
[libx264 @ 0xedb800] i16 v,h,dc,p: 18% 37% 19% 26%
[libx264 @ 0xedb800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 21% 24%  5%  6%  6%
 8%  6%  9%
[libx264 @ 0xedb800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 17% 17%  6%  9%  9%
 9%  7%  9%
[libx264 @ 0xedb800] i8c dc,h,v,p: 61% 22% 12%  5%
[libx264 @ 0xedb800] Weighted P-Frames: Y:0.1% UV:0.1%
[libx264 @ 0xedb800] ref P L0: 63.8%  9.5% 12.1%  4.0%  2.3%  1.8%  1.4%
 0.9%  0.7%  0.8%  0.5%  0.5%  0.5%  0.4%  0.4%  0.3%
[libx264 @ 0xedb800] ref B L0: 88.3%  6.3%  2.2%  0.8%  0.6%  0.5%  0.4%
 0.2%  0.2%  0.1%  0.1%  0.1%  0.1%  0.1%  0.1%
[libx264 @ 0xedb800] ref B L1: 94.9%  5.1%
[libx264 @ 0xedb800] kb/s:2053.53


>
> besides that 2.8.x is *terrible* outdated when we have 3.1 und 3.2 over
> many months - any reason why cut out the command line itself which makes
> the context to the outputs?
>
>


More information about the ffmpeg-user mailing list