value of QP

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
urgentus
Posts: 3
Joined: Sat May 09, 2020 4:14 am

value of QP

Post by urgentus »

Description of problem or question:

Hi. What avg QP values will be optimal when coding H.264 H10P (10 bit)? I have values between avg QP 12-18 - H.264. I have values within the limits avg QP over 26 for the same settings - H.264 10 bit. Is it rigght values? Thanks.

Steps to reproduce the problem (If Applicable):

HandBrake version (e.g., 1.0.0):

Handbrake 1.3.2

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

Manjaro x64 20.0 Lysia

HandBrake Activity Log ***required***

Code: Select all

Handbrake Version: 1.3.2 (2020050400)
[01:21:49] gtkgui: Modified Preset: /Matroska/H.264 MKV 720p30
[01:21:49] Starting work at: Sat May  9 01:21:49 2020

[01:21:49] 1 job(s) to process
[01:21:49] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "av_aac",
                "Gain": 0.0,
                "Mixdown": "stereo",
                "Name": "iTunes",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 42,
                    "Ticks": 20003670
                },
                "Name": "2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 1,
                    "Seconds": 18,
                    "Ticks": 7035030
                },
                "Name": "3"
            }
        ],
        "ChapterMarkers": true,
        "File": "/media/win/un2/111111.ELEKTRI4KA.UNIONGANG..mkv",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "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": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 12,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 534,
                    "width": 1280
                }
            }
        ]
    },
    "Metadata": {
        "Name": ".ELEKTRI4KA.UNIONGANG."
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/chapa/0_0/111111.ELEKTRI4KA.UNIONGANG..mkv",
        "Range": {
            "End": 2,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": true,
            "Forced": true
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorFormat": 0,
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorRange": 1,
        "ColorTransfer": 1,
        "Encoder": "x264_10bit",
        "Level": "4.0",
        "Options": "subme=9:me=umh:me_range=24:b_adapt=2:bframes=6:ref=9:keyint_min=23:mbtree=0",
        "Preset": "medium",
        "Profile": "high10",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 18.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[01:21:49] CPU: 
[01:21:49]  - logical processor count: 16
[01:21:49] Intel Quick Sync Video support: no
[01:21:49] hb_scan: path=/home/chapa/0_0/111111.ELEKTRI4KA.UNIONGANG..mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/chapa/0_0/111111.ELEKTRI4KA.UNIONGANG..mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/home/chapa/0_0/111111.ELEKTRI4KA.UNIONGANG..mkv/) failed
[01:21:49] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
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
[01:21:49] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/chapa/0_0/111111.ELEKTRI4KA.UNIONGANG..mkv':
  Metadata:
    title           : .ELEKTRI4KA.UNIONGANG.
    encoder         : libebml v1.3.10 + libmatroska v1.5.2
    creation_time   : 2020-05-08T09:25:14.000000Z
  Duration: 00:05:00.43, start: 0.000000, bitrate: 10079 kb/s
    Chapter #0:0: start 0,000000, end 222,263000
    Metadata:
      title           : 2
    Chapter #0:1: start 222,263000, end 300,430000
    Metadata:
      title           : 3
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x800 [SAR 1:1 DAR 12:5], 23,98 fps, 23,98 tbr, 1k tbn, 47,95 tbc (default)
    Metadata:
      BPS-eng         : 9055621
      DURATION-eng    : 00:05:00.300000000
      NUMBER_OF_FRAMES-eng: 7200
      NUMBER_OF_BYTES-eng: 339925403
      _STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-08 09:25:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(rus): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      title           : iTunes
      BPS-eng         : 384000
      DURATION-eng    : 00:05:00.320000000
      NUMBER_OF_FRAMES-eng: 9385
      NUMBER_OF_BYTES-eng: 14415360
      _STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-08 09:25:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Audio: eac3, 48000 Hz, 6 channels, fltp
    Metadata:
      title           : Original
      BPS-eng         : 640000
      DURATION-eng    : 00:05:00.320000000
      NUMBER_OF_FRAMES-eng: 9385
      NUMBER_OF_BYTES-eng: 24025600
      _STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-08 09:25:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Subtitle: subrip
    Metadata:
      BPS-eng         : 106
      DURATION-eng    : 00:04:59.299000000
      NUMBER_OF_FRAMES-eng: 112
      NUMBER_OF_BYTES-eng: 3967
      _STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-08 09:25:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:4(eng): Subtitle: subrip
    Metadata:
      title           : SDH
      BPS-eng         : 111
      DURATION-eng    : 00:04:59.299000000
      NUMBER_OF_FRAMES-eng: 122
      NUMBER_OF_BYTES-eng: 4175
      _STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-08 09:25:14
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:5: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1067x600, 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : cover_land.jpg
      mimetype        : image/jpeg
    Stream #0:6: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 120x176, 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : small_cover.jpg
      mimetype        : image/jpeg
    Stream #0:7: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 213x120, 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : small_cover_land.jpg
      mimetype        : image/jpeg
    Stream #0:8: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 600x882, 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
[01:21:49] scan: decoding previews for title 1
[01:21:49] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 русский (AC3) (5.1 ch) (384 kbps)
[01:21:49] scan: audio 0x2: eac3, rate=48000Hz, bitrate=640000 English (E-AC3) (5.1 ch) (640 kbps)
[01:21:50] scan: 10 previews, 1920x800, 23,976 fps, autocrop = 0/0/0/0, aspect 2,40:1, PAR 1:1
[01:21:50] scan: supported video decoders: avcodec qsv
[01:21:50] libhb: scan thread found 1 valid title(s)
[01:21:50] Skipping subtitle scan.  No suitable subtitle tracks.
[01:21:50] Starting Task: Encoding Pass
[01:21:50] job configuration:
[01:21:50]  * source
[01:21:50]    + /home/chapa/0_0/111111.ELEKTRI4KA.UNIONGANG..mkv
[01:21:50]    + title 1, chapter(s) 1 to 2
[01:21:50]    + container: matroska,webm
[01:21:50]    + data rate: 10079 kbps
[01:21:50]  * destination
[01:21:50]    + /media/win/un2/111111.ELEKTRI4KA.UNIONGANG..mkv
[01:21:50]    + container: Matroska (libavformat)
[01:21:50]      + chapter markers
[01:21:50]  * video track
[01:21:50]    + decoder: h264
[01:21:50]    + filters
[01:21:50]      + 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)
[01:21:50]      + Decomb (mode=39)
[01:21:50]      + Framerate Shaper (mode=2:rate=27000000/900000)
[01:21:50]        + frame rate: 23,976 fps -> peak rate limited to 30,000 fps
[01:21:50]      + Crop and Scale (width=1280:height=534:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[01:21:50]        + source: 1920 * 800, crop (0/0/0/0): 1920 * 800, scale: 1280 * 534
[01:21:50]    + Output geometry
[01:21:50]      + storage dimensions: 1280 x 534
[01:21:50]      + pixel aspect ratio: 1 : 1
[01:21:50]      + display dimensions: 1280 x 534
[01:21:50]    + encoder: H.264 10-bit (libx264)
[01:21:50]      + preset:  medium
[01:21:50]      + options: subme=9:me=umh:me_range=24:b_adapt=2:bframes=6:ref=9:keyint_min=23:mbtree=0
[01:21:50]      + profile: high10
[01:21:50]      + level:   4.0
[01:21:50]      + quality: 18,00 (RF)
[01:21:50]      + color profile: 1-1-1
[01:21:50]  * audio track 1
[01:21:50]    + name: iTunes
[01:21:50]    + decoder: русский (AC3) (5.1 ch) (384 kbps) (track 1, id 0x1)
[01:21:50]      + bitrate: 384 kbps, samplerate: 48000 Hz
[01:21:50]    + mixdown: Stereo
[01:21:50]    + dither: triangular
[01:21:50]    + encoder: AAC (libavcodec)
[01:21:50]      + bitrate: 160 kbps, samplerate: 48000 Hz
[01:21:50] sync: expecting 7203 video frames
[01:21:50] encx264: min-keyint: 23, keyint: 240
[01:21:50] encx264: encoding at constant RF 18,000000
[01:21:50] encx264: unparsed options: subme=9:me=umh:me_range=24:b_adapt=2:bframes=6:ref=9:keyint_min=23:mbtree=0:level=4.0:b-adapt=2:merange=24:vbv-bufsize=75000:vbv-maxrate=60000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High 10, level 4.0, 4:2:0, 10-bit
[01:21:50] sync: first pts video is 0
[01:21:50] sync: "2" (1) at frame 1 time 0
[01:21:50] sync: first pts audio 0x1 is 720
[01:25:05] sync: "3" (2) at frame 5330 time 20003733
[01:26:06] reader: done. 1 scr changes
[01:26:10] work: average encoding speed for job is 27,857393 fps
[01:26:10] comb detect: heavy 1 | light 40 | uncombed 7159 | total 7200
[01:26:10] decomb: deinterlaced 1 | blended 40 | unfiltered 7159 | total 7200
[01:26:10] vfr: 7200 frames output, 0 dropped and 0 duped for CFR/PFR
[01:26:10] vfr: lost time: 0 (0 frames)
[01:26:10] vfr: gained time: 0 (0 frames) (0 not accounted for)
[01:26:10] ac3-decoder done: 9385 frames, 0 decoder errors
[01:26:10] h264-decoder done: 7200 frames, 0 decoder errors
[01:26:10] sync: got 7200 frames, 7203 expected
[01:26:10] sync: framerate min 23,976 fps, max 23,976 fps, avg 23,976 fps
x264 [info]: frame I:81    Avg QP:27,67  size: 93326
x264 [info]: frame P:1725  Avg QP:29,19  size: 33878
x264 [info]: frame B:5394  Avg QP:30,70  size: 12040
x264 [info]: consecutive B-frames:  1,5%  2,3%  8,9% 55,7% 11,7% 16,5%  3,5%
x264 [info]: mb I  I16..4:  3,5% 77,9% 18,6%
x264 [info]: mb P  I16..4:  0,8% 12,5%  2,7%  P16..4: 35,6% 26,7% 15,4%  0,0%  0,0%    skip: 6,3%
x264 [info]: mb B  I16..4:  0,1%  1,1%  0,3%  B16..8: 42,3% 12,0%  3,9%  direct: 5,0%  skip:35,3%  L0:42,9% L1:47,5% BI: 9,6%
x264 [info]: 8x8 transform intra:78,2% inter:66,5%
x264 [info]: coded y,uvDC,uvAC intra: 93,8% 93,1% 69,8% inter: 32,9% 33,9% 3,6%
x264 [info]: i16 v,h,dc,p: 40% 23%  4% 33%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13%  8%  2% 10% 15% 15% 15% 11% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14%  9%  1%  8% 15% 15% 15% 11% 11%
x264 [info]: i8c dc,h,v,p: 34% 21% 21% 24%
x264 [info]: Weighted P-Frames: Y:0,9% UV:0,2%
x264 [info]: ref P L0: 61,8% 18,9%  6,8%  4,3%  2,4%  2,6%  1,7%  1,5%  0,0%  0,0%
x264 [info]: ref B L0: 77,4% 11,4%  4,9%  2,4%  1,5%  1,3%  0,8%  0,3%
x264 [info]: ref B L1: 95,0%  5,0%
x264 [info]: kb/s:3488,27
[01:26:10] mux: track 0, 7200 frames, 130937492 bytes, 3487,69 kbps, fifo 1024
[01:26:10] mux: track 1, 14078 frames, 6025904 bytes, 160,51 kbps, fifo 2048
[01:26:10] Finished work at: Sat May  9 01:26:10 2020

[01:26:10] libhb: work result = 0
Last edited by Rodeo on Tue May 12, 2020 5:04 pm, edited 1 time in total.
Reason: Logs in between [code][/code] blocks please
urgentus
Posts: 3
Joined: Sat May 09, 2020 4:14 am

Re: value of QP

Post by urgentus »

Sorry. I can`t edit this
musicvid
Veteran User
Posts: 3671
Joined: Sat Jun 27, 2009 1:19 am

Re: value of QP

Post by musicvid »

Hi10p is a lame duck format.
Unless you have a specific player you need it for, I don't suggest it for general use.
It was replaced by h265/HEVC, which is more efficient.

With regard to QP, I copied this quote:
Unless you know what you’re doing and you explicitly want this, do not use this mode! Setting a fixed QP means that the resulting bitrate will be varying strongly depending on each scene’s complexity, and it will result in rather inefficient encodes for your input video. You may waste space and you have no control of the actual bitrate.
urgentus
Posts: 3
Joined: Sat May 09, 2020 4:14 am

Re: value of QP

Post by urgentus »

musicvid Thanks.
User avatar
Rodeo
HandBrake Team
Posts: 12569
Joined: Tue Mar 03, 2009 8:55 pm

Re: value of QP

Post by Rodeo »

musicvid wrote: Tue May 12, 2020 12:22 pm With regard to QP, I copied this quote:
Unless you know what you’re doing and you explicitly want this, do not use this mode! Setting a fixed QP means that the resulting bitrate will be varying strongly depending on each scene’s complexity, and it will result in rather inefficient encodes for your input video. You may waste space and you have no control of the actual bitrate.
Except he's using CRF, which is recommended. He just didn't express it well.
mduell
Veteran User
Posts: 7184
Joined: Sat Apr 21, 2007 8:54 pm

Re: value of QP

Post by mduell »

An RF in the high teens, as you've done here, is a reasonable target for 1280 wide HD material.
Post Reply