libx265 to libx264 Encode Speed Comparison
Here is my totally non-scientific, back of a napkin, H265 to H264 encoder speed comparison. Full software, no GPU assist using FFMPEG, libx265 and libx264.
Machine is a dual quad core, hyperthreaded machine, which totals 16 threads. Very slow hard drive.
====================================================================
===
=== Encode with FFMPEG
===
=== Input file: ArcticTale_TRL_MPEGPS_MPEG2_PCM_1080p_16-9_23-97_2-0
=== Input frames: 2670
=== Output FOURCC: YUV420p
=== Video only
===
=== libx264 Encode: 102.5565403 seconds, File Size: 125 MB
=== libx265 Encode: 355.5555596 seconds, File Size: 20 MB
===
====================================================================
=== Encode with FFMPEG
===
=== Input file: ArcticTale_TRL_MPEGPS_MPEG2_PCM_1080p_16-9_23-97_2-0
=== Input frames: 2670
=== Output FOURCC: YUV420p
=== Video only
===
=== libx264 Encode: 102.5565403 seconds, File Size: 125 MB
=== libx265 Encode: 355.5555596 seconds, File Size: 20 MB
===
====================================================================
============================
libx264 Encode Command Line
============================
libx264 Encode Command Line
============================
measure-command { ffmpeg -i .\ArcticTale_TRL_MPEGPS_MPEG2_PCM_1080p_16-9_23-97_2-0.mpg -an -vcodec libx264 -pix_fmt yuv420p out_h264.mp4 }
ffmpeg version N-76822-g12a419d Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libm
p3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena
ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-z
lib
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.100 / 57. 16.100
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mpeg, from '.\ArcticTale_TRL_MPEGPS_MPEG2_PCM_1080p_16-9_23-97_2-0.mpg':
Duration: 00:01:51.36, start: 0.945411, bitrate: 53680 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 23.98 fps, 23.
98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s
[libx264 @ 0000000003380a20] using SAR=1/1
[libx264 @ 0000000003380a20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0000000003380a20] profile High, level 4.0
[libx264 @ 0000000003380a20] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.vid
eolan.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=24 looka
head_threads=4 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=23 scenecut=40 intra_refresh=0 rc_lookah
ead=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 'out_h264.mp4':
Metadata:
encoder : Lavf57.19.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 f
ps, 24k tbn, 23.98 tbc
Metadata:
encoder : Lavc57.16.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 2670 fps= 26 q=-1.0 Lsize= 125334kB time=00:01:51.27 bitrate=9226.8kbits/s
video:125313kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.017382%
[libx264 @ 0000000003380a20] frame I:69 Avg QP:20.86 size:102308
[libx264 @ 0000000003380a20] frame P:2013 Avg QP:24.63 size: 53810
[libx264 @ 0000000003380a20] frame B:588 Avg QP:24.85 size: 22009
[libx264 @ 0000000003380a20] consecutive B-frames: 61.2% 27.7% 2.1% 9.0%
[libx264 @ 0000000003380a20] mb I I16..4: 8.9% 86.4% 4.7%
[libx264 @ 0000000003380a20] mb P I16..4: 3.0% 22.4% 0.5% P16..4: 43.0% 14.2% 6.1% 0.0% 0.0% skip:10.8%
[libx264 @ 0000000003380a20] mb B I16..4: 0.6% 1.9% 0.0% B16..8: 31.2% 6.0% 1.2% direct: 8.2% skip:50.8% L0:41
.7% L1:50.8% BI: 7.5%
[libx264 @ 0000000003380a20] 8x8 transform intra:86.0% inter:84.2%
[libx264 @ 0000000003380a20] coded y,uvDC,uvAC intra: 69.4% 81.6% 53.4% inter: 39.6% 53.8% 6.2%
[libx264 @ 0000000003380a20] i16 v,h,dc,p: 33% 27% 6% 34%
[libx264 @ 0000000003380a20] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 18% 27% 5% 6% 6% 6% 7% 8%
[libx264 @ 0000000003380a20] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 23% 12% 6% 8% 8% 8% 6% 5%
[libx264 @ 0000000003380a20] i8c dc,h,v,p: 58% 20% 15% 7%
[libx264 @ 0000000003380a20] Weighted P-Frames: Y:18.6% UV:16.3%
[libx264 @ 0000000003380a20] ref P L0: 59.1% 16.6% 16.9% 7.1% 0.3%
[libx264 @ 0000000003380a20] ref B L0: 82.6% 17.1% 0.3%
[libx264 @ 0000000003380a20] ref B L1: 98.4% 1.6%
[libx264 @ 0000000003380a20] kb/s:9218.25
ffmpeg version N-76822-g12a419d Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libm
p3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena
ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-z
lib
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.100 / 57. 16.100
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mpeg, from '.\ArcticTale_TRL_MPEGPS_MPEG2_PCM_1080p_16-9_23-97_2-0.mpg':
Duration: 00:01:51.36, start: 0.945411, bitrate: 53680 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 23.98 fps, 23.
98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s
[libx264 @ 0000000003380a20] using SAR=1/1
[libx264 @ 0000000003380a20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0000000003380a20] profile High, level 4.0
[libx264 @ 0000000003380a20] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.vid
eolan.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=24 looka
head_threads=4 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=23 scenecut=40 intra_refresh=0 rc_lookah
ead=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 'out_h264.mp4':
Metadata:
encoder : Lavf57.19.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 f
ps, 24k tbn, 23.98 tbc
Metadata:
encoder : Lavc57.16.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 2670 fps= 26 q=-1.0 Lsize= 125334kB time=00:01:51.27 bitrate=9226.8kbits/s
video:125313kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.017382%
[libx264 @ 0000000003380a20] frame I:69 Avg QP:20.86 size:102308
[libx264 @ 0000000003380a20] frame P:2013 Avg QP:24.63 size: 53810
[libx264 @ 0000000003380a20] frame B:588 Avg QP:24.85 size: 22009
[libx264 @ 0000000003380a20] consecutive B-frames: 61.2% 27.7% 2.1% 9.0%
[libx264 @ 0000000003380a20] mb I I16..4: 8.9% 86.4% 4.7%
[libx264 @ 0000000003380a20] mb P I16..4: 3.0% 22.4% 0.5% P16..4: 43.0% 14.2% 6.1% 0.0% 0.0% skip:10.8%
[libx264 @ 0000000003380a20] mb B I16..4: 0.6% 1.9% 0.0% B16..8: 31.2% 6.0% 1.2% direct: 8.2% skip:50.8% L0:41
.7% L1:50.8% BI: 7.5%
[libx264 @ 0000000003380a20] 8x8 transform intra:86.0% inter:84.2%
[libx264 @ 0000000003380a20] coded y,uvDC,uvAC intra: 69.4% 81.6% 53.4% inter: 39.6% 53.8% 6.2%
[libx264 @ 0000000003380a20] i16 v,h,dc,p: 33% 27% 6% 34%
[libx264 @ 0000000003380a20] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 18% 27% 5% 6% 6% 6% 7% 8%
[libx264 @ 0000000003380a20] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 23% 12% 6% 8% 8% 8% 6% 5%
[libx264 @ 0000000003380a20] i8c dc,h,v,p: 58% 20% 15% 7%
[libx264 @ 0000000003380a20] Weighted P-Frames: Y:18.6% UV:16.3%
[libx264 @ 0000000003380a20] ref P L0: 59.1% 16.6% 16.9% 7.1% 0.3%
[libx264 @ 0000000003380a20] ref B L0: 82.6% 17.1% 0.3%
[libx264 @ 0000000003380a20] ref B L1: 98.4% 1.6%
[libx264 @ 0000000003380a20] kb/s:9218.25
Days : 0
Hours : 0
Minutes : 1
Seconds : 42
Milliseconds : 556
Ticks : 1025565403
TotalDays : 0.00118699699421296
TotalHours : 0.0284879278611111
TotalMinutes : 1.70927567166667
TotalSeconds : 102.5565403
TotalMilliseconds : 102556.5403
============================
libx265 Encode Command Line
============================
libx265 Encode Command Line
============================
measure-command { ffmpeg -i .\ArcticTale_TRL_MPEGPS_MPEG2_PCM_1080p_16-9_23-97_2-0.mpg -an -vcodec libx265 -pix_fmt yuv420p out_h265.mp4 }
ffmpeg version N-76822-g12a419d Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libm
p3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena
ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-z
lib
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.100 / 57. 16.100
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mpeg, from '.\ArcticTale_TRL_MPEGPS_MPEG2_PCM_1080p_16-9_23-97_2-0.mpg':
Duration: 00:01:51.36, start: 0.945411, bitrate: 53680 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 23.98 fps, 23.
98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s
x265 [info]: HEVC encoder version 1.8+1-5dcc9d3a928c400b
x265 [info]: build info [Windows][GCC 5.2.0][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: frame threads / pool features : 5 / 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 / 2
x265 [info]: Keyframe min / max / scenecut : 23 / 250 / 40
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 / 0 / 0
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=0.30 signhide tmvp strong-intra-smoothing
x265 [info]: tools: deblock sao
Output #0, mp4, to 'out_h265.mp4':
Metadata:
encoder : Lavf57.19.100
Stream #0:0: Video: hevc (libx265) ([35][0][0][0] / 0x0023), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fp
s, 24k tbn, 23.98 tbc
Metadata:
encoder : Lavc57.16.100 libx265
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> hevc (libx265))
Press [q] to stop, [?] for help
frame= 2670 fps=7.5 q=-0.0 Lsize= 20500kB time=00:01:51.27 bitrate=1509.1kbits/s
video:20469kB audio:0kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: 0.151336%
x265 [info]: frame I: 44, Avg QP:28.51 kb/s: 6969.79
x265 [info]: frame P: 679, Avg QP:30.21 kb/s: 2875.71
x265 [info]: frame B: 1947, Avg QP:34.22 kb/s: 903.42
x265 [info]: Weighted P-Frames: Y:14.9% UV:13.1%
x265 [info]: consecutive B-frames: 14.8% 6.4% 12.4% 27.5% 38.9%
encoded 2670 frames in 354.91s (7.52 fps), 1504.96 kb/s, Avg QP:33.11
Days : 0
Hours : 0
Minutes : 5
Seconds : 55
Milliseconds : 555
Ticks : 3555555596
TotalDays : 0.00411522638425926
TotalHours : 0.0987654332222222
TotalMinutes : 5.92592599333333
TotalSeconds : 355.5555596
TotalMilliseconds : 355555.5596
Comments
Post a Comment