Can someone explain me those x264 vs x265 SSIM results?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
N!ghtW4lk3r
Posts: 21
Joined: Mon May 19, 2014 5:14 pm

Can someone explain me those x264 vs x265 SSIM results?

Post by N!ghtW4lk3r »

I've downloaded the bigbuckbunny movie in 1080p, 60fps, 339MB (bbb_sunflower_1080p_60fps_normal.mp4, https://download.blender.org/demo/movies/BBB/).

Then i've converted the file to x265 crf21 preset=medium and compared the result (271MB) using ffmpeg SSIM with the original one:

Code: Select all

[Parsed_ssim_0 @ 0000022aea2abe00] SSIM Y:0.924595 (11.226026) U:0.980347 (17.065667) V:0.983534 (17.834129) All:0.943710 (12.495725)
[Parsed_psnr_1 @ 0000022aeaad4f40] PSNR y:23.346363 u:38.828354 v:39.922498 average:25.053005 min:5.319864 max:inf
Then i've converted the file x265 crf15 preset=medium and also compared the result (575MB) using ffmpeg SSIM with the original one:

Code: Select all

[Parsed_ssim_0 @ 000002423f521000] SSIM Y:0.926818 (11.355972) U:0.983775 (17.898137) V:0.986528 (18.705555) All:0.946263 (12.697235)
[Parsed_psnr_1 @ 0000024240354f00] PSNR y:23.339201 u:39.005492 v:40.099148 average:25.048081 min:5.319838 max:inf
Both conversions has this two advanced options set:

Code: Select all

strong-intra-smoothing=0:rect=0
The results are nearly the same... So the SSIM difference seems not to be quality dependend in this case... Can someone explain me whats happening here and why?
rollin_eng
Veteran User
Posts: 3517
Joined: Wed May 04, 2011 11:06 pm

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by rollin_eng »

Are you using the appropriate tune?

https://x265.readthedocs.io/en/default/presets.html
musicvid
Veteran User
Posts: 3679
Joined: Sat Jun 27, 2009 1:19 am

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by musicvid »

The results suggest to me that at RF 21, you have already reached the "optimal" encoding point, at which more is not better, just bigger. The curve looks something like this:
You do not have the required permissions to view the files attached to this post.
N!ghtW4lk3r
Posts: 21
Joined: Mon May 19, 2014 5:14 pm

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by N!ghtW4lk3r »

@rollin_eng
I didn't use tuning for those encodings. But I've done them again with SSIM tuning enabled. SSIM values are really close to those without tuning and filesize dropped slightly. Also added an lossless encode.

Code: Select all

CRF=21, 271MB, tune=none
[Parsed_ssim_0 @ 0000022aea2abe00] SSIM Y:0.924595 (11.226026) U:0.980347 (17.065667) V:0.983534 (17.834129) All:0.943710 (12.495725)
CRF=21, 259MB, tune=SSIM
[Parsed_ssim_0 @ 00000168951a1640] SSIM Y:0.924537 (11.222637) U:0.980238 (17.041692) V:0.983467 (17.816500) All:0.943642 (12.490440)

CRF=15, 575MB, tune=none
[Parsed_ssim_0 @ 000002423f521000] SSIM Y:0.926818 (11.355972) U:0.983775 (17.898137) V:0.986528 (18.705555) All:0.946263 (12.697235)
CRF=15, 557MB, tune=SSIM
[Parsed_ssim_0 @ 00000217e2d01600] SSIM Y:0.926855 (11.358156) U:0.983788 (17.901501) V:0.986545 (18.711298) All:0.946292 (12.699628)

CRF=0, 3.73GB, tune=none
[Parsed_ssim_0 @ 00000230e9d2bec0] SSIM Y:0.928690 (11.468474) U:0.986458 (18.683281) V:0.989122 (19.634673) All:0.948390 (12.872654)

@musicvid:
That makes sense, but why are the optimal and the lossless result that far from 1.0?
rollin_eng
Veteran User
Posts: 3517
Joined: Wed May 04, 2011 11:06 pm

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by rollin_eng »

There is no 'optimal' result.

It all depends on what YOU want.
musicvid
Veteran User
Posts: 3679
Joined: Sat Jun 27, 2009 1:19 am

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by musicvid »

1. With the tune enabled, that was my experience too. Very close numbers, and the relative difference unchanged.
2. We would need to see full encode logs to be sure, but I assume its the same reason, considering whatever differences there are between your source and render templates.

Aside: In my tests here, I was not convinced of the accuracy of internal ssim compared with two other RQM standalone tools, which were very close to each other, as they varied significantly depending on original source quality.
viewtopic.php?f=14&t=40289&p=191259#p191259
mduell
Veteran User
Posts: 7191
Joined: Sat Apr 21, 2007 8:54 pm

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by mduell »

Without tune SSIM, the SSIM comparison is meaningless; the encoder is intentionally doing things that look good but have a negative impact on SSIM.
N!ghtW4lk3r
Posts: 21
Joined: Mon May 19, 2014 5:14 pm

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by N!ghtW4lk3r »

@rollin_eng optimal result means (for me) the lowest possible bitrate with the best quality compared to the original, where higher bitrates dont produce better files. sounds strange reading it again... i think you know what i wanted to say...

@musicvid I didn't use handbrakes SSIM option, i did the comparison manually with ffmpeg - the handbrake internal results are far better as you can see in the logs. By render template you mean the encoder settings?
Log with tuning enabled:

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Ram: 16232 MB, 
GPU Information:
  Intel(R) UHD Graphics 630 - 27.20.100.7990
Screen: 1920x1080
Temp Dir: C:\Users\username\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\username\AppData\Roaming\HandBrake

-------------------------------------------


# Starting Encode ...

[04:47:43] base preset: x265/medium/crf21/audiocopy (Modified)
[16:47:43] hb_init: starting libhb thread
[16:47:43] Starting work at: Thu Aug 27 16:47:43 2020
[16:47:43] 1 job(s) to process
[16:47:43] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy:mp3",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "S:\\__bbb_sunflower_1080p_60fps_normal-21.mp4-tune-ssim.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "S:\\__bbb_sunflower_1080p_60fps_normal.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "strong-intra-smoothing=0:rect=0:ssim",
    "Preset": "medium",
    "Profile": "auto",
    "Quality": 21.0,
    "Tune": "ssim",
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[16:47:43] CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
[16:47:43]  - Intel microarchitecture Kaby Lake
[16:47:43]  - logical processor count: 8
[16:47:43] Intel Quick Sync Video support: yes
[16:47:43]  - Intel Media SDK hardware: API 1.31 (minimum: 1.3)
[16:47:43]  - H.264 encoder: yes
[16:47:43]     - preferred implementation: hardware (any) via D3D11
[16:47:43]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[16:47:43]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[16:47:43]     - preferred implementation: hardware (any) via D3D11
[16:47:43]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[16:47:43] hb_scan: path=S:\__bbb_sunflower_1080p_60fps_normal.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image S:\__bbb_sunflower_1080p_60fps_normal.mp4
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(S:\__bbb_sunflower_1080p_60fps_normal.mp4\) failed
[16:47:43] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[16:47:43] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'S:\__bbb_sunflower_1080p_60fps_normal.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    creation_time   : 2013-12-16T17:59:32.000000Z
    title           : Big Buck Bunny, Sunflower version
    artist          : Blender Foundation 2008, Janus Bager Kristensen 2013
    comment         : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
    genre           : Animation
    composer        : Sacha Goedegebure
  Duration: 00:10:34.53, start: 0.000000, bitrate: 4486 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4001 kb/s, 60 fps, 60 tbr, 60k tbn, 120 tbc (default)
    Metadata:
      creation_time   : 2013-12-16T17:59:32.000000Z
      handler_name    : GPAC ISO Video Handler
    Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
      creation_time   : 2013-12-16T17:59:37.000000Z
      handler_name    : GPAC ISO Audio Handler
    Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)
    Metadata:
      creation_time   : 2013-12-16T17:59:37.000000Z
      handler_name    : GPAC ISO Audio Handler
    Side data:
      audio service type: main
[16:47:43] scan: decoding previews for title 1
[16:47:43] scan: audio 0x1: mp3float, rate=48000Hz, bitrate=160000 Unknown (MP3) (2.0 ch) (160 kbps)
[16:47:43] scan: audio 0x2: ac3, rate=48000Hz, bitrate=320000 Unknown (AC3) (5.1 ch) (320 kbps)
[16:47:44] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[16:47:44] scan: supported video decoders: avcodec qsv
[16:47:44] libhb: scan thread found 1 valid title(s)
[16:47:44] Starting Task: Encoding Pass
[16:47:44] Skipping crop/scale filter
[16:47:44] work: only 1 chapter, disabling chapter markers
[16:47:44] job configuration:
[16:47:44]  * source
[16:47:44]    + S:\__bbb_sunflower_1080p_60fps_normal.mp4
[16:47:44]    + title 1, chapter(s) 1 to 1
[16:47:44]    + container: mov,mp4,m4a,3gp,3g2,mj2
[16:47:44]    + data rate: 4486 kbps
[16:47:44]  * destination
[16:47:44]    + S:\__bbb_sunflower_1080p_60fps_normal-21.mp4-tune-ssim.mp4
[16:47:44]    + container: MPEG-4 (libavformat)
[16:47:44]  * video track
[16:47:44]    + decoder: h264
[16:47:44]      + bitrate 4001 kbps
[16:47:44]    + filter
[16:47:44]      + Framerate Shaper (mode=1)
[16:47:44]        + frame rate: 60.000 fps -> constant 60.000 fps
[16:47:44]    + Output geometry
[16:47:44]      + storage dimensions: 1920 x 1080
[16:47:44]      + pixel aspect ratio: 1 : 1
[16:47:44]      + display dimensions: 1920 x 1080
[16:47:44]    + encoder: H.265 (libx265)
[16:47:44]      + preset:  medium
[16:47:44]      + tune:    ssim
[16:47:44]      + options: strong-intra-smoothing=0:rect=0:ssim
[16:47:44]      + profile: auto
[16:47:44]      + level:   auto
[16:47:44]      + quality: 21.00 (RF)
[16:47:44]      + color profile: 1-1-1
[16:47:44]  * audio track 1
[16:47:44]    + decoder: Unknown (MP3) (2.0 ch) (160 kbps) (track 1, id 0x1)
[16:47:44]      + bitrate: 160 kbps, samplerate: 48000 Hz
[16:47:44]    + MP3 Passthru
[16:47:44] sync: expecting 38071 video frames
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Windows][GCC 9.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.1 (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: 60 / 600 / 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-21.0 / 0.60
x265 [info]: tools: rd=3 early-skip rskip signhide tmvp b-intra lslices=6
x265 [info]: tools: deblock sao
[16:47:44] sync: first pts audio 0x1 is 0
[16:47:44] sync: first pts video is 3000
[16:47:44] sync: "Chapter 1" (1) at frame 1 time 3000
[16:58:21] reader: done. 1 scr changes
[16:58:22] work: average encoding speed for job is 59.642963 fps
[16:58:23] vfr: 38072 frames output, 0 dropped and 0 duped for CFR/PFR
[16:58:23] vfr: lost time: 0 (0 frames)
[16:58:23] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:58:23] mp3float-decoder done: 26425 frames, 0 decoder errors
[16:58:23] h264-decoder done: 38072 frames, 0 decoder errors
[16:58:23] sync: got 38072 frames, 38071 expected
[16:58:23] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
x265 [info]: frame I:    155, Avg QP:19.62  kb/s: 82148.69  SSIM Mean: 0.993376 (21.789dB)
x265 [info]: frame P:  10245, Avg QP:23.74  kb/s: 9025.80   SSIM Mean: 0.990076 (20.033dB)
x265 [info]: frame B:  27672, Avg QP:31.17  kb/s: 679.03    SSIM Mean: 0.989622 (19.839dB)
x265 [info]: Weighted P-Frames: Y:1.8% UV:1.3%
x265 [info]: consecutive B-frames: 10.1% 6.9% 15.8% 41.3% 25.9%
encoded 38072 frames in 638.84s (59.60 fps), 3256.79 kb/s, Avg QP:29.12, SSIM Mean Y: 0.9897591 (19.897 dB)
[16:58:23] mux: track 0, 38072 frames, 258469934 bytes, 3258.45 kbps, fifo 4096
[16:58:23] mux: track 1, 26425 frames, 12684000 bytes, 159.90 kbps, fifo 2048
[16:58:23] Finished work at: Thu Aug 27 16:58:23 2020
[16:58:23] libhb: work result = 0

# Encode Completed ...
Log without tuning:

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Ram: 16232 MB, 
GPU Information:
  Intel(R) UHD Graphics 630 - 27.20.100.7990
Screen: 1920x1080
Temp Dir: C:\Users\Michael\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\Michael\AppData\Roaming\HandBrake

-------------------------------------------


# Starting Encode ...

[03:20:31] base preset: x265/medium/crf21/audiocopy
[15:20:31] hb_init: starting libhb thread
[15:20:31] Starting work at: Fri Aug 28 15:20:31 2020
[15:20:31] 1 job(s) to process
[15:20:31] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy:mp3",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "S:\\__bbb_sunflower_1080p_60fps_normal-21-again.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "S:\\__bbb_sunflower_1080p_60fps_normal.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "strong-intra-smoothing=0:rect=0:ssim",
    "Preset": "medium",
    "Profile": "auto",
    "Quality": 21.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[15:20:31] CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
[15:20:31]  - Intel microarchitecture Kaby Lake
[15:20:31]  - logical processor count: 8
[15:20:31] Intel Quick Sync Video support: yes
[15:20:31]  - Intel Media SDK hardware: API 1.31 (minimum: 1.3)
[15:20:31]  - H.264 encoder: yes
[15:20:31]     - preferred implementation: hardware (any) via D3D11
[15:20:31]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[15:20:31]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[15:20:31]     - preferred implementation: hardware (any) via D3D11
[15:20:31]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[15:20:31] hb_scan: path=S:\__bbb_sunflower_1080p_60fps_normal.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image S:\__bbb_sunflower_1080p_60fps_normal.mp4
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(S:\__bbb_sunflower_1080p_60fps_normal.mp4\) failed
[15:20:31] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[15:20:31] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'S:\__bbb_sunflower_1080p_60fps_normal.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    creation_time   : 2013-12-16T17:59:32.000000Z
    title           : Big Buck Bunny, Sunflower version
    artist          : Blender Foundation 2008, Janus Bager Kristensen 2013
    comment         : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
    genre           : Animation
    composer        : Sacha Goedegebure
  Duration: 00:10:34.53, start: 0.000000, bitrate: 4486 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4001 kb/s, 60 fps, 60 tbr, 60k tbn, 120 tbc (default)
    Metadata:
      creation_time   : 2013-12-16T17:59:32.000000Z
      handler_name    : GPAC ISO Video Handler
    Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
      creation_time   : 2013-12-16T17:59:37.000000Z
      handler_name    : GPAC ISO Audio Handler
    Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)
    Metadata:
      creation_time   : 2013-12-16T17:59:37.000000Z
      handler_name    : GPAC ISO Audio Handler
    Side data:
      audio service type: main
[15:20:31] scan: decoding previews for title 1
[15:20:31] scan: audio 0x1: mp3float, rate=48000Hz, bitrate=160000 Unknown (MP3) (2.0 ch) (160 kbps)
[15:20:31] scan: audio 0x2: ac3, rate=48000Hz, bitrate=320000 Unknown (AC3) (5.1 ch) (320 kbps)
[15:20:31] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[15:20:31] scan: supported video decoders: avcodec qsv
[15:20:31] libhb: scan thread found 1 valid title(s)
[15:20:31] Starting Task: Encoding Pass
[15:20:31] Skipping crop/scale filter
[15:20:31] work: only 1 chapter, disabling chapter markers
[15:20:31] job configuration:
[15:20:31]  * source
[15:20:31]    + S:\__bbb_sunflower_1080p_60fps_normal.mp4
[15:20:31]    + title 1, chapter(s) 1 to 1
[15:20:31]    + container: mov,mp4,m4a,3gp,3g2,mj2
[15:20:31]    + data rate: 4486 kbps
[15:20:31]  * destination
[15:20:31]    + S:\__bbb_sunflower_1080p_60fps_normal-21-again.mp4
[15:20:31]    + container: MPEG-4 (libavformat)
[15:20:31]  * video track
[15:20:31]    + decoder: h264
[15:20:31]      + bitrate 4001 kbps
[15:20:31]    + filter
[15:20:31]      + Framerate Shaper (mode=1)
[15:20:31]        + frame rate: 60.000 fps -> constant 60.000 fps
[15:20:31]    + Output geometry
[15:20:31]      + storage dimensions: 1920 x 1080
[15:20:31]      + pixel aspect ratio: 1 : 1
[15:20:31]      + display dimensions: 1920 x 1080
[15:20:31]    + encoder: H.265 (libx265)
[15:20:31]      + preset:  medium
[15:20:31]      + options: strong-intra-smoothing=0:rect=0:ssim
[15:20:31]      + profile: auto
[15:20:31]      + level:   auto
[15:20:31]      + quality: 21.00 (RF)
[15:20:31]      + color profile: 1-1-1
[15:20:31]  * audio track 1
[15:20:31]    + decoder: Unknown (MP3) (2.0 ch) (160 kbps) (track 1, id 0x1)
[15:20:31]      + bitrate: 160 kbps, samplerate: 48000 Hz
[15:20:31]    + MP3 Passthru
[15:20:31] sync: expecting 38071 video frames
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [warning]: --ssim used with psy on: results will be invalid!
x265 [warning]: --tune ssim should be used if attempting to benchmark ssim!
x265 [info]: Main profile, Level-4.1 (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: 60 / 600 / 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-21.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip signhide tmvp b-intra
x265 [info]: tools: lslices=6 deblock sao
[15:20:31] sync: first pts audio 0x1 is 0
[15:20:31] sync: first pts video is 3000
[15:20:31] sync: "Chapter 1" (1) at frame 1 time 3000
[15:31:30] reader: done. 1 scr changes
[15:31:32] work: average encoding speed for job is 57.662579 fps
[15:31:32] vfr: 38072 frames output, 0 dropped and 0 duped for CFR/PFR
[15:31:32] vfr: lost time: 0 (0 frames)
[15:31:32] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:31:32] mp3float-decoder done: 26425 frames, 0 decoder errors
[15:31:32] h264-decoder done: 38072 frames, 0 decoder errors
[15:31:32] sync: got 38072 frames, 38071 expected
[15:31:32] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
x265 [info]: frame I:    155, Avg QP:19.62  kb/s: 83226.47  SSIM Mean: 0.993477 (21.856dB)
x265 [info]: frame P:  10245, Avg QP:23.61  kb/s: 9468.29   SSIM Mean: 0.990345 (20.153dB)
x265 [info]: frame B:  27672, Avg QP:31.14  kb/s: 732.99    SSIM Mean: 0.989942 (19.975dB)
x265 [info]: Weighted P-Frames: Y:1.8% UV:1.3%
x265 [info]: consecutive B-frames: 10.1% 6.9% 15.8% 41.3% 25.9%
encoded 38072 frames in 660.73s (57.62 fps), 3419.47 kb/s, Avg QP:29.07, SSIM Mean Y: 0.9900647 (20.028 dB)
[15:31:32] mux: track 0, 38072 frames, 271373127 bytes, 3421.12 kbps, fifo 4096
[15:31:32] mux: track 1, 26425 frames, 12684000 bytes, 159.90 kbps, fifo 2048
[15:31:32] Finished work at: Fri Aug 28 15:31:32 2020
[15:31:32] libhb: work result = 0

# Encode Completed ...
@mduell I know that. but shouldn't the tune-ssim option produce a (far) better SSIM-result then those without the tune-option?
rollin_eng
Veteran User
Posts: 3517
Joined: Wed May 04, 2011 11:06 pm

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by rollin_eng »

N!ghtW4lk3r wrote: Fri Aug 28, 2020 1:37 pm @rollin_eng optimal result means (for me) the lowest possible bitrate with the best quality compared to the original, where higher bitrates dont produce better files. sounds strange reading it again... i think you know what i wanted to say...
But what is "Low" and "Best quality" to you is different for everyone.

The SSIM tuning should give you a more accurate result, it might be better or worse.
musicvid
Veteran User
Posts: 3679
Joined: Sat Jun 27, 2009 1:19 am

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by musicvid »

SSIM Tune Off: 0.9822
SSIM Tune On: 0.9869
PSNR Tune Off: 52.848
PSNR Tune On: 51.949

@N!ghtW4lk3r Check your Messages
Rorchach91
Posts: 16
Joined: Fri Aug 14, 2020 4:13 am

Re: Can someone explain me those x264 vs x265 SSIM results?

Post by Rorchach91 »

I think only a higher SSIM value which accompanies with high PSNR score does not necessarily mean the appropriate graphics for human beings.

Much research has approved that, there is a paper from Waterloo university and their examination of the relationship between "good looking graphic" and "computational similar graphic". Worth a read.
https://ece.uwaterloo.ca/~z70wang/research/ssim/
Post Reply