h264 more efficient than h265?

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Sigma
Posts: 6
Joined: Sun May 19, 2019 7:22 am

h264 more efficient than h265?

Post by Sigma »

Description of problem or question:
I have an avi file with ~ 144GB.
When I use the lossless setting for h264 in mp4 the filesize is ~285 MB.
When I use the same settings (so lossless) and just change to h265 in mp4 the file now has ~1,54 GB.
I thought that h265 was created to be more efficient. Or is lossless not handled equally in the codecs?

Because the avi file had some mistakes in it, I had to reexport the film (nothing really changes and the file has again ~144 GB) and I used the same settings for h264 in mp4.

HandBrake version (e.g., 1.0.0):
Used version is 1.0.7. I tried 1.2.2 but I get a crash on startup

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 7

HandBrake Activity Log ***required*** (see How-to get an activity log)
Log file report will follow soon. For some reason Handbrake is closed and I have to redo the encoding.

h264:

Code: Select all

# Starting Encode ...

[09:31:07] hb_init: starting libhb thread
[09:31:08] 1 job(s) to process
[09:31:08] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 512,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "F:\\testh264.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1440",
          "width": "2560"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "F:\\large.avi"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 0.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[09:31:08] CPU: AMD Phenom(tm) II X6 1090T Processor
[09:31:08]  - logical processor count: 6
[09:31:08] Intel Quick Sync Video support: no
[09:31:08] hb_scan: path=F:\large.avi, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image F:\large.avi
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[09:31:08] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[09:31:08] dvd: not a dvd - trying as a stream/file instead
Input #0, avi, from 'F:\large.avi':
  Duration: 00:07:25.99, start: 0.000000, bitrate: -2147483 kb/s
    Stream #0:0: Video: rawvideo
      bgr24, 2560x1440
      30 tbn
    Stream #0:1: Audio: pcm_s16le [[1][0][0][0] / 0x0001]
      48000 Hz, 2 channels, s16, 1536 kb/s
[09:31:08] scan: decoding previews for title 1
[09:31:08] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 Unknown (pcm_s16le) (2.0 ch)

[09:31:09] scan: 10 previews, 2560x1440, 30.000 fps, autocrop = 156/180/266/116, aspect 16:9, PAR 1:1
[09:31:09] libhb: scan thread found 1 valid title(s)
[09:31:09] starting job
[09:31:09] decomb filter thread started for segment 0
[09:31:09] decomb filter thread started for segment 1
[09:31:09] decomb filter thread started for segment 2
[09:31:09] decomb filter thread started for segment 3
[09:31:09] decomb filter thread started for segment 4
[09:31:09] decomb filter thread started for segment 5
[09:31:09] decomb check thread started for segment 0
[09:31:09] decomb check thread started for segment 1
[09:31:09] decomb check thread started for segment 2
[09:31:09] decomb check thread started for segment 3
[09:31:09] decomb check thread started for segment 4
[09:31:09] decomb check thread started for segment 5
[09:31:09] mask filter thread started for segment 0
[09:31:09] mask filter thread started for segment 1
[09:31:09] mask filter thread started for segment 2
[09:31:09] mask filter thread started for segment 3
[09:31:09] mask filter thread started for segment 4
[09:31:09] mask filter thread started for segment 5
[09:31:09] mask erode thread started for segment 0
[09:31:09] mask erode thread started for segment 1
[09:31:09] mask erode thread started for segment 2
[09:31:09] mask erode thread started for segment 3
[09:31:09] mask erode thread started for segment 4
[09:31:09] mask erode thread started for segment 5
[09:31:09] mask dilate thread started for segment 0
[09:31:09] mask dilate thread started for segment 1
[09:31:09] mask dilate thread started for segment 2
[09:31:09] mask dilate thread started for segment 3
[09:31:09] mask dilate thread started for segment 4
[09:31:09] mask dilate thread started for segment 5
[09:31:09] yadif thread started for segment 0
[09:31:09] yadif thread started for segment 1
[09:31:09] yadif thread started for segment 2
[09:31:09] yadif thread started for segment 3
[09:31:09] yadif thread started for segment 4
[09:31:09] yadif thread started for segment 5
[09:31:09] work: track 1, dithering not supported by codec
[09:31:09] work: only 1 chapter, disabling chapter markers
[09:31:09] job configuration:
[09:31:09]  * source
[09:31:09]    + F:\large.avi
[09:31:09]    + title 1, chapter(s) 1 to 1
[09:31:09]    + container: avi
[09:31:09]    + data rate: -2147483 kbps
[09:31:09]  * destination
[09:31:09]    + F:\testh264.mp4
[09:31:09]    + container: MPEG-4 (libavformat)
[09:31:09]  * video track
[09:31:09]    + decoder: rawvideo
[09:31:09]    + filters
[09:31:09]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[09:31:09]      + Decomb (mode=39)
[09:31:09]      + Framerate Shaper (mode=2:rate=27000000/900000)
[09:31:09]        + frame rate: 30.000 fps -> peak rate limited to 30.000 fps
[09:31:09]      + Crop and Scale (width=2560:height=1440:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[09:31:09]        + source: 2560 * 1440, crop (0/0/0/0): 2560 * 1440, scale: 2560 * 1440
[09:31:09]    + Output geometry
[09:31:09]      + storage dimensions: 2560 x 1440
[09:31:09]      + pixel aspect ratio: 1 : 1
[09:31:09]      + display dimensions: 2560 x 1440
[09:31:09]    + encoder: H.264 (libx264)
[09:31:09]      + preset:  fast
[09:31:09]      + profile: main
[09:31:09]      + level:   4.0
[09:31:09]      + quality: 0.00 (RF)
[09:31:09]  * audio track 1
[09:31:09]    + decoder: Unknown (pcm_s16le) (2.0 ch) (track 1, id 0x1)
[09:31:09]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[09:31:09]    + mixdown: Stereo
[09:31:09]    + encoder: AAC (libavcodec)
[09:31:09]      + bitrate: 512 kbps, samplerate: 48000 Hz
[09:31:10] sync: expecting 13379 video frames
[09:31:10] encx264: min-keyint: 30, keyint: 300
[09:31:10] encx264: encoding at constant RF 0.000000
[09:31:10] apply_h264_profile [warning]: lossless requires high444 profile, disabling
[09:31:10] apply_h264_level [warning]: frame size (2560x1440, 14400 macroblocks) too high for level 4.0 (max. 8192 macroblocks)
[09:31:10] encx264: unparsed options: level=4.0:vbv-bufsize=25000:ref=2:vbv-maxrate=20000:b-pyramid=none:8x8dct=0:weightp=1:subme=6:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (160x90) > level limit (8192)
x264 [warning]: MB rate (432000) > level limit (245760)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT
x264 [info]: profile Main, level 4.0
[09:31:10] sync: first pts video is 0
[09:31:10] sync: "Chapter 1" (1) at frame 1 time 0
[09:31:10] sync: first pts audio 0x1 is 0
[09:45:57] reader: done. 1 scr changes
[09:46:01] work: average encoding speed for job is 15.048881 fps
[09:46:01] comb detect: heavy 1243 | light 357 | uncombed 11780 | total 13380
[09:46:01] decomb: deinterlaced 1243 | blended 357 | unfiltered 11780 | total 13380
[09:46:01] vfr: 13380 frames output, 0 dropped and 0 duped for CFR/PFR
[09:46:01] vfr: lost time: 0 (0 frames)
[09:46:01] vfr: gained time: 0 (0 frames) (0 not accounted for)
[09:46:01] pcm_s16le-decoder done: 26760 frames, 0 decoder errors
[09:46:01] rawvideo-decoder done: 13380 frames, 0 decoder errors
[09:46:01] sync: got 13380 frames, 13379 expected
[09:46:01] sync: framerate min 30.000 fps, max 30.010 fps, avg 30.000 fps
x264 [info]: frame I:56    Avg QP: 4.12  size:164451
x264 [info]: frame P:4187  Avg QP: 5.14  size: 40569
x264 [info]: frame B:9137  Avg QP: 5.78  size: 10659
x264 [info]: consecutive B-frames:  5.1%  8.9%  7.7% 78.2%
x264 [info]: mb I  I16..4: 78.4%  0.0% 21.6%
x264 [info]: mb P  I16..4:  5.4%  0.0%  3.9%  P16..4:  5.7%  3.1%  1.8%  0.0%  0.0%    skip:80.2%
x264 [info]: mb B  I16..4:  1.7%  0.0%  0.5%  B16..8:  3.2%  2.2%  0.2%  direct: 1.5%  skip:90.6%  L0:41.0% L1:49.6% BI: 9.4%
x264 [info]: coded y,uvDC,uvAC intra: 38.8% 39.0% 27.3% inter: 2.9% 2.4% 1.1%
x264 [info]: i16 v,h,dc,p: 45% 38% 10%  6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 29% 24%  3%  5%  3%  5%  2%  3%
x264 [info]: i8c dc,h,v,p: 64% 23% 10%  3%
x264 [info]: Weighted P-Frames: Y:8.8% UV:7.5%
x264 [info]: ref P L0: 85.0% 15.0%
x264 [info]: kb/s:4958.95
[09:46:01] mux: track 0, 13380 frames, 276458899 bytes, 4958.53 kbps, fifo 2048
[09:46:01] mux: track 1, 20907 frames, 24370826 bytes, 437.11 kbps, fifo 4096
[09:46:01] libhb: work result = 0

# Encode Completed ...

h265:

Code: Select all

# Starting Encode ...

[09:53:32] hb_init: starting libhb thread
[09:53:32] 1 job(s) to process
[09:53:32] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 512,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "F:\\testh265.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1440",
          "width": "2560"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "F:\\large.avi"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 4096,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "auto",
    "Quality": 0.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[09:53:32] CPU: AMD Phenom(tm) II X6 1090T Processor
[09:53:32]  - logical processor count: 6
[09:53:32] Intel Quick Sync Video support: no
[09:53:32] hb_scan: path=F:\large.avi, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image F:\large.avi
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[09:53:32] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[09:53:32] dvd: not a dvd - trying as a stream/file instead
Input #0, avi, from 'F:\large.avi':
  Duration: 00:07:25.99, start: 0.000000, bitrate: -2147483 kb/s
    Stream #0:0: Video: rawvideo
      bgr24, 2560x1440
      30 tbn
    Stream #0:1: Audio: pcm_s16le [[1][0][0][0] / 0x0001]
      48000 Hz, 2 channels, s16, 1536 kb/s
[09:53:32] scan: decoding previews for title 1
[09:53:32] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 Unknown (pcm_s16le) (2.0 ch)
[09:53:35] scan: 10 previews, 2560x1440, 30.000 fps, autocrop = 156/180/266/116, aspect 16:9, PAR 1:1
[09:53:35] libhb: scan thread found 1 valid title(s)
[09:53:35] starting job
[09:53:35] decomb filter thread started for segment 0
[09:53:35] decomb filter thread started for segment 1
[09:53:35] decomb filter thread started for segment 2
[09:53:35] decomb filter thread started for segment 3
[09:53:35] decomb filter thread started for segment 4
[09:53:35] decomb filter thread started for segment 5
[09:53:35] decomb check thread started for segment 0
[09:53:35] decomb check thread started for segment 1
[09:53:35] decomb check thread started for segment 2
[09:53:35] decomb check thread started for segment 3
[09:53:35] decomb check thread started for segment 4
[09:53:35] decomb check thread started for segment 5
[09:53:35] mask filter thread started for segment 0
[09:53:35] mask filter thread started for segment 1
[09:53:35] mask filter thread started for segment 2
[09:53:35] mask filter thread started for segment 3
[09:53:35] mask filter thread started for segment 4
[09:53:35] mask filter thread started for segment 5
[09:53:35] mask erode thread started for segment 0
[09:53:35] mask erode thread started for segment 1
[09:53:35] mask erode thread started for segment 2
[09:53:35] mask erode thread started for segment 3
[09:53:35] mask erode thread started for segment 4
[09:53:35] mask erode thread started for segment 5
[09:53:35] mask dilate thread started for segment 0
[09:53:35] mask dilate thread started for segment 1
[09:53:35] mask dilate thread started for segment 2
[09:53:35] mask dilate thread started for segment 3
[09:53:35] mask dilate thread started for segment 4
[09:53:35] mask dilate thread started for segment 5
[09:53:35] yadif thread started for segment 0
[09:53:35] yadif thread started for segment 1
[09:53:35] yadif thread started for segment 2
[09:53:35] yadif thread started for segment 3
[09:53:35] yadif thread started for segment 4
[09:53:35] yadif thread started for segment 5
[09:53:35] work: track 1, dithering not supported by codec
[09:53:35] work: only 1 chapter, disabling chapter markers
[09:53:35] job configuration:
[09:53:35]  * source
[09:53:35]    + F:\large.avi
[09:53:35]    + title 1, chapter(s) 1 to 1
[09:53:35]    + container: avi
[09:53:35]    + data rate: -2147483 kbps
[09:53:35]  * destination
[09:53:35]    + F:\testh265.mp4
[09:53:35]    + container: MPEG-4 (libavformat)
[09:53:35]  * video track
[09:53:35]    + decoder: rawvideo
[09:53:35]    + filters
[09:53:35]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[09:53:35]      + Decomb (mode=39)
[09:53:35]      + Framerate Shaper (mode=2:rate=27000000/900000)
[09:53:35]        + frame rate: 30.000 fps -> peak rate limited to 30.000 fps
[09:53:35]      + Crop and Scale (width=2560:height=1440:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[09:53:35]        + source: 2560 * 1440, crop (0/0/0/0): 2560 * 1440, scale: 2560 * 1440
[09:53:35]    + Output geometry
[09:53:35]      + storage dimensions: 2560 x 1440
[09:53:35]      + pixel aspect ratio: 1 : 1
[09:53:35]      + display dimensions: 2560 x 1440
[09:53:35]    + encoder: H.265 (libx265)
[09:53:35]      + preset:  fast
[09:53:35]      + profile: auto
[09:53:35]      + quality: 0.00 (RF)
[09:53:35]  * audio track 1
[09:53:35]    + decoder: Unknown (pcm_s16le) (2.0 ch) (track 1, id 0x1)
[09:53:35]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[09:53:35]    + mixdown: Stereo
[09:53:35]    + encoder: AAC (libavcodec)
[09:53:35]      + bitrate: 512 kbps, samplerate: 48000 Hz
[09:53:35] sync: expecting 13379 video frames
x265 [info]: HEVC encoder version 2.1
x265 [info]: build info [Windows][GCC 5.3.1][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 6 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(23 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       : 30 / 300 / 40
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-0.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 rskip signhide tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=8 deblock sao
[09:53:36] sync: first pts video is 0
[09:53:36] sync: "Chapter 1" (1) at frame 1 time 0
[09:53:36] sync: first pts audio 0x1 is 0
[10:41:39] reader: done. 1 scr changes
[10:42:03] work: average encoding speed for job is 4.622388 fps
[10:42:03] comb detect: heavy 1243 | light 357 | uncombed 11780 | total 13380
[10:42:03] decomb: deinterlaced 1243 | blended 357 | unfiltered 11780 | total 13380
[10:42:03] vfr: 13380 frames output, 0 dropped and 0 duped for CFR/PFR
[10:42:03] vfr: lost time: 0 (0 frames)
[10:42:03] vfr: gained time: 0 (0 frames) (0 not accounted for)
[10:42:03] pcm_s16le-decoder done: 26760 frames, 0 decoder errors
[10:42:03] rawvideo-decoder done: 13380 frames, 0 decoder errors
[10:42:03] sync: got 13380 frames, 13379 expected
[10:42:03] sync: framerate min 30.000 fps, max 30.010 fps, avg 30.000 fps
x265 [info]: frame I:     55, Avg QP:3.44  kb/s: 78801.40
x265 [info]: frame P:   2652, Avg QP:4.91  kb/s: 39917.15
x265 [info]: frame B:  10673, Avg QP:6.99  kb/s: 26488.77
x265 [info]: Weighted P-Frames: Y:6.5% UV:5.5%
x265 [info]: consecutive B-frames: 1.1% 0.2% 0.2% 0.2% 98.3%
encoded 13380 frames in 2908.25s (4.60 fps), 29365.39 kb/s, Avg QP:6.56
[10:42:04] mux: track 0, 13380 frames, 1637174170 bytes, 29364.16 kbps, fifo 2048
[10:42:04] mux: track 1, 20907 frames, 24370826 bytes, 437.11 kbps, fifo 4096
[10:42:04] libhb: work result = 0

# Encode Completed ...
Last edited by Sigma on Sun May 19, 2019 11:31 am, edited 1 time in total.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: h264 more efficient than h265?

Post by rollin_eng »

Log files are saved to disk and should still be there unless you have deleted them.
Sigma
Posts: 6
Joined: Sun May 19, 2019 7:22 am

Re: h264 more efficient than h265?

Post by Sigma »

rollin_eng wrote: Sun May 19, 2019 10:43 am Log files are saved to disk and should still be there unless you have deleted them.
OK, I didn't know that.
If Handbrake does not delete them by itself after some time, doesn't it become some sort of hoarding problem after you have encoded many videos. This also sounds like it could become a problem for file systems like btrfs with all it's metadata collections.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: h264 more efficient than h265?

Post by Woodstock »

Handbrake usually deletes logs older than 30 days, but you have to run it in order for that to happen. :)
Sigma
Posts: 6
Joined: Sun May 19, 2019 7:22 am

Re: h264 more efficient than h265?

Post by Sigma »

Since there is no comment in here I question if this post should be moved over to "General Questions" since it's not really a Windows, but an encoder thing
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: h264 more efficient than h265?

Post by Woodstock »

Efficiency of the encoder depends on a lot of things, and means different things to different people.

From reading this and other sites, my impression is that h265's computational complexity is wasted below 1080p, and it gets progressively better as the resolution goes up, so file sizes go down. And that means transmission bit rates go down for the same resolution.

On the other hand, the increased computational complexity, if not reinforced with hardware decoding, can make the receiving end "lag", as it takes longer to decode a frame than the frame is supposed to be displayed for. That's a different kind of efficiency...

For me, I have few videos larger than 1920x1080, and most of the playback hardware doesn't have h265 decoding hardware, so h265 is wasteful for me.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: h264 more efficient than h265?

Post by BradleyS »

The state of x265 is still evolving compared to the very well optimized and mature x264. It's conceivable it will get better.

Currently, x265 is always better for two scenarios: low bit rate encodes including SD, and 4K. For high quality HD encodes, x264 continues to shine.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: h264 more efficient than h265?

Post by nhyone »

This file seems very compressible. If x264 can compress 144 GB to 285 MB with "lossless" (RF 0), I wonder what the file size is if a saner CRF (say 16) is used.
Sigma
Posts: 6
Joined: Sun May 19, 2019 7:22 am

Re: h264 more efficient than h265?

Post by Sigma »

Woodstock wrote: Fri May 24, 2019 11:00 pm Efficiency of the encoder depends on a lot of things, and means different things to different people.

From reading this and other sites, my impression is that h265's computational complexity is wasted below 1080p, and it gets progressively better as the resolution goes up, so file sizes go down. And that means transmission bit rates go down for the same resolution.

On the other hand, the increased computational complexity, if not reinforced with hardware decoding, can make the receiving end "lag", as it takes longer to decode a frame than the frame is supposed to be displayed for. That's a different kind of efficiency...

For me, I have few videos larger than 1920x1080, and most of the playback hardware doesn't have h265 decoding hardware, so h265 is wasteful for me.
For me it is the filesize for the same (lossless) quality.
Both encoders are set to RF=0 (so lossless). Both have the same starting file (the 144GB avi file, ~7min long, 2560x1440, lossless video, lossless audio), but the h265 file is over 5 times larger than the h264 file. In a second run (same settings, same video file, same Handbrake version) the h264 file was about 675MB which still is over double the size the old h264 has.

The same video encoded with h265 and RF=16 has the size of:
h264 with RF=16: 337 MB
h265 with RF=16: 301MB

So yes, the filesize with h265 is smaller than h264 - but only a little bit more than 10%. Or is 2560x1440 not large enough to really get h265 to work?

By doing a side by side comparison in quality I think there went something wrong with the first h264 file and that the h264 file with 675MB is the better example here.

So in sum again:
codec | RF-0 | RF-16
h264 | 675 MB | 337MB
h265 | 1576 MB | 301 MB
Last edited by Sigma on Sun May 26, 2019 8:15 pm, edited 1 time in total.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: h264 more efficient than h265?

Post by rollin_eng »

If you want to compare directly it might be better to use x265.exe and x264.exe directly or maybe even just ffmpeg.
Sigma
Posts: 6
Joined: Sun May 19, 2019 7:22 am

Re: h264 more efficient than h265?

Post by Sigma »

rollin_eng wrote: Sun May 26, 2019 4:47 pm If you want to compare directly it might be better to use x265.exe and x264.exe directly or maybe even just ffmpeg.
If I want to compare the implementation of x264 and x265 directly you would be right.

But I want to know why the files are the way they are if you want to encode a lossless video with both codecs in Handbrake.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: h264 more efficient than h265?

Post by rollin_eng »

Can you please post your latest logs.
Sigma
Posts: 6
Joined: Sun May 19, 2019 7:22 am

Re: h264 more efficient than h265?

Post by Sigma »

rollin_eng wrote: Sun May 26, 2019 10:26 pm Can you please post your latest logs.
With which encoding settings?

The original logs for lossless quality are in the first comment.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: h264 more efficient than h265?

Post by rollin_eng »

For your new encodes:

codec | RF-0 | RF-16
h264 | 675 MB | 337MB
h265 | 1576 MB | 301 MB
Post Reply