How to increase the keyframe rate in x265 10 bit

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
vince_67
Posts: 7
Joined: Wed Feb 26, 2020 12:08 pm

How to increase the keyframe rate in x265 10 bit

Post by vince_67 »

Description of problem or question:
I am trying to increase the number of keyframes (I-frames) when encoding with H.265 10-bit. I would like to obtain about 1 keyframe per second (because I use AVIDEMUX to cut my videos and it uses I-frames to identify starting and ending points for cutting).

I tried to encode a brief test avi video with a simple mp4 x265 10 bit configuration.
Without any extra-options in the Advanced Options, the output video shows a keyframe about every 10 seconds. MediaInfo indicates the following info in the output video: / min-keyint=25 / keyint=250 /

Then, I repeated the same encoding but adding this in the Advanced Options:
keyint=10

However, the output showed the same results: about a keyframe every ten seconds and / min-keyint=25 / keyint=250 / as video info by MediaInfo.

It seems to me that adding keyint=10 does not produce any change in the number of keyframes of the output.

Thank you very much for your suggestions!


Steps to reproduce the problem (If Applicable):
N.A.



HandBrake version (e.g., 1.0.0):
1.3.1 (2020010400)



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



HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.3.1 (2020010400)
OS: Microsoft Windows NT 10.0.18362.0
CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Ram: 16268 MB, 
GPU Information:
  Intel(R) HD Graphics 630 - 24.20.100.6286
  NVIDIA GeForce GTX 1050 - 24.21.13.9924
Screen: 1920x1080
Temp Dir: C:\Users\Vincenzo\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Vincenzo\AppData\Roaming\HandBrake

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


# Starting Encode ...

[12:35:33] base preset: Mp4 h265 10bit RF18 AAC256 medium (Modified)
[12:35:33] hb_init: starting libhb thread
[12:35:33] Starting work at: Wed Feb 26 12:35:33 2020
[12:35:33] 1 job(s) to process
[12:35:33] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 256,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "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": [],
    "ChapterMarkers": false,
    "AlignAVStart": false,
    "File": "D:\\Damiolini_01\\Scene0001-1.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": true
    },
    "Mux": "mp4"
  },
  "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": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "576",
          "width": "720"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 16,
    "Den": 15
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\Damiolini_01\\scene0001.avi"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265_10bit",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": " keyint=10",
    "Preset": "slow",
    "Profile": "auto",
    "Quality": 18.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[12:35:33] CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
[12:35:33]  - Intel microarchitecture Kaby Lake
[12:35:33]  - logical processor count: 8
[12:35:33] Intel Quick Sync Video support: yes
[12:35:33]  - Intel Media SDK hardware: API 1.27 (minimum: 1.3)
[12:35:33]  - H.264 encoder: yes
[12:35:33]     - preferred implementation: hardware (any) via D3D11
[12:35:33]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[12:35:33]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[12:35:33]     - preferred implementation: hardware (any) via D3D11
[12:35:33]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[12:35:33] hb_scan: path=D:\Damiolini_01\scene0001.avi, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\Damiolini_01\scene0001.avi
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(D:\Damiolini_01\scene0001.avi\) failed
[12:35:33] 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
[12:35:33] dvd: not a dvd - trying as a stream/file instead
Input #0, avi, from 'D:\Damiolini_01\scene0001.avi':
  Metadata:
    TAPE            : sclive
    TCOD            : 1600000
    TCDO            : 5722400000
    VMAJ            : 4
    VMIN            : 0
    CMNT            :
    RATE            :
    STAT            : 0 0 3500.000000 1
    DTIM            : 27111911 922937344
  Duration: 00:09:32.12, start: 0.000000, bitrate: 29916 kb/s
    Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28802 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz, 2 channels, s16, 1024 kb/s
[12:35:34] scan: decoding previews for title 1
[12:35:34] scan: audio 0x1: pcm_s16le, rate=32000Hz, bitrate=1024000 Unknown (pcm_s16le) (2.0 ch) (1024 kbps)
[12:35:34] scan: 10 previews, 720x576, 25.000 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 16:15
[12:35:34] libhb: scan thread found 1 valid title(s)
[12:35:34] Starting Task: Encoding Pass
[12:35:34] Skipping vfr filter
[12:35:34] Skipping crop/scale filter
[12:35:34] job configuration:
[12:35:34]  * source
[12:35:34]    + D:\Damiolini_01\scene0001.avi
[12:35:34]    + title 1, chapter(s) 1 to 1
[12:35:34]    + container: avi
[12:35:34]    + data rate: 29916 kbps
[12:35:34]  * destination
[12:35:34]    + D:\Damiolini_01\Scene0001-1.mp4
[12:35:34]    + container: MPEG-4 (libavformat)
[12:35:34]      + optimized for HTTP streaming (fast start)
[12:35:34]  * video track
[12:35:34]    + decoder: dvvideo
[12:35:34]      + bitrate 28802 kbps
[12:35:34]    + filters
[12:35:34]      + 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)
[12:35:34]      + Decomb (mode=39)
[12:35:34]    + Output geometry
[12:35:34]      + storage dimensions: 720 x 576
[12:35:34]      + pixel aspect ratio: 16 : 15
[12:35:34]      + display dimensions: 768 x 576
[12:35:34]    + encoder: H.265 10-bit (libx265)
[12:35:34]      + preset:  slow
[12:35:34]      + options:  keyint=10
[12:35:34]      + profile: auto
[12:35:34]      + level:   auto
[12:35:34]      + quality: 18.00 (RF)
[12:35:34]      + color profile: 5-1-6
[12:35:34]  * audio track 1
[12:35:34]    + decoder: Unknown (pcm_s16le) (2.0 ch) (1024 kbps) (track 1, id 0x1)
[12:35:34]      + bitrate: 1024 kbps, samplerate: 32000 Hz
[12:35:34]    + mixdown: Stereo
[12:35:34]    + dither: none
[12:35:34]    + encoder: AAC (libavcodec)
[12:35:34]      + bitrate: 256 kbps, samplerate: 32000 Hz
[12:35:34] sync: expecting 14303 video frames
[12:35:34] encx265: unknown option ' keyint'
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(9 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
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         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip signhide tmvp strong-intra-smoothing deblock sao
[12:35:34] sync: first pts video is 0
[12:35:34] sync: Chapter 1 at frame 1 time 0
[12:35:34] sync: first pts audio 0x1 is 0
[dvvideo @ 000002b44bd66600] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[dvvideo @ 000002b44bd66ac0] Concealing bitstream errors
[13:04:07] reader: done. 1 scr changes
[13:04:21] work: average encoding speed for job is 8.314306 fps
[13:04:21] comb detect: heavy 13097 | light 879 | uncombed 327 | total 14303
[13:04:21] decomb: deinterlaced 13097 | blended 879 | unfiltered 327 | total 14303
[13:04:21] pcm_s16le-decoder done: 18308 frames, 0 decoder errors
[13:04:21] dvvideo-decoder done: 14303 frames, 0 decoder errors
[13:04:21] sync: got 14303 frames, 14303 expected
[13:04:21] sync: framerate min 25.000 fps, max 25.000 fps, avg 25.000 fps
x265 [info]: frame I:     59, Avg QP:17.40  kb/s: 11932.48
x265 [info]: frame P:   2848, Avg QP:18.43  kb/s: 10460.14
x265 [info]: frame B:  11396, Avg QP:23.50  kb/s: 3586.78
x265 [info]: Weighted P-Frames: Y:15.6% UV:12.4%
x265 [info]: consecutive B-frames: 0.1% 0.1% 1.3% 4.7% 93.8%
encoded 14303 frames in 1727.66s (8.28 fps), 4989.82 kb/s, Avg QP:22.47
[13:04:22] mux: track 0, 14303 frames, 356904390 bytes, 4990.27 kbps, fifo 512
[13:04:22] mux: track 1, 17879 frames, 18355021 bytes, 256.64 kbps, fifo 1024
[13:04:22] Finished work at: Wed Feb 26 13:04:22 2020
[13:04:22] libhb: work result = 0

# Encode Completed ...



User avatar
Rodeo
HandBrake Team
Posts: 12400
Joined: Tue Mar 03, 2009 8:55 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by Rodeo »

vince_67 wrote:
Wed Feb 26, 2020 12:58 pm

Code: Select all

[12:35:34] encx265: unknown option ' keyint'
Leading whitespace.

vince_67
Posts: 7
Joined: Wed Feb 26, 2020 12:08 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by vince_67 »

Dear Rodeo,
thank you very much for your answer.

The leading space at the beginning of the instruction is unmistakably an error that can explain such output result. But I am quite sure that I copied and pasted that instruction from a word file where I annotated my “experiments” and there the leading space is not present.

Anyway, I tried the “experiment” again. When the “Advanced Options” is empty, the encoding works very well. When I type in (not copy and paste) the instruction “keyint=10”, then Handbrake stops after a few seconds and exit.
The only sentences that I can find in the activity log are:

[16:03:52] Compile-time hardening features are enabled
[16:03:52] Nvenc version 8.1
[16:03:52] NVENC version not supported. Disabling feature.

Maybe could this depend on the source video? It is an AVI file captured from an old mini-DV.
Thank you very much

User avatar
Rodeo
HandBrake Team
Posts: 12400
Joined: Tue Mar 03, 2009 8:55 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by Rodeo »

Did you relaunch HandBrake before grabbing the log?

musicvid
Veteran User
Posts: 3455
Joined: Sat Jun 27, 2009 1:19 am

Re: How to increase the keyframe rate in x265 10 bit

Post by musicvid »

VideoRedo is far more powerful than AVIDemux. It will insert an IDR frame where ever you make a cut or split.

vince_67
Posts: 7
Joined: Wed Feb 26, 2020 12:08 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by vince_67 »

Rodeo wrote:
Wed Feb 26, 2020 11:03 pm
Did you relaunch HandBrake before grabbing the log?
Yes, I did.
I also tried to reinstall Handbrake but the encoding with “keyint=” instruction stopped the same.
I did several new experiments:
1) I tried to encode different kind of source videos with both H.265 and H.265 10 bit codecs. In every case the encoding crashed, when the instruction keyint=XXX was included (I tried also to change the number XXX, eg. 10, 20). It worked without “keyint”.
2) The encoding worked perfectly with H.264 codec and keyint=XXX in Advanced Options.
Therefore, I am quite sure that the encoding with H.265 codec and “keyint” instruction in Advanced Options does not work (at least in my PC).
To me there are three possible conclusions:
Maybe, it is a problem depending on the configuration of my PC.
Maybe it is a bug.
Alternatively, the instruction “keyint” is not supported in the H.265 encoder.

vince_67
Posts: 7
Joined: Wed Feb 26, 2020 12:08 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by vince_67 »

musicvid wrote:
Thu Feb 27, 2020 12:06 am
VideoRedo is far more powerful than AVIDemux. It will insert an IDR frame where ever you make a cut or split.
Thank you very much, I will give it a try.
But it seems that VideoRedo does not support H.265 10bit (only 8bit).

User avatar
Rodeo
HandBrake Team
Posts: 12400
Joined: Tue Mar 03, 2009 8:55 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by Rodeo »

vince_67 wrote:
Thu Feb 27, 2020 12:18 pm
Rodeo wrote:
Wed Feb 26, 2020 11:03 pm
Did you relaunch HandBrake before grabbing the log?
Yes, I did.
That's why there's nothing useful in it. Do NOT relaunch HandBrake after it crashes, and grab the log from disk.

https://handbrake.fr/docs/en/latest/hel ... y-log.html (look for "Activity Logs on Windows")

vince_67
Posts: 7
Joined: Wed Feb 26, 2020 12:08 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by vince_67 »

OK, sorry for the error and thank you for your help.
I ran it again. This is the log:

Code: Select all

HandBrake 1.3.1 (2020010400)
OS: Microsoft Windows NT 10.0.18362.0
CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Ram: 16268 MB, 
GPU Information:
  Intel(R) HD Graphics 630 - 24.20.100.6286
  NVIDIA GeForce GTX 1050 - 24.21.13.9924
Screen: 1920x1080
Temp Dir: C:\Users\Vincenzo\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Vincenzo\AppData\Roaming\HandBrake

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


# Starting Encode ...

[07:13:20] base preset: Mp4 h265 10bit RF18 aac256 slow (Modified)
[19:13:20] hb_init: starting libhb thread
[19:13:20] Starting work at: Fri Feb 28 19:13:20 2020
[19:13:20] 1 job(s) to process
[19:13:20] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 256,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "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": [],
    "ChapterMarkers": false,
    "AlignAVStart": false,
    "File": "D:\\Personal\\DV\\44 (h265 10bit FR18 aac256)\\Scene0001-1(3).mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": true
    },
    "Mux": "mp4"
  },
  "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": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "576",
          "width": "720"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 16,
    "Den": 15
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\Damiolini_01\\scene0001.avi"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265_10bit",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "keyint=20",
    "Preset": "slow",
    "Profile": "auto",
    "Quality": 18.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[19:13:20] CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
[19:13:20]  - Intel microarchitecture Kaby Lake
[19:13:20]  - logical processor count: 8
[19:13:20] Intel Quick Sync Video support: yes
[19:13:20]  - Intel Media SDK hardware: API 1.27 (minimum: 1.3)
[19:13:20]  - H.264 encoder: yes
[19:13:20]     - preferred implementation: hardware (any) via D3D11
[19:13:20]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[19:13:20]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[19:13:20]     - preferred implementation: hardware (any) via D3D11
[19:13:20]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[19:13:20] hb_scan: path=D:\Damiolini_01\scene0001.avi, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\Damiolini_01\scene0001.avi
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(D:\Damiolini_01\scene0001.avi\) failed
[19:13:20] 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
[19:13:20] dvd: not a dvd - trying as a stream/file instead
Input #0, avi, from 'D:\Damiolini_01\scene0001.avi':
  Metadata:
    TAPE            : sclive
    TCOD            : 1600000
    TCDO            : 5722400000
    VMAJ            : 4
    VMIN            : 0
    CMNT            :
    RATE            :
    STAT            : 0 0 3500.000000 1
    DTIM            : 27111911 922937344
  Duration: 00:09:32.12, start: 0.000000, bitrate: 29916 kb/s
    Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28802 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz, 2 channels, s16, 1024 kb/s
[19:13:20] scan: decoding previews for title 1
[19:13:21] scan: audio 0x1: pcm_s16le, rate=32000Hz, bitrate=1024000 Unknown (pcm_s16le) (2.0 ch) (1024 kbps)
[19:13:21] scan: 10 previews, 720x576, 25.000 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 16:15
[19:13:21] libhb: scan thread found 1 valid title(s)
[19:13:21] Starting Task: Encoding Pass
[19:13:21] Skipping vfr filter
[19:13:21] Skipping crop/scale filter
[19:13:21] job configuration:
[19:13:21]  * source
[19:13:21]    + D:\Damiolini_01\scene0001.avi
[19:13:21]    + title 1, chapter(s) 1 to 1
[19:13:21]    + container: avi
[19:13:21]    + data rate: 29916 kbps
[19:13:21]  * destination
[19:13:21]    + D:\Personal\DV\44 (h265 10bit FR18 aac256)\Scene0001-1(3).mp4
[19:13:21]    + container: MPEG-4 (libavformat)
[19:13:21]      + optimized for HTTP streaming (fast start)
[19:13:21]  * video track
[19:13:21]    + decoder: dvvideo
[19:13:21]      + bitrate 28802 kbps
[19:13:21]    + filters
[19:13:21]      + 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)
[19:13:21]      + Decomb (mode=39)
[19:13:21]    + Output geometry
[19:13:21]      + storage dimensions: 720 x 576
[19:13:21]      + pixel aspect ratio: 16 : 15
[19:13:21]      + display dimensions: 768 x 576
[19:13:21]    + encoder: H.265 10-bit (libx265)
[19:13:21]      + preset:  slow
[19:13:21]      + options: keyint=20
[19:13:21]      + profile: auto
[19:13:21]      + level:   auto
[19:13:21]      + quality: 18.00 (RF)
[19:13:21]      + color profile: 5-1-6
[19:13:21]  * audio track 1
[19:13:21]    + decoder: Unknown (pcm_s16le) (2.0 ch) (1024 kbps) (track 1, id 0x1)
[19:13:21]      + bitrate: 1024 kbps, samplerate: 32000 Hz
[19:13:21]    + mixdown: Stereo
[19:13:21]    + dither: none
[19:13:21]    + encoder: AAC (libavcodec)
[19:13:21]      + bitrate: 256 kbps, samplerate: 32000 Hz
[19:13:21] sync: expecting 14303 video frames
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(9 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
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         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 20 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip signhide tmvp strong-intra-smoothing deblock sao
[19:13:22] sync: first pts video is 0
[19:13:22] sync: Chapter 1 at frame 1 time 0
[19:13:22] sync: first pts audio 0x1 is 0

mduell
Veteran User
Posts: 6933
Joined: Sat Apr 21, 2007 8:54 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by mduell »

Code: Select all

x265 [info]: Keyframe min / max / scenecut / bias: 25 / 20 / 40 / 5.00
It worked as configured, although having min>max is going to have to get resolved somehow in the code.

vince_67
Posts: 7
Joined: Wed Feb 26, 2020 12:08 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by vince_67 »

mduell wrote:
Fri Feb 28, 2020 6:42 pm

Code: Select all

x265 [info]: Keyframe min / max / scenecut / bias: 25 / 20 / 40 / 5.00
It worked as configured, although having min>max is going to have to get resolved somehow in the code.
Thank you. No, it did not worked as configured. Handbrake crashed. But I think you are right that the issue is depending on Keyframe min (but I don't know how to lower it).
Indeed, I tried again setting keyint=25 (i.e., equal to the minimum) and it worked!

It is strange because using the option gop-pic-size=20 instead of keyint=20 (which are equivalent I suppose), Handbrake did not crash. But the resulting encoded video had not the correct keyframe.

vince_67
Posts: 7
Joined: Wed Feb 26, 2020 12:08 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by vince_67 »

SOLVED
This worked: setting up a keyint minimum lower than keyint, as suggested by mduell.
min-keyint=1:keyint=10

Thank you everyone for your help!!!

User avatar
Rodeo
HandBrake Team
Posts: 12400
Joined: Tue Mar 03, 2009 8:55 pm

Re: How to increase the keyframe rate in x265 10 bit

Post by Rodeo »

:)

Post Reply