[FFmpeg-user] 1920x1080p24 AVC to HEVC compression options?

Mark Filipak markfilipak.windows+ffmpeg at gmail.com
Mon Mar 30 09:24:03 EEST 2020


My mondo-commandline is just about complete. ...Just one more issue.

How do I decrease the video compression?

Details:
ffmpeg -i IN -vf "telecine=pattern=5555,bwdif=mode=send_frame" -c:a copy -c:s copy OUT

The 5-5-5-5 telecine works! And it's f'ing *fantastic* -- finally, no judder; no judder at all! On a 
60Hz TV, the motion is as smooth as in a cinema. There's just the slightest comb (2 of 10 frames @ 
60 FPS), but I'll conquer that.

However, it uses the x264 coder with compression that's too high resulting in 'clay-face' or 
'plastic-face'. What I'd prefer is less compression and the x265 coder.

I can probably specify x265 with a '-c:v libx265' directive, but I haven't found a way to specify 
less compression. I look here: https://ffmpeg.org/ffmpeg-codecs.html#libx265 but I don't see any 
actual documentation...

...any suggestions what Options and values I should use? What works for you when transcoding 
1920x1080p24 AVC to HEVC?

Thanks, Folks!


Here's the output using x264 from earlier today (yesterday).

 >ffmpeg -i 00004.m2ts -vf "telecine=pattern=5555,bwdif=mode=send_frame" [00004.m2ts]1080p60p60.mkv
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg developers
   built with gcc 9.1.1 (GCC) 20190807
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls 
--enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype 
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg 
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora 
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp 
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex 
--enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid 
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
   libavutil      56. 33.100 / 56. 33.100
   libavcodec     58. 55.101 / 58. 55.101
   libavformat    58. 31.104 / 58. 31.104
   libavdevice    58.  9.100 / 58.  9.100
   libavfilter     7. 58.101 /  7. 58.101
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
Input #0, mpegts, from '00004.m2ts':
   Duration: 00:51:03.85, start: 600.000000, bitrate: 29370 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, 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, 256 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (ac3 (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
[Parsed_telecine_0 @ 000001cf6e8ab780] Telecine pattern 5555 yields up to 3 frames per frame, pts 
advance factor: 8/20
[libx264 @ 000001cf6d030500] using SAR=1/1
[libx264 @ 000001cf6d030500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001cf6d030500] profile High, level 4.2, 4:2:0, 8-bit
[libx264 @ 000001cf6d030500] 264 - core 158 r2984 3759fcb - H.264/MPEG-4 AVC codec - Copyleft 
2003-2019 - 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, matroska, to '[00004.m2ts]1080p60p60.mkv':
   Metadata:
     encoder         : Lavf58.31.104
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 
q=-1--1, 59.94 fps, 1k tbn, 59.94 tbc
     Metadata:
       encoder         : Lavc58.55.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: 18446744073709551615
     Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp
     Metadata:
       encoder         : Lavc58.55.101 libvorbis
frame=183647 fps= 48 q=-1.0 Lsize=  979669kB time=00:51:03.79 bitrate=2619.4kbits/s speed=0.807x
video:937961kB audio:39238kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 
0.252719%
[libx264 @ 000001cf6d030500] frame I:960   Avg QP:21.98  size:106134
[libx264 @ 000001cf6d030500] frame P:55120 Avg QP:24.70  size: 10661
[libx264 @ 000001cf6d030500] frame B:127567 Avg QP:27.96  size:  2124
[libx264 @ 000001cf6d030500] consecutive B-frames:  0.8% 19.7%  0.6% 79.0%
[libx264 @ 000001cf6d030500] mb I  I16..4: 13.8% 75.2% 11.0%
[libx264 @ 000001cf6d030500] mb P  I16..4:  0.7%  1.8%  0.1%  P16..4: 27.4%  3.1%  2.7%  0.0%  0.0% 
   skip:64.3%
[libx264 @ 000001cf6d030500] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 20.3%  0.2%  0.0%  direct: 
0.3%  skip:79.2%  L0:44.4% L1:55.1% BI: 0.5%
[libx264 @ 000001cf6d030500] 8x8 transform intra:71.1% inter:89.9%
[libx264 @ 000001cf6d030500] coded y,uvDC,uvAC intra: 53.3% 65.0% 20.2% inter: 3.3% 6.7% 0.1%
[libx264 @ 000001cf6d030500] i16 v,h,dc,p: 29% 24% 14% 33%
[libx264 @ 000001cf6d030500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 17% 26%  5%  6%  8%  6%  7%  6%
[libx264 @ 000001cf6d030500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 32% 10%  6%  8%  8%  6%  6%  4%
[libx264 @ 000001cf6d030500] i8c dc,h,v,p: 54% 23% 19%  4%
[libx264 @ 000001cf6d030500] Weighted P-Frames: Y:0.3% UV:0.2%
[libx264 @ 000001cf6d030500] ref P L0: 61.9% 13.5% 13.5% 11.1%  0.0%
[libx264 @ 000001cf6d030500] ref B L0: 84.9%  9.6%  5.5%
[libx264 @ 000001cf6d030500] ref B L1: 96.8%  3.2%
[libx264 @ 000001cf6d030500] kb/s:2507.89


More information about the ffmpeg-user mailing list