x264 x265 CRF parameter in floating number

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
aleaksunder
Posts: 2
Joined: Tue Jan 22, 2019 8:42 am

x264 x265 CRF parameter in floating number

Post by aleaksunder »

Description of problem or question:
Hello!

Is there any way to set x264 or x265 CRF parameter in floating number, in examle CRF = 21.5 in GUI version of HandBrake ?


Steps to reproduce the problem (If Applicable):
CRF slider in application only allows to set integer values like 21 or 22 but I really need to set it to 21.5
I've tried to set parameter on "Video" tab in "Extra Options" with syntax: "crf=21.5" and got no error at application log, but output contains video with CRF=25 or whatever value that was set by CRF slider control


HandBrake version (e.g., 1.0.0):
1.2.0



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



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

Code: Select all

HandBrake 1.2.0 (2019012100)
OS: Microsoft Windows NT 10.0.17763.0
Ram: 8095 MB, 
GPU Information:
  Intel(R) HD Graphics 3000 - 9.17.10.4459
Screen: 1920x1080
Temp Dir: C:\Users\A\AppData\Local\Temp\
Install Dir: D:\project\xconvert\worktop\Handbrake\program\modified\gui
Data Dir: C:\Users\A\AppData\Roaming\HandBrake

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


# Starting Encode ...

[16:49:52] hb_init: starting libhb thread
[16:49:52] 1 job(s) to process
[16:49:52] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "fdk_haac"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": true,
    "File": "D:\\project\\xconvert\\worktop\\export\\video\\x265\\21point5.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": true
    },
    "Mux": "mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "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": "time",
      "Start": 0,
      "End": 900000
    },
    "Title": 3,
    "Path": "D:\\project\\xconvert\\library\\video\\source\\bluray"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "crf=21.5",
    "Preset": "ultrafast",
    "Profile": "main",
    "Quality": 25.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[16:49:52] CPU: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz
[16:49:52]  - Intel microarchitecture Sandy Bridge
[16:49:52]  - logical processor count: 4
[16:49:52] Intel Quick Sync Video support: no
[16:49:52] hb_scan: path=D:\project\xconvert\library\video\source\bluray, title_index=3
src/libbluray/bdj/bdj.c:549: libbluray-j2se-1.0.2.jar not found.
src/libbluray/bdj/bdj.c:695: BD-J check: Failed to load libbluray.jar
src/libbluray/bdj/bdj.c:549: libbluray-j2se-1.0.2.jar not found.
src/libbluray/bdj/bdj.c:695: BD-J check: Failed to load libbluray.jar
[16:49:55] scan: BD has 226 title(s)
[16:49:55] bd: scanning title 3
[16:49:55] bd: playlist 00003.MPLS
[16:49:55] bd: duration is 02:58:09 (10689470 ms)
[16:49:55] bd: video id=0x1011, stream type=H.264, format 1080p
[16:49:55] bd: aspect = 16:9
[16:49:55] bd: audio id=0x711100, lang=English (DTS), 3cc=eng
[16:49:55] bd: audio id=0x1100, lang=English (DTS-HD MA), 3cc=eng
[16:49:55] bd: audio id=0x1101, lang=English (AC3), 3cc=eng
[16:49:55] bd: audio id=0x1102, lang=Portugues (AC3), 3cc=por
[16:49:55] bd: audio id=0x1103, lang=espanol (AC3), 3cc=spa
[16:49:55] bd: audio id=0x1104, lang=русский (DTS), 3cc=rus
[16:49:55] bd: audio id=0x1105, lang=??? (DTS), 3cc=jpn
[16:49:55] bd: subtitle id=0x1200, lang=??? [PGS], 3cc=jpn
[16:49:55] bd: subtitle id=0x1201, lang=English [PGS], 3cc=eng
[16:49:55] bd: subtitle id=0x1202, lang=Portugues [PGS], 3cc=por
[16:49:55] bd: subtitle id=0x1203, lang=espanol [PGS], 3cc=spa
[16:49:55] bd: subtitle id=0x1204, lang=русский [PGS], 3cc=rus
[16:49:55] bd: subtitle id=0x1205, lang=?? [PGS], 3cc=zho
[16:49:55] bd: subtitle id=0x1206, lang=??? [PGS], 3cc=kor
[16:49:55] bd: subtitle id=0x1207, lang=??? [PGS], 3cc=tha
[16:49:55] bd: subtitle id=0x1208, lang=espanol [PGS], 3cc=spa
[16:49:55] bd: subtitle id=0x1209, lang=??? [PGS], 3cc=jpn
[16:49:55] bd: chap 1 packet=768, 325575 ms
[16:49:55] bd: chap 2 packet=1294795968, 286703 ms
[16:49:55] bd: chap 3 packet=2491621824, 12178 ms
[16:49:55] bd: chap 4 packet=2536090368, 12846 ms
[16:49:55] bd: chap 5 packet=2577164928, 70612 ms
[16:49:55] bd: chap 6 packet=2789067648, 251292 ms
[16:49:55] bd: chap 7 packet=3628889280, 115573 ms
[16:49:55] bd: chap 8 packet=4048962624, 360109 ms
[16:49:55] bd: chap 9 packet=5445482496, 239656 ms
[16:49:55] bd: chap 10 packet=6271610112, 8008 ms
[16:49:55] bd: chap 11 packet=6314114688, 42667 ms
[16:49:55] bd: chap 12 packet=6515979072, 88797 ms
[16:49:55] bd: chap 13 packet=6944355264, 13596 ms
[16:49:55] bd: chap 14 packet=6995838720, 96846 ms
[16:49:55] bd: chap 15 packet=7440676032, 23440 ms
[16:49:55] bd: chap 16 packet=7532667648, 288621 ms
[16:49:55] bd: chap 17 packet=8981426880, 111528 ms
[16:49:55] bd: chap 18 packet=9456874176, 130421 ms
[16:49:55] bd: chap 19 packet=10087312704, 384842 ms
[16:49:55] bd: chap 20 packet=11557322496, 25859 ms
[16:49:55] bd: chap 21 packet=11696818752, 67734 ms
[16:49:55] bd: chap 22 packet=11960524416, 228102 ms
[16:49:55] bd: chap 23 packet=12744365376, 76993 ms
[16:49:55] bd: chap 24 packet=13006886976, 80205 ms
[16:49:55] bd: chap 25 packet=13275322752, 121830 ms
[16:49:55] bd: chap 26 packet=13717091712, 48006 ms
[16:49:55] bd: chap 27 packet=13880746752, 157365 ms
[16:49:55] bd: chap 28 packet=14519734272, 120203 ms
[16:49:55] bd: chap 29 packet=14979595584, 47589 ms
[16:49:55] bd: chap 30 packet=15197442816, 186019 ms
[16:49:55] bd: chap 31 packet=15977814912, 157407 ms
[16:49:55] bd: chap 32 packet=16643757120, 129587 ms
[16:49:55] bd: chap 33 packet=17185804800, 208666 ms
[16:49:55] bd: chap 34 packet=17816526528, 34909 ms
[16:49:55] bd: chap 35 packet=17952240384, 98431 ms
[16:49:55] bd: chap 36 packet=18288157056, 35660 ms
[16:49:55] bd: chap 37 packet=18459244800, 270228 ms
[16:49:55] bd: chap 38 packet=19669696320, 201367 ms
[16:49:55] bd: chap 39 packet=20389221120, 13221 ms
[16:49:55] bd: chap 40 packet=20440802496, 89589 ms
[16:49:55] bd: chap 41 packet=20927380800, 12137 ms
[16:49:55] bd: chap 42 packet=20995508736, 305972 ms
[16:49:55] bd: chap 43 packet=22157559936, 183016 ms
[16:49:55] bd: chap 44 packet=22840089408, 93218 ms
[16:49:55] bd: chap 45 packet=23180202816, 250 ms
[16:49:55] bd: chap 46 packet=23180410176, 398397 ms
[16:49:55] bd: chap 47 packet=24897563712, 153945 ms
[16:49:55] bd: chap 48 packet=25349187840, 84793 ms
[16:49:55] bd: chap 49 packet=25668724224, 44169 ms
[16:49:55] bd: chap 50 packet=25806041856, 64397 ms
[16:49:55] bd: chap 51 packet=26023685376, 110985 ms
[16:49:55] bd: chap 52 packet=26427515712, 397313 ms
[16:49:55] bd: chap 53 packet=28396792320, 222388 ms
[16:49:55] bd: chap 54 packet=29345544192, 338379 ms
[16:49:55] bd: chap 55 packet=30735003456, 98890 ms
[16:49:55] bd: chap 56 packet=31146728448, 186060 ms
[16:49:55] bd: chap 57 packet=31893401664, 206748 ms
[16:49:55] bd: chap 58 packet=32577073152, 208291 ms
[16:49:55] bd: chap 59 packet=33472265856, 267976 ms
[16:49:55] bd: chap 60 packet=34354510464, 365448 ms
[16:49:55] bd: chap 61 packet=36143343936, 128211 ms
[16:49:55] bd: chap 62 packet=36810157248, 45920 ms
[16:49:55] bd: chap 63 packet=37042721664, 57640 ms
[16:49:55] bd: chap 64 packet=37275385344, 56056 ms
[16:49:55] bd: chap 65 packet=37545738624, 22313 ms
[16:49:55] bd: chap 66 packet=37658309376, 287036 ms
[16:49:55] bd: chap 67 packet=39150438912, 43626 ms
[16:49:55] bd: chap 68 packet=39383841408, 18101 ms
[16:49:55] bd: chap 69 packet=39479798400, 269227 ms
[16:49:55] bd: chap 70 packet=40839232512, 57599 ms
[16:49:55] bd: chap 71 packet=41096959872, 17684 ms
[16:49:55] bd: chap 72 packet=41165817024, 128294 ms
[16:49:55] bd: chap 73 packet=41744428992, 14931 ms
[16:49:55] bd: chap 74 packet=41806340160, 140348 ms
[16:49:55] bd: chap 75 packet=42380120640, 397396 ms
[16:49:55] bd: title 3 has 75 chapters
[16:49:55] scan: decoding previews for title 3
[16:49:55] scan: title angle(s) 1
[16:49:56] scan: audio 0x711100: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
[16:49:56] scan: audio 0x1100: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[16:49:56] scan: audio 0x1104: dca, rate=48000Hz, bitrate=768000 русский (DTS) (5.1 ch)
[16:49:56] scan: audio 0x1105: dca, rate=48000Hz, bitrate=768000 ??? (DTS) (5.1 ch)
[16:49:57] scan: audio 0x1101: ac3, rate=48000Hz, bitrate=224000 English (AC3) (2.0 ch) (Dolby Surround)
[16:49:57] scan: audio 0x1102: ac3, rate=48000Hz, bitrate=448000 Portugues (AC3) (5.1 ch)
[16:49:57] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=448000 espanol (AC3) (5.1 ch)
[16:50:03] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 2/0/2/2, aspect 16:9, PAR 1:1
[16:50:03] scan: supported video decoders: avcodec qsv
[16:50:03] stream: 5 good frames, 0 errors (0%)
[16:50:03] libhb: scan thread found 1 valid title(s)
[16:50:03] starting job
[16:50:03] job configuration:
[16:50:03]  * source
[16:50:03]    + D:\project\xconvert\library\video\source\bluray
[16:50:03]    + title 3, start 00:00:0.00 stop 00:00:10.00
[16:50:03]  * destination
[16:50:03]    + D:\project\xconvert\worktop\export\video\x265\21point5.mp4
[16:50:03]    + container: MPEG-4 (libavformat)
[16:50:03]      + optimized for HTTP streaming (fast start)
[16:50:03]      + align initial A/V stream timestamps
[16:50:03]  * video track
[16:50:03]    + decoder: h264
[16:50:03]      + bitrate 200 kbps
[16:50:03]    + filters
[16:50:03]      + Framerate Shaper (mode=1)
[16:50:03]        + frame rate: 23.976 fps -> constant 23.976 fps
[16:50:03]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[16:50:03]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[16:50:03]    + Output geometry
[16:50:03]      + storage dimensions: 1920 x 1080
[16:50:03]      + pixel aspect ratio: 1 : 1
[16:50:03]      + display dimensions: 1920 x 1080
[16:50:03]    + encoder: H.265 (libx265)
[16:50:03]      + preset:  ultrafast
[16:50:03]      + options: crf=21.5
[16:50:03]      + profile: main
[16:50:03]      + quality: 25.00 (RF)
[16:50:03]      + color profile: 1-1-1
src/libbluray/bdj/bdj.c:549: libbluray-j2se-1.0.2.jar not found.
src/libbluray/bdj/bdj.c:695: BD-J check: Failed to load libbluray.jar
src/libbluray/bdj/bdj.c:549: libbluray-j2se-1.0.2.jar not found.
src/libbluray/bdj/bdj.c:695: BD-J check: Failed to load libbluray.jar
[16:50:04] sync: expecting 263 video frames
x265 [info]: HEVC encoder version 2.9
x265 [info]: build info [Windows][GCC 7.3.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 24 / 240 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-25.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
[16:50:04] sync: first pts video is 0
[16:50:04] sync: "Chapter 1" (1) at frame 1 time 0

[16:50:28] sync: reached video pts 900900, exiting early
[16:50:33] work: average encoding speed for job is 9.955430 fps
[16:50:33] vfr: 240 frames output, 0 dropped and 0 duped for CFR/PFR
[16:50:33] vfr: lost time: 0 (0 frames)
[16:50:33] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:50:33] stream: 344 good frames, 0 errors (0%)
[16:50:33] h264-decoder done: 338 frames, 0 decoder errors
[16:50:33] sync: got 240 frames, 263 expected
[16:50:33] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
x265 [info]: frame I:      1, Avg QP:29.97  kb/s: 111.82
x265 [info]: frame P:     61, Avg QP:29.53  kb/s: 2526.67
x265 [info]: frame B:    178, Avg QP:32.33  kb/s: 530.46
x265 [info]: consecutive B-frames: 3.2% 0.0% 3.2% 93.5%
encoded 240 frames in 29.14s (8.24 fps), 1036.09 kb/s, Avg QP:31.61
[mp4 @ 0000012571f16dc0] Starting second pass: moving the moov atom to the beginning of the file
[16:50:33] mux: track 0, 240 frames, 1297362 bytes, 1036.85 kbps, fifo 256
[16:50:33] libhb: work result = 0

# Encode Completed ...

Deleted User 11865

Re: x264 x265 CRF parameter in floating number

Post by Deleted User 11865 »

There should be an "advanced" option to set the RF slider's granularity in settings somewhere.
aleaksunder
Posts: 2
Joined: Tue Jan 22, 2019 8:42 am

Re: x264 x265 CRF parameter in floating number

Post by aleaksunder »

Thanks!

This parameter is in menu "Tools" - "Preferences" - "Advanced" tab - "x264/5 Settings" - "Constant quality fractional granularity"
Deleted User 11865

Re: x264 x265 CRF parameter in floating number

Post by Deleted User 11865 »

That's it. I don't remember the Windows interface off the top of my head, hence the vague suggestion earlier.
Post Reply