Question / Help [Local recording] Custom CRF values

Viltsu

New Member
Hi,

I ran into a problem when trying to record locally in 1080p@60 with x264.

I find quality 10 (crf 22) very inadequate for high quality local recording, so I'd like to increase the quality beyond the OBS recommendation.
When I enable Custom x264 settings and use crf="18" in the Custom x264 settings field, the encoder seems to ignore all the settings I've set and produces files with the following mediainfo:

Code:
General
Complete name                            : P:\replay buffer\Replay-2015-06-14-2221-50.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 1 013 MiB
Duration                                 : 22s 37ms
Overall bit rate                         : 386 Mbps
Encoded date                             : UTC 2015-06-14 19:21:51
Tagged date                              : UTC 2015-06-14 19:21:51
Writing application                      : Open Broadcaster Software v0.651b

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive@L4.2
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Muxing mode                              : Container profile=High@3.1
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 22s 32ms
Source duration                          : 22s 16ms
Bit rate                                 : 386 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 60.000 fps
Minimum frame rate                       : 58.824 fps
Maximum frame rate                       : 62.500 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 3.101
Stream size                              : 1 013 MiB (100%)
Source stream size                       : 1 013 MiB (100%)
Writing library                          : x264 core 146 r2538 121396c
Encoding settings                        : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=0
Encoded date                             : UTC 2015-06-14 19:21:51
Tagged date                              : UTC 2015-06-14 19:21:51
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : sYCC
Matrix coefficients                      : BT.709
mdhd_Duration                            : 22032

Audio
ID                                       : 1
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 22s 37ms
Source duration                          : 22s 16ms
Bit rate mode                            : Constant
Bit rate                                 : 3 375 bps
Nominal bit rate                         : 192 Kbps
Channel(s)                               :  channel0
Channel(s)_Original                      : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 9.08 KiB (0%)
Source stream size                       : 9.08 KiB (0%)
Language                                 : English
Encoded date                             : UTC 2015-06-14 19:21:51
Tagged date                              : UTC 2015-06-14 19:21:51

The bitrate while encoding jumps up to crazy numbers in the range of 150 000 - 300 000 kb/s and as can be seen from the mediainfo, the format profile changes from High@L5 to High 4:4:4 Predictive@L4.2.

This, however, is what I'd normally expect (but with crf 18):
Code:
General
Complete name                            : P:\replay buffer\Replay-2015-06-14-2156-11.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 55.3 MiB
Duration                                 : 1mn 4s
Overall bit rate                         : 7 137 Kbps
Encoded date                             : UTC 2015-06-14 18:56:11
Tagged date                              : UTC 2015-06-14 18:56:11
Writing application                      : Open Broadcaster Software v0.651b

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L5
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Muxing mode                              : Container profile=High@3.1
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1mn 4s
Bit rate                                 : 7 119 Kbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 60.000 fps
Minimum frame rate                       : 58.824 fps
Maximum frame rate                       : 62.500 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.057
Stream size                              : 55.1 MiB (100%)
Writing library                          : x264 core 146 r2538 121396c
Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=100000 / vbv_bufsize=100000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 2015-06-14 18:56:11
Tagged date                              : UTC 2015-06-14 18:56:11
Color range                              : Full
Color primaries                          : BT.709
Transfer characteristics                 : sYCC
Matrix coefficients                      : BT.709
mdhd_Duration                            : 64966

Audio
ID                                       : 1
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 1mn 4s
Source duration                          : 1mn 4s
Bit rate mode                            : Constant
Nominal bit rate                         : 192 Kbps
Channel(s)                               :  channel0
Channel(s)_Original                      : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Source stream size                       : 26.8 KiB (0%)
Language                                 : English
Encoded date                             : UTC 2015-06-14 18:56:11
Tagged date                              : UTC 2015-06-14 18:56:11

Anyone have a clue why this happens?
 
...now after (remembering the existence of and) checking the logs I found this:
Code:
22:56:09: Using custom x264 settings: "crf="18""
22:56:09: The custom x264 command 'crf="18"' failed
22:56:09: Failed to set x264 profile: high
22:56:09: x264: VBV is incompatible with constant QP, ignored.

I was just typing it wrong, it's crf=18, not crf="18". Solved.
 
Back
Top