Can play H.265 but can't encode H.265

HandBrake for Windows support
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
DAfshar
Posts: 7
Joined: Thu May 07, 2020 12:41 pm

Can play H.265 but can't encode H.265

Post by DAfshar »

Every attempt to convert H.264 videos to H.265 results in a white screen.

Still using a self-built desktop with onboard graphics (Intel HD Graphics 4000).
I have no problem playing H.265 videos but just cannot encode them.
With log messages like, "Failure to initialise thread 'H.265/HEVC encoder (libx265)'" can I assume this is a hardware issue?

Log file is shows the following:

Code: Select all

[14:02:55] CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
[14:02:55]  - Intel microarchitecture Ivy Bridge
[14:02:55]  - logical processor count: 8
[14:02:55] Intel Quick Sync Video support: yes
[14:02:55]  - Intel Media SDK hardware: API 1.11 (minimum: 1.3)
[14:02:55]  - H.264 encoder: yes
[14:02:55]     - preferred implementation: hardware (any) via D3D11
[14:02:55]     - capabilities (hardware):  vsinfo opt1 opt2+extbrc+ib_adapt+nmpslice
[14:02:55]  - H.265 encoder: no
and...

Code: Select all

[14:02:56]    + container: MPEG-4 (libavformat)
[14:02:56]      + optimized for HTTP streaming (fast start)
[14:02:56]      + align initial A/V stream timestamps
[14:02:56]  * video track
[14:02:56]    + decoder: h264
[14:02:56]      + bitrate 3615 kbps
[14:02:56]    + filters
[14:02:56]      + 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)
[14:02:56]      + Decomb (mode=39)
[14:02:56]      + Framerate Shaper (mode=1)
[14:02:56]        + frame rate: 23.980 fps -> constant 23.980 fps
[14:02:56]    + Output geometry
[14:02:56]      + storage dimensions: 1280 x 720
[14:02:56]      + pixel aspect ratio: 1 : 1
[14:02:56]      + display dimensions: 1280 x 720
[14:02:56]    + encoder: H.265 (libx265)
[14:02:56]      + preset:  placebo
[14:02:56]      + profile: main
[14:02:56]      + level:   3.0
[14:02:56]      + quality: 23.00 (RF)
[14:02:56]      + color profile: 1-1-1
[14:02:56]  * audio track 1
[14:02:56]    + decoder: Unknown (AAC LC) (2.0 ch) (130 kbps) (track 1, id 0x1)
[14:02:56]      + bitrate: 130 kbps, samplerate: 44100 Hz
[14:02:56]    + mixdown: Stereo
[14:02:56]    + dither: none
[14:02:56]    + encoder: AAC (libavcodec)
[14:02:56]      + bitrate: 160 kbps, samplerate: 44100 Hz
[14:02:56] sync: expecting 62190 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 SSSE3 SSE4.2 AVX
x265 [error]: picture dimensions are out of range for specified level
encx265: x265_encoder_open failed.
Failure to initialise thread 'H.265/HEVC encoder (libx265)'
[14:02:56] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[14:02:56] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[14:02:56] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[14:02:56] vfr: lost time: 0 (0 frames)
[14:02:56] vfr: gained time: 0 (0 frames) (0 not accounted for)
[14:02:56] aac-decoder done: 0 frames, 0 decoder errors
[14:02:56] h264-decoder done: 0 frames, 0 decoder errors
[14:02:56] sync: got 0 frames, 62190 expected
[14:02:56] Finished work at: Wed May 06 14:02:56 2020
[14:02:56] libhb: work result = 3

# Encode Completed ...
HandBrake version 1.3.2 (2020050300)
Windows 7
Deleted User 11865

Re: Can play H.265 but can't encode H.265

Post by Deleted User 11865 »

Thanks for the log. The error is:

Code: Select all

x265 [error]: picture dimensions are out of range for specified level
encx265: x265_encoder_open failed.
Failure to initialise thread 'H.265/HEVC encoder (libx265)'
See e.g. https://en.wikipedia.org/wiki/High_Effi ... and_levels or leave the encoder level to Auto.
DAfshar
Posts: 7
Joined: Thu May 07, 2020 12:41 pm

Re: Can play H.265 but can't encode H.265

Post by DAfshar »

Thx, Rodeo. Will give it another try. Glad to know it's not a hardware issue, then.
DAfshar
Posts: 7
Joined: Thu May 07, 2020 12:41 pm

Re: Can play H.265 but can't encode H.265

Post by DAfshar »

Yeah, no luck. Still getting a white screen with perfect audio. :( :(

2 things stand out to me in the log file (excerpts below):
  • [14:31:32] - H.265 encoder: no
  • x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
First, it says I don't have an H.265 encoder and then it lists a specific H.265 encoder. :?:

I apologize for the amateur nature of my post but would love to find a definitive answer to why this is failing every time.
Is my onboard video the issue here?

Code: Select all

},
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "medium",
    "Profile": "auto",
    "Quality": 22.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[14:31:32] CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
[14:31:32]  - Intel microarchitecture Ivy Bridge
[14:31:32]  - logical processor count: 8
[14:31:32] Intel Quick Sync Video support: yes
[14:31:32]  - Intel Media SDK hardware: API 1.11 (minimum: 1.3)
[14:31:32]  - H.264 encoder: yes
[14:31:32]     - preferred implementation: hardware (any) via D3D11
[14:31:32]     - capabilities (hardware):  vsinfo opt1 opt2+extbrc+ib_adapt+nmpslice
[14:31:32]  - H.265 encoder: no
and...

Code: Select all

[14:31:32] job configuration:
[14:31:32]  * source

[14:31:32]    + title 1, chapter(s) 1 to 1
[14:31:32]    + container: mov,mp4,m4a,3gp,3g2,mj2
[14:31:32]    + data rate: 3728 kbps
[14:31:32]  * destination

[14:31:32]    + container: MPEG-4 (libavformat)
[14:31:32]      + optimized for HTTP streaming (fast start)
[14:31:32]      + align initial A/V stream timestamps
[14:31:32]  * video track
[14:31:32]    + decoder: h264
[14:31:32]      + bitrate 3594 kbps
[14:31:32]    + filters
[14:31:32]      + 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)
[14:31:32]      + Decomb (mode=39)
[14:31:32]    + Output geometry
[14:31:32]      + storage dimensions: 1280 x 720
[14:31:32]      + pixel aspect ratio: 1 : 1
[14:31:32]      + display dimensions: 1280 x 720
[14:31:32]    + encoder: H.265 (libx265)
[14:31:32]      + preset:  medium
[14:31:32]      + profile: auto
[14:31:32]      + level:   auto
[14:31:32]      + quality: 22.00 (RF)
[14:31:32]      + color profile: 1-1-1
[14:31:32]  * audio track 1
[14:31:32]    + decoder: Unknown (AAC LC) (2.0 ch) (130 kbps) (track 1, id 0x1)
[14:31:32]      + bitrate: 130 kbps, samplerate: 44100 Hz
[14:31:32]    + mixdown: Stereo
[14:31:32]    + dither: none
[14:31:32]    + encoder: AAC (libavcodec)
[14:31:32]      + bitrate: 160 kbps, samplerate: 44100 Hz
[14:31:32] sync: expecting 32531 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 SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-3.1 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(12 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: 24 / 240 / 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-22.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip signhide tmvp b-intra
x265 [info]: tools: strong-intra-smoothing lslices=4 deblock sao
[14:31:32] sync: first pts video is 0
[14:31:32] sync: "Chapter 1" (1) at frame 1 time 0
[14:31:32] sync: first pts audio 0x1 is 0
[14:52:16] reader: done. 1 scr changes
[14:52:20] work: average encoding speed for job is 26.091743 fps
[14:52:20] comb detect: heavy 9 | light 128 | uncombed 32392 | total 32529
[14:52:20] decomb: deinterlaced 9 | blended 128 | unfiltered 32392 | total 32529
[14:52:20] aac-decoder done: 58424 frames, 0 decoder errors
[14:52:20] h264-decoder done: 32529 frames, 0 decoder errors
[14:52:20] sync: got 32529 frames, 32531 expected
[14:52:20] sync: framerate min 23.980 fps, max 23.980 fps, avg 23.980 fps
x265 [info]: frame I:    262, Avg QP:18.86  kb/s: 11078.13
x265 [info]: frame P:   9571, Avg QP:20.91  kb/s: 3337.46
x265 [info]: frame B:  22696, Avg QP:27.86  kb/s: 487.16
x265 [info]: Weighted P-Frames: Y:1.3% UV:1.0%
x265 [info]: consecutive B-frames: 19.1% 3.4% 14.9% 52.8% 9.8%
encoded 32529 frames in 1247.73s (26.07 fps), 1411.11 kb/s, Avg QP:25.75
[14:52:20] mux: track 0, 32529 frames, 239401567 bytes, 1411.74 kbps, fifo 2048
[14:52:20] mux: track 1, 58425 frames, 27250633 bytes, 160.70 kbps, fifo 4096
[14:52:20] Finished work at: Fri May 08 14:52:20 2020
[14:52:20] libhb: work result = 0

# Encode Completed ...
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Can play H.265 but can't encode H.265

Post by BradleyS »

The first one is indicating your machine doesn't have the Intel QSV hardware encoder. The selected encoder is a software encoder included with HandBrake.

Anyway, it looks like the latest encode worked fine?
DAfshar
Posts: 7
Joined: Thu May 07, 2020 12:41 pm

Re: Can play H.265 but can't encode H.265

Post by DAfshar »

Hey Bradley, no, unfortunately I am still getting a white screen (no video). I will keep trying different settings and see what happens.
Deleted User 11865

Re: Can play H.265 but can't encode H.265

Post by Deleted User 11865 »

What are you using to play HandBrake's output?
DAfshar
Posts: 7
Joined: Thu May 07, 2020 12:41 pm

Re: Can play H.265 but can't encode H.265

Post by DAfshar »

VLC Player is my default media player.
Deleted User 11865

Re: Can play H.265 but can't encode H.265

Post by Deleted User 11865 »

That's quite weird. What version do you have installed (e.g. from the "About" dialog)?
DAfshar
Posts: 7
Joined: Thu May 07, 2020 12:41 pm

Re: Can play H.265 but can't encode H.265

Post by DAfshar »

I always have the latest versions installed.
3.0.10 Vetinari

Thx for the feedback, though.
Will try and find some setting that works.
Deleted User 11865

Re: Can play H.265 but can't encode H.265

Post by Deleted User 11865 »

Does it work in VLC if you disable hardware-accelerated decoding?

https://wiki.videolan.org/VLC_HowTo/Har ... eleration/
DAfshar
Posts: 7
Joined: Thu May 07, 2020 12:41 pm

Re: Can play H.265 but can't encode H.265

Post by DAfshar »

Hi Rodeo,

Thanks for the consistent and quick replies. Much appreciated.
I don't have playing H.265 files in VLC generally, only the ones I am encoding.
Interestingly enough, if I disable hardware encoding entirely, I am unable to play H.264 m4v files in VLC either.

Thanks for all the help.
Will keep playing around with it and will update here accordingly.
Post Reply