[FFmpeg-user] ffmpeg x265 report v. '-x265-params' -- guide desired

Mark Filipak (ffmpeg) markfilipak at bog.us
Sat Dec 12 01:38:53 EET 2020


I did a transcode from H.264 to H.265 via Handbrake, then tried ffmpeg. Results:
   74,903,299 bytes  made_via_handbrake.mkv   ...beautiful
   25,038,616 bytes  made_via_ffmpeg.mkv   ...a bit of plastic-face -- full output at end

So, I need to tweak ffmpeg's x265 parameters, but how?

How can I relate this output:
   x265 [info]: HEVC encoder version 3.4+27-g5163c32d7
   x265 [info]: build info [Windows][GCC 10.2.0][64 bit] 8bit+10bit+12bit
   x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
   x265 [info]: Main profile, Level-4 (Main tier)
   x265 [info]: Thread pool created using 8 threads
   x265 [info]: Slices                              : 1
   x265 [info]: frame threads / pool features       : 3 / wpp(17 rows)
   x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
   x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
   x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
   x265 [info]: Keyframe min / max / scenecut / bias  : 23 / 250 / 40 / 5.00
   x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
   x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
   x265 [info]: References / ref-limit  cu / depth  : 3 / off / on
   x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
   x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
   x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
   x265 [info]: tools: b-intra strong-intra-smoothing lslices=6 deblock sao
with the list of options here: https://ffmpeg.org/ffmpeg-codecs.html#Options-30?

There is a clue (I think): "x265 --help"... I stumbled on this:
https://ffmpeg.org/general.html#x265.
On that page is a link to here:
http://x265.org/developers.html.
I took the link but was almost immediately assaulted by a pornographic game.

Oh, dear. Does anyone have a guide to x265 they can share?



ffmpeg -i b:\BDMV\STREAM\00204.m2ts -map 0 -codec:v libx265 -codec:a copy -codec:s copy 
made_via_ffmpeg.mkv
ffmpeg version 2020-12-09-git-7777e5119a-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg 
developers
   built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads 
--disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 
--enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh 
--enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 
--enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp 
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg 
--enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi 
--enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid 
--enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx 
--enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme 
--enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame 
--enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc 
--enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis 
--enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband 
--enable-libsoxr --enable-chromaprint
   libavutil      56. 62.100 / 56. 62.100
   libavcodec     58.115.102 / 58.115.102
   libavformat    58. 65.100 / 58. 65.100
   libavdevice    58. 11.103 / 58. 11.103
   libavfilter     7. 92.100 /  7. 92.100
   libswscale      5.  8.100 /  5.  8.100
   libswresample   3.  8.100 /  3.  8.100
   libpostproc    55.  8.100 / 55.  8.100
[mpegts @ 0000026acb0fb4c0] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0000026acb0fb4c0] start time for stream 3 is not set in estimate_timings_from_pts
[mpegts @ 0000026acb0fb4c0] start time for stream 4 is not set in estimate_timings_from_pts
[mpegts @ 0000026acb0fb4c0] Could not find codec parameters for stream 2 (Subtitle: 
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 0000026acb0fb4c0] Could not find codec parameters for stream 3 (Subtitle: 
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 0000026acb0fb4c0] Could not find codec parameters for stream 4 (Subtitle: 
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpegts, from 'b:\BDMV\STREAM\00204.m2ts':
   Duration: 00:02:38.98, start: 11.650667, bitrate: 18758 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(progressive), 1920x1080 
[SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
     Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 224 kb/s
     Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
     Stream #0:3[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
     Stream #0:4[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
File 'made_via_ffmpeg.mkv' already exists. Overwrite? [y/N] y
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
   Stream #0:1 -> #0:1 (copy)
   Stream #0:2 -> #0:2 (copy)
   Stream #0:3 -> #0:3 (copy)
   Stream #0:4 -> #0:4 (copy)
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 3.4+27-g5163c32d7
x265 [info]: build info [Windows][GCC 10.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 23 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing lslices=6 deblock sao
Output #0, matroska, to 'made_via_ffmpeg.mkv':
   Metadata:
     encoder         : Lavf58.65.100
     Stream #0:0: Video: hevc (libx265), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 
q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc
     Metadata:
       encoder         : Lavc58.115.102 libx265
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
     Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 224 kb/s
     Stream #0:2: Subtitle: hdmv_pgs_subtitle ([255][255][255][255] / 0xFFFFFFFF)
     Stream #0:3: Subtitle: hdmv_pgs_subtitle ([255][255][255][255] / 0xFFFFFFFF)
     Stream #0:4: Subtitle: hdmv_pgs_subtitle ([255][255][255][255] / 0xFFFFFFFF)
frame= 3811 fps= 24 q=36.0 Lsize=   24452kB time=00:02:38.94 bitrate=1260.2kbits/s speed=0.985x
video:15607kB audio:4347kB subtitle:4399kB other streams:0kB global headers:2kB muxing overhead: 
0.407587%
x265 [info]: frame I:     32, Avg QP:26.54  kb/s: 11742.46
x265 [info]: frame P:    967, Avg QP:28.72  kb/s: 1958.54
x265 [info]: frame B:   2812, Avg QP:34.51  kb/s: 281.93
x265 [info]: Weighted P-Frames: Y:6.5% UV:4.6%
x265 [info]: consecutive B-frames: 6.1% 4.0% 5.7% 70.7% 13.5%

encoded 3811 frames in 161.18s (23.64 fps), 803.58 kb/s, Avg QP:32.97


More information about the ffmpeg-user mailing list