VIDEO H264 cropped is greater then the same video no-cropped

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.
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

This is the Scenario:
S0 - Handbrake 10.3 64bit - W10 pro 64bit - Intel I3 graphic HD4000
S1 - created a video test from Star Trek XI blu-ray (DVDFAB mkv passthrough 1920x1080 size:157MB length:30 seconds, bitare:37,0Mb/s).
S2 - compressed whit RF16 and options "ref=4:bframes=12:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=64:trellis=2:aq-strength=2.0:psy-rd=0.2,0.00:no-dct-decimate=1:deblock=1,-1". Result : 1920x1080 size:133MB bitrate:36,0Mb/s
S3 - compressed whit RF16 , crop '0,140,140,0' and the options like S2. Result : 1920x800 size:156MB bitrate:39,4Mb/s.


Questions:
Q1 - same input, same option, result: cropped (S3) is greater then no-cropped (S2). Why?
Q2 - bitrate cropped (S3) is greater bitrate no-cropped (S2). Why?

Thanks for your help.

Log cropped phase:[/b]

Code: Select all

HandBrake 1.0.3 (2017022500) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz
Ram: 7890 MB, 
GPU Information:
  Intel(R) HD Graphics 4000 - 10.18.10.4425
Screen: 1280x800
Temp Dir: C:\Users\Gualtiero\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Gualtiero\AppData\Roaming\HandBrake Team\HandBrake\1.0.3.0

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


# Starting Encode ...

[08:48:23] hb_init: starting libhb thread
[08:48:23] 1 job(s) to process
[08:48:23] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 6,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "(01)00:00:00:000"
      },
      {
        "Name": "(02)00:11:57:216"
      },
      {
        "Name": "(03)00:19:45:100"
      },
      {
        "Name": "(04)00:28:09:104"
      },
      {
        "Name": "(05)00:35:33:506"
      },
      {
        "Name": "(06)00:44:10:397"
      },
      {
        "Name": "(07)00:52:21:721"
      },
      {
        "Name": "(08)01:01:33:606"
      },
      {
        "Name": "(09)01:11:40:087"
      },
      {
        "Name": "(10)01:20:39:501"
      },
      {
        "Name": "(11)01:27:35:291"
      },
      {
        "Name": "(12)01:36:29:575"
      },
      {
        "Name": "(13)01:44:34:268"
      },
      {
        "Name": "(14)01:53:13:411"
      },
      {
        "Name": "(15)01:58:20:551"
      },
      {
        "Name": "(16)02:06:50:019"
      }
    ],
    "ChapterMarkers": true,
    "File": "E:\\Video\\Star Trek XI.hb01crop.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "140",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "140",
          "height": "800",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 16
    },
    "Title": 1,
    "Path": "E:\\Video\\Star Trek XI.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 2,
        "Offset": 0,
        "Track": 1
      }
    ]
  },
  "Video": {
    "Encoder": 65536,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=4:bframes=12:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=64:trellis=2:aq-strength=2.0:psy-rd=0.2,0.00:no-dct-decimate=1:deblock=1,-1",
    "Quality": 16.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[08:48:23] CPU: Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz
[08:48:23]  - Intel microarchitecture Ivy Bridge
[08:48:23]  - logical processor count: 4
[08:48:23] Intel Quick Sync Video support: yes
[08:48:23]  - Intel Media SDK hardware: API 1.11 (minimum: 1.3)
[08:48:23]  - H.264 encoder: yes
[08:48:23]     - preferred implementation: hardware (any)
[08:48:23]     - capabilities (hardware):  vsinfo opt1 opt2+extbrc+ib_adapt+nmpslice
[08:48:23]  - H.265 encoder: no
[08:48:23] hb_scan: path=E:\Video\Star Trek XI.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image E:\Video\Star Trek XI.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[08:48:23] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[08:48:23] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'E:\Video\Star Trek XI.mkv':
  Metadata:
    title           : Star Trek XI
  Duration: 00:00:34.82, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 34.826458
    Metadata:
      title           : (01)00:00:00:000
    Chapter #0:1: start 717.216000, end 34.826458
    Metadata:
      title           : (02)00:11:57:216
    Chapter #0:2: start 1185.099000, end 34.826458
    Metadata:
      title           : (03)00:19:45:100
    Chapter #0:3: start 1689.104000, end 34.826458
    Metadata:
      title           : (04)00:28:09:104
    Chapter #0:4: start 2133.506000, end 34.826458
    Metadata:
      title           : (05)00:35:33:506
    Chapter #0:5: start 2650.397000, end 34.826458
    Metadata:
      title           : (06)00:44:10:397
    Chapter #0:6: start 3141.721000, end 34.826458
    Metadata:
      title           : (07)00:52:21:721
    Chapter #0:7: start 3693.606000, end 34.826458
    Metadata:
      title           : (08)01:01:33:606
    Chapter #0:8: start 4300.087000, end 34.826458
    Metadata:
      title           : (09)01:11:40:087
    Chapter #0:9: start 4839.501000, end 34.826458
    Metadata:
      title           : (10)01:20:39:501
    Chapter #0:10: start 5255.291000, end 34.826458
    Metadata:
      title           : (11)01:27:35:291
    Chapter #0:11: start 5789.575000, end 34.826458
    Metadata:
      title           : (12)01:36:29:575
    Chapter #0:12: start 6274.268000, end 34.826458
    Metadata:
      title           : (13)01:44:34:268
    Chapter #0:13: start 6793.411000, end 34.826458
    Metadata:
      title           : (14)01:53:13:411
    Chapter #0:14: start 7100.551000, end 34.826458
    Metadata:
      title           : (15)01:58:20:551
    Chapter #0:15: start 7610.019000, end 34.826458
    Metadata:
      title           : (16)02:06:50:019
    Stream #0:0: Video: h264 (High)
      yuv420p, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 48003.07 tbn (default)
    Stream #0:1(eng): Audio: truehd
      48000 Hz, 5.1, s32 (default)
    Stream #0:2(ita): Subtitle: dvd_subtitle (default)
    Stream #0:3(ita): Subtitle: dvd_subtitle
[08:48:23] scan: decoding previews for title 1
[08:48:23] scan: audio 0x1: truehd, rate=48000Hz, bitrate=1 English (TrueHD) (5.1 ch)
[08:48:25] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 140/140/0/0, aspect 16:9, PAR 1:1
[08:48:25] scan: supported video decoders: avcodec qsv
[08:48:25] libhb: scan thread found 1 valid title(s)
[08:48:25] starting job
[08:48:25] work: track 1, dithering not supported by codec
[08:48:25] job configuration:
[08:48:25]  * source
[08:48:25]    + E:\Video\Star Trek XI.mkv
[08:48:25]    + title 1, chapter(s) 1 to 16
[08:48:25]    + container: matroska,webm
[08:48:25]  * destination
[08:48:25]    + E:\Video\Star Trek XI.hb01crop.mkv
[08:48:25]    + container: Matroska (libavformat)
[08:48:25]      + chapter markers
[08:48:25]  * video track
[08:48:25]    + decoder: h264
[08:48:25]    + filters
[08:48:25]      + Framerate Shaper (mode=0)
[08:48:25]        + frame rate: same as source (around 23.976 fps)
[08:48:25]      + Crop and Scale (width=1920:height=800:crop-top=140:crop-bottom=140:crop-left=0:crop-right=0)
[08:48:25]        + source: 1920 * 1080, crop (140/140/0/0): 1920 * 800, scale: 1920 * 800
[08:48:25]    + Output geometry
[08:48:25]      + storage dimensions: 1920 x 800
[08:48:25]      + pixel aspect ratio: 1 : 1
[08:48:25]      + display dimensions: 1920 x 800
[08:48:25]    + encoder: H.264 (libx264)
[08:48:25]      + options: ref=4:bframes=12:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=64:trellis=2:aq-strength=2.0:psy-rd=0.2,0.00:no-dct-decimate=1:deblock=1,-1
[08:48:25]      + quality: 16.00 (RF)
[08:48:25]  * subtitle track 1, Italian (track 0, id 0x2) Picture [VOBSUB] -> Passthrough
[08:48:25]  * subtitle track 2, Italian (track 1, id 0x3) Picture [VOBSUB] -> Passthrough
[08:48:25]  * audio track 1
[08:48:25]    + decoder: English (TrueHD) (5.1 ch) (track 1, id 0x1)
[08:48:25]      + samplerate: 48000 Hz
[08:48:25]    + mixdown: Dolby Pro Logic II
[08:48:25]    + encoder: AAC (libavcodec)
[08:48:25]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:48:25] sync: expecting 834 video frames
[08:48:25] encx264: min-keyint: 24, keyint: 240
[08:48:25] encx264: encoding at constant RF 16.000000
[08:48:25] encx264: unparsed options: ref=4:bframes=12:dct-decimate=0:b-adapt=2:merange=64:direct=auto:b-pyramid=strict:me=umh:subme=10:trellis=2:aq-strength=2:psy-rd=0.2,0:deblock=1,-1
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 4.0
[08:48:25] sync: first pts audio 0x1 is 0
[08:48:26] sync: first pts video is 7507
[08:48:26] sync: "(01)00:00:00:000" (1) at frame 1 time 7507
[08:54:36] reader: done. 1 scr changes
[08:56:00] work: average encoding speed for job is 2.021512 fps
[08:56:00] vfr: lost time: 0 (0 frames)
[08:56:00] vfr: gained time: 0 (0 frames) (0 not accounted for)
[08:56:01] truehd-decoder done: 41742 frames, 0 decoder errors
[08:56:01] h264-decoder done: 833 frames, 0 decoder errors
[08:56:01] sync: got 833 frames, 834 expected
[08:56:01] sync: framerate min 23.968 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:4     Avg QP:11.62  size:267016
x264 [info]: frame P:242   Avg QP:13.80  size:196159
x264 [info]: frame B:587   Avg QP:13.84  size:188590
x264 [info]: consecutive B-frames:  5.6%  7.2% 22.0% 19.2% 16.2% 28.1%  1.7%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 56.5% 19.3% 24.1%
x264 [info]: mb P  I16..4: 51.3% 25.2% 18.8%  P16..4:  2.3%  1.9%  0.4%  0.0%  0.0%    skip: 0.1%
x264 [info]: mb B  I16..4: 48.9% 12.3% 15.8%  B16..8:  9.2%  6.5%  1.8%  direct: 4.1%  skip: 1.3%  L0:40.9% L1:31.5% BI:27.7%
x264 [info]: 8x8 transform intra:19.5% inter:42.5%
x264 [info]: direct mvs  spatial:99.5% temporal:0.5%
x264 [info]: coded y,uvDC,uvAC intra: 98.7% 88.1% 81.2% inter: 75.9% 45.7% 19.1%
x264 [info]: i16 v,h,dc,p:  3%  2% 76% 19%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 15% 27%  6%  7%  6%  7%  8%  9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 16% 26%  6%  7%  6%  6%  6%  8%
x264 [info]: i8c dc,h,v,p: 64% 13% 15%  8%
x264 [info]: Weighted P-Frames: Y:2.1% UV:2.1%
x264 [info]: ref P L0: 67.5% 16.4% 14.8%  1.4%
x264 [info]: ref B L0: 92.8%  7.2%
x264 [info]: ref B L1: 97.4%  2.6%
x264 [info]: kb/s:36667.04
[08:56:01] mux: track 0, 833 frames, 159240362 bytes, 36579.17 kbps, fifo 128
[08:56:01] mux: track 1, 1631 frames, 697105 bytes, 160.13 kbps, fifo 512
[08:56:01] mux: track 2, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[08:56:01] mux: track 3, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[08:56:01] libhb: work result = 0

# Encode Completed ...
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by rollin_eng »

Can you post your log for both encodes, thanks.
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

Thanks for your mail.

This is 'CROP:NO' log (search 'CROP:YES' for second log):

================================================== CROP:NO ============================================

Code: Select all

HandBrake 1.0.3 (2017022500) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz
Ram: 7890 MB, 
GPU Information:
  Intel(R) HD Graphics 4000 - 10.18.10.4425
Screen: 1280x800
Temp Dir: C:\Users\Gualtiero\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Gualtiero\AppData\Roaming\HandBrake Team\HandBrake\1.0.3.0

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


# Starting Encode ...

[08:58:34] hb_init: starting libhb thread
[08:58:34] 1 job(s) to process
[08:58:34] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 6,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "(01)00:00:00:000"
      },
      {
        "Name": "(02)00:11:57:216"
      },
      {
        "Name": "(03)00:19:45:100"
      },
      {
        "Name": "(04)00:28:09:104"
      },
      {
        "Name": "(05)00:35:33:506"
      },
      {
        "Name": "(06)00:44:10:397"
      },
      {
        "Name": "(07)00:52:21:721"
      },
      {
        "Name": "(08)01:01:33:606"
      },
      {
        "Name": "(09)01:11:40:087"
      },
      {
        "Name": "(10)01:20:39:501"
      },
      {
        "Name": "(11)01:27:35:291"
      },
      {
        "Name": "(12)01:36:29:575"
      },
      {
        "Name": "(13)01:44:34:268"
      },
      {
        "Name": "(14)01:53:13:411"
      },
      {
        "Name": "(15)01:58:20:551"
      },
      {
        "Name": "(16)02:06:50:019"
      }
    ],
    "ChapterMarkers": true,
    "File": "E:\\Video\\Star Trek XI.hb01nocrop.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "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": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 16
    },
    "Title": 1,
    "Path": "E:\\Video\\Star Trek XI.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 2,
        "Offset": 0,
        "Track": 1
      }
    ]
  },
  "Video": {
    "Encoder": 65536,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=4:bframes=12:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=64:trellis=2:aq-strength=2.0:psy-rd=0.2,0.00:no-dct-decimate=1:deblock=1,-1",
    "Quality": 16.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[08:58:34] CPU: Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz
[08:58:34]  - Intel microarchitecture Ivy Bridge
[08:58:34]  - logical processor count: 4
[08:58:34] Intel Quick Sync Video support: yes
[08:58:34]  - Intel Media SDK hardware: API 1.11 (minimum: 1.3)
[08:58:34]  - H.264 encoder: yes
[08:58:34]     - preferred implementation: hardware (any)
[08:58:34]     - capabilities (hardware):  vsinfo opt1 opt2+extbrc+ib_adapt+nmpslice
[08:58:34]  - H.265 encoder: no
[08:58:34] hb_scan: path=E:\Video\Star Trek XI.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image E:\Video\Star Trek XI.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[08:58:34] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[08:58:34] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'E:\Video\Star Trek XI.mkv':
  Metadata:
    title           : Star Trek XI
  Duration: 00:00:34.82, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 34.826458
    Metadata:
      title           : (01)00:00:00:000
    Chapter #0:1: start 717.216000, end 34.826458
    Metadata:
      title           : (02)00:11:57:216
    Chapter #0:2: start 1185.099000, end 34.826458
    Metadata:
      title           : (03)00:19:45:100
    Chapter #0:3: start 1689.104000, end 34.826458
    Metadata:
      title           : (04)00:28:09:104
    Chapter #0:4: start 2133.506000, end 34.826458
    Metadata:
      title           : (05)00:35:33:506
    Chapter #0:5: start 2650.397000, end 34.826458
    Metadata:
      title           : (06)00:44:10:397
    Chapter #0:6: start 3141.721000, end 34.826458
    Metadata:
      title           : (07)00:52:21:721
    Chapter #0:7: start 3693.606000, end 34.826458
    Metadata:
      title           : (08)01:01:33:606
    Chapter #0:8: start 4300.087000, end 34.826458
    Metadata:
      title           : (09)01:11:40:087
    Chapter #0:9: start 4839.501000, end 34.826458
    Metadata:
      title           : (10)01:20:39:501
    Chapter #0:10: start 5255.291000, end 34.826458
    Metadata:
      title           : (11)01:27:35:291
    Chapter #0:11: start 5789.575000, end 34.826458
    Metadata:
      title           : (12)01:36:29:575
    Chapter #0:12: start 6274.268000, end 34.826458
    Metadata:
      title           : (13)01:44:34:268
    Chapter #0:13: start 6793.411000, end 34.826458
    Metadata:
      title           : (14)01:53:13:411
    Chapter #0:14: start 7100.551000, end 34.826458
    Metadata:
      title           : (15)01:58:20:551
    Chapter #0:15: start 7610.019000, end 34.826458
    Metadata:
      title           : (16)02:06:50:019
    Stream #0:0: Video: h264 (High)
      yuv420p, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 48003.07 tbn (default)
    Stream #0:1(eng): Audio: truehd
      48000 Hz, 5.1, s32 (default)
    Stream #0:2(ita): Subtitle: dvd_subtitle (default)
    Stream #0:3(ita): Subtitle: dvd_subtitle
[08:58:34] scan: decoding previews for title 1
[08:58:34] scan: audio 0x1: truehd, rate=48000Hz, bitrate=1 English (TrueHD) (5.1 ch)
[08:58:36] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 140/140/0/0, aspect 16:9, PAR 1:1
[08:58:36] scan: supported video decoders: avcodec qsv
[08:58:36] libhb: scan thread found 1 valid title(s)
[08:58:36] starting job
[08:58:36] work: track 1, dithering not supported by codec
[08:58:36] job configuration:
[08:58:36]  * source
[08:58:36]    + E:\Video\Star Trek XI.mkv
[08:58:36]    + title 1, chapter(s) 1 to 16
[08:58:36]    + container: matroska,webm
[08:58:36]  * destination
[08:58:36]    + E:\Video\Star Trek XI.hb01nocrop.mkv
[08:58:36]    + container: Matroska (libavformat)
[08:58:36]      + chapter markers
[08:58:36]  * video track
[08:58:36]    + decoder: h264
[08:58:36]    + filters
[08:58:36]      + Framerate Shaper (mode=0)
[08:58:36]        + frame rate: same as source (around 23.976 fps)
[08:58:36]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[08:58:36]        [color=#FF0000]+ source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080[/color]
[08:58:36]    + Output geometry
[08:58:36]      + storage dimensions: 1920 x 1080
[08:58:36]      + pixel aspect ratio: 1 : 1
[08:58:36]      + display dimensions: 1920 x 1080
[08:58:36]    + encoder: H.264 (libx264)
[08:58:36]      + options: ref=4:bframes=12:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=64:trellis=2:aq-strength=2.0:psy-rd=0.2,0.00:no-dct-decimate=1:deblock=1,-1
[08:58:36]      + quality: 16.00 (RF)
[08:58:36]  * subtitle track 1, Italian (track 0, id 0x2) Picture [VOBSUB] -> Passthrough
[08:58:36]  * subtitle track 2, Italian (track 1, id 0x3) Picture [VOBSUB] -> Passthrough
[08:58:36]  * audio track 1
[08:58:36]    + decoder: English (TrueHD) (5.1 ch) (track 1, id 0x1)
[08:58:36]      + samplerate: 48000 Hz
[08:58:36]    + mixdown: Dolby Pro Logic II
[08:58:36]    + encoder: AAC (libavcodec)
[08:58:36]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:58:36] sync: expecting 834 video frames
[08:58:36] encx264: min-keyint: 24, keyint: 240
[08:58:36] encx264: encoding at constant RF 16.000000
[08:58:36] encx264: unparsed options: ref=4:bframes=12:dct-decimate=0:b-adapt=2:merange=64:direct=auto:b-pyramid=strict:me=umh:subme=10:trellis=2:aq-strength=2:psy-rd=0.2,0:deblock=1,-1
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 4.0
[08:58:36] sync: first pts audio 0x1 is 0
[08:58:36] sync: first pts video is 7507
[08:58:36] sync: "(01)00:00:00:000" (1) at frame 1 time 7507
[09:04:40] reader: done. 1 scr changes
[09:05:57] work: average encoding speed for job is 2.089798 fps
[09:05:57] vfr: lost time: 0 (0 frames)
[09:05:57] vfr: gained time: 0 (0 frames) (0 not accounted for)
[09:05:57] truehd-decoder done: 41742 frames, 0 decoder errors
[09:05:57] h264-decoder done: 833 frames, 0 decoder errors
[09:05:57] sync: got 833 frames, 834 expected
[09:05:57] sync: framerate min 23.968 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:4     Avg QP: 9.48  size:226274
x264 [info]: frame P:256   Avg QP:12.26  size:164935
x264 [info]: frame B:573   Avg QP:12.54  size:161690
x264 [info]: consecutive B-frames:  7.1%  7.2% 23.8% 21.6% 15.0% 24.5%  0.8%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 53.3% 39.5%  7.2%
x264 [info]: mb P  I16..4: 22.7% 44.3%  4.0%  P16..4:  2.6%  1.3%  0.3%  0.0%  0.0%    skip:24.8%
x264 [info]: mb B  I16..4: 23.4% 30.1%  2.7%  B16..8:  8.5%  4.5%  1.2%  direct: 3.0%  skip:26.7%  L0:41.6% L1:30.9% BI:27.6%
x264 [info]: 8x8 transform intra:56.6% inter:60.9%
x264 [info]: direct mvs  spatial:99.5% temporal:0.5%
x264 [info]: coded y,uvDC,uvAC intra: 96.5% 86.4% 71.8% inter: 23.9% 15.7% 6.7%
x264 [info]: i16 v,h,dc,p:  2%  4% 74% 21%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 12% 41%  6%  6%  5%  6%  6%  7%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 14% 29%  7%  7%  6%  7%  6%  9%
x264 [info]: i8c dc,h,v,p: 59% 18% 14%  8%
x264 [info]: Weighted P-Frames: Y:1.2% UV:1.2%
x264 [info]: ref P L0: 66.4% 12.1% 19.3%  2.2%
x264 [info]: ref B L0: 90.5%  9.5%
x264 [info]: ref B L1: 96.5%  3.5%
x264 [info]: kb/s:31264.24
[09:05:57] mux: track 0, 833 frames, [color=#FF0000]135776698 bytes[/color], 31152.01 kbps, fifo 128
[09:05:57] mux: track 1, 1631 frames, 697105 bytes, 159.94 kbps, fifo 512
[09:05:57] mux: track 2, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[09:05:57] mux: track 3, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[09:05:57] libhb: work result = 0

# Encode Completed ...
================================================== CROP:YES ============================================

Code: Select all

HandBrake 1.0.3 (2017022500) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz
Ram: 7890 MB, 
GPU Information:
  Intel(R) HD Graphics 4000 - 10.18.10.4425
Screen: 1280x800
Temp Dir: C:\Users\Gualtiero\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Gualtiero\AppData\Roaming\HandBrake Team\HandBrake\1.0.3.0

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


# Starting Encode ...

[08:48:23] hb_init: starting libhb thread
[08:48:23] 1 job(s) to process
[08:48:23] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 6,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "(01)00:00:00:000"
      },
      {
        "Name": "(02)00:11:57:216"
      },
      {
        "Name": "(03)00:19:45:100"
      },
      {
        "Name": "(04)00:28:09:104"
      },
      {
        "Name": "(05)00:35:33:506"
      },
      {
        "Name": "(06)00:44:10:397"
      },
      {
        "Name": "(07)00:52:21:721"
      },
      {
        "Name": "(08)01:01:33:606"
      },
      {
        "Name": "(09)01:11:40:087"
      },
      {
        "Name": "(10)01:20:39:501"
      },
      {
        "Name": "(11)01:27:35:291"
      },
      {
        "Name": "(12)01:36:29:575"
      },
      {
        "Name": "(13)01:44:34:268"
      },
      {
        "Name": "(14)01:53:13:411"
      },
      {
        "Name": "(15)01:58:20:551"
      },
      {
        "Name": "(16)02:06:50:019"
      }
    ],
    "ChapterMarkers": true,
    "File": "E:\\Video\\Star Trek XI.hb01crop.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "140",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "140",
          "height": "800",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 16
    },
    "Title": 1,
    "Path": "E:\\Video\\Star Trek XI.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 2,
        "Offset": 0,
        "Track": 1
      }
    ]
  },
  "Video": {
    "Encoder": 65536,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=4:bframes=12:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=64:trellis=2:aq-strength=2.0:psy-rd=0.2,0.00:no-dct-decimate=1:deblock=1,-1",
    "Quality": 16.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[08:48:23] CPU: Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz
[08:48:23]  - Intel microarchitecture Ivy Bridge
[08:48:23]  - logical processor count: 4
[08:48:23] Intel Quick Sync Video support: yes
[08:48:23]  - Intel Media SDK hardware: API 1.11 (minimum: 1.3)
[08:48:23]  - H.264 encoder: yes
[08:48:23]     - preferred implementation: hardware (any)
[08:48:23]     - capabilities (hardware):  vsinfo opt1 opt2+extbrc+ib_adapt+nmpslice
[08:48:23]  - H.265 encoder: no
[08:48:23] hb_scan: path=E:\Video\Star Trek XI.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image E:\Video\Star Trek XI.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[08:48:23] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[08:48:23] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'E:\Video\Star Trek XI.mkv':
  Metadata:
    title           : Star Trek XI
  Duration: 00:00:34.82, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 34.826458
    Metadata:
      title           : (01)00:00:00:000
    Chapter #0:1: start 717.216000, end 34.826458
    Metadata:
      title           : (02)00:11:57:216
    Chapter #0:2: start 1185.099000, end 34.826458
    Metadata:
      title           : (03)00:19:45:100
    Chapter #0:3: start 1689.104000, end 34.826458
    Metadata:
      title           : (04)00:28:09:104
    Chapter #0:4: start 2133.506000, end 34.826458
    Metadata:
      title           : (05)00:35:33:506
    Chapter #0:5: start 2650.397000, end 34.826458
    Metadata:
      title           : (06)00:44:10:397
    Chapter #0:6: start 3141.721000, end 34.826458
    Metadata:
      title           : (07)00:52:21:721
    Chapter #0:7: start 3693.606000, end 34.826458
    Metadata:
      title           : (08)01:01:33:606
    Chapter #0:8: start 4300.087000, end 34.826458
    Metadata:
      title           : (09)01:11:40:087
    Chapter #0:9: start 4839.501000, end 34.826458
    Metadata:
      title           : (10)01:20:39:501
    Chapter #0:10: start 5255.291000, end 34.826458
    Metadata:
      title           : (11)01:27:35:291
    Chapter #0:11: start 5789.575000, end 34.826458
    Metadata:
      title           : (12)01:36:29:575
    Chapter #0:12: start 6274.268000, end 34.826458
    Metadata:
      title           : (13)01:44:34:268
    Chapter #0:13: start 6793.411000, end 34.826458
    Metadata:
      title           : (14)01:53:13:411
    Chapter #0:14: start 7100.551000, end 34.826458
    Metadata:
      title           : (15)01:58:20:551
    Chapter #0:15: start 7610.019000, end 34.826458
    Metadata:
      title           : (16)02:06:50:019
    Stream #0:0: Video: h264 (High)
      yuv420p, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 48003.07 tbn (default)
    Stream #0:1(eng): Audio: truehd
      48000 Hz, 5.1, s32 (default)
    Stream #0:2(ita): Subtitle: dvd_subtitle (default)
    Stream #0:3(ita): Subtitle: dvd_subtitle
[08:48:23] scan: decoding previews for title 1
[08:48:23] scan: audio 0x1: truehd, rate=48000Hz, bitrate=1 English (TrueHD) (5.1 ch)
[08:48:25] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 140/140/0/0, aspect 16:9, PAR 1:1
[08:48:25] scan: supported video decoders: avcodec qsv
[08:48:25] libhb: scan thread found 1 valid title(s)
[08:48:25] starting job
[08:48:25] work: track 1, dithering not supported by codec
[08:48:25] job configuration:
[08:48:25]  * source
[08:48:25]    + E:\Video\Star Trek XI.mkv
[08:48:25]    + title 1, chapter(s) 1 to 16
[08:48:25]    + container: matroska,webm
[08:48:25]  * destination
[08:48:25]    + E:\Video\Star Trek XI.hb01crop.mkv
[08:48:25]    + container: Matroska (libavformat)
[08:48:25]      + chapter markers
[08:48:25]  * video track
[08:48:25]    + decoder: h264
[08:48:25]    + filters
[08:48:25]      + Framerate Shaper (mode=0)
[08:48:25]        + frame rate: same as source (around 23.976 fps)
[08:48:25]      + Crop and Scale (width=1920:height=800:crop-top=140:crop-bottom=140:crop-left=0:crop-right=0)
[08:48:25]        [color=#0000FF]+ source: 1920 * 1080, crop (140/140/0/0): 1920 * 800, scale: 1920 * 800[/color]
[08:48:25]    + Output geometry
[08:48:25]      + storage dimensions: 1920 x 800
[08:48:25]      + pixel aspect ratio: 1 : 1
[08:48:25]      + display dimensions: 1920 x 800
[08:48:25]    + encoder: H.264 (libx264)
[08:48:25]      + options: ref=4:bframes=12:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=64:trellis=2:aq-strength=2.0:psy-rd=0.2,0.00:no-dct-decimate=1:deblock=1,-1
[08:48:25]      + quality: 16.00 (RF)
[08:48:25]  * subtitle track 1, Italian (track 0, id 0x2) Picture [VOBSUB] -> Passthrough
[08:48:25]  * subtitle track 2, Italian (track 1, id 0x3) Picture [VOBSUB] -> Passthrough
[08:48:25]  * audio track 1
[08:48:25]    + decoder: English (TrueHD) (5.1 ch) (track 1, id 0x1)
[08:48:25]      + samplerate: 48000 Hz
[08:48:25]    + mixdown: Dolby Pro Logic II
[08:48:25]    + encoder: AAC (libavcodec)
[08:48:25]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:48:25] sync: expecting 834 video frames
[08:48:25] encx264: min-keyint: 24, keyint: 240
[08:48:25] encx264: encoding at constant RF 16.000000
[08:48:25] encx264: unparsed options: ref=4:bframes=12:dct-decimate=0:b-adapt=2:merange=64:direct=auto:b-pyramid=strict:me=umh:subme=10:trellis=2:aq-strength=2:psy-rd=0.2,0:deblock=1,-1
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 4.0
[08:48:25] sync: first pts audio 0x1 is 0
[08:48:26] sync: first pts video is 7507
[08:48:26] sync: "(01)00:00:00:000" (1) at frame 1 time 7507
[08:54:36] reader: done. 1 scr changes
[08:56:00] work: average encoding speed for job is 2.021512 fps
[08:56:00] vfr: lost time: 0 (0 frames)
[08:56:00] vfr: gained time: 0 (0 frames) (0 not accounted for)
[08:56:01] truehd-decoder done: 41742 frames, 0 decoder errors
[08:56:01] h264-decoder done: 833 frames, 0 decoder errors
[08:56:01] sync: got 833 frames, 834 expected
[08:56:01] sync: framerate min 23.968 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:4     Avg QP:11.62  size:267016
x264 [info]: frame P:242   Avg QP:13.80  size:196159
x264 [info]: frame B:587   Avg QP:13.84  size:188590
x264 [info]: consecutive B-frames:  5.6%  7.2% 22.0% 19.2% 16.2% 28.1%  1.7%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 56.5% 19.3% 24.1%
x264 [info]: mb P  I16..4: 51.3% 25.2% 18.8%  P16..4:  2.3%  1.9%  0.4%  0.0%  0.0%    skip: 0.1%
x264 [info]: mb B  I16..4: 48.9% 12.3% 15.8%  B16..8:  9.2%  6.5%  1.8%  direct: 4.1%  skip: 1.3%  L0:40.9% L1:31.5% BI:27.7%
x264 [info]: 8x8 transform intra:19.5% inter:42.5%
x264 [info]: direct mvs  spatial:99.5% temporal:0.5%
x264 [info]: coded y,uvDC,uvAC intra: 98.7% 88.1% 81.2% inter: 75.9% 45.7% 19.1%
x264 [info]: i16 v,h,dc,p:  3%  2% 76% 19%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 15% 27%  6%  7%  6%  7%  8%  9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 16% 26%  6%  7%  6%  6%  6%  8%
x264 [info]: i8c dc,h,v,p: 64% 13% 15%  8%
x264 [info]: Weighted P-Frames: Y:2.1% UV:2.1%
x264 [info]: ref P L0: 67.5% 16.4% 14.8%  1.4%
x264 [info]: ref B L0: 92.8%  7.2%
x264 [info]: ref B L1: 97.4%  2.6%
x264 [info]: kb/s:36667.04
[08:56:01] mux: track 0, 833 frames, [color=#0000FF]159240362 bytes[/color], 36579.17 kbps, fifo 128
[08:56:01] mux: track 1, 1631 frames, 697105 bytes, 160.13 kbps, fifo 512
[08:56:01] mux: track 2, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[08:56:01] mux: track 3, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[08:56:01] libhb: work result = 0

# Encode Completed ...
User avatar
JohnAStebbins
HandBrake Team
Posts: 5723
Joined: Sat Feb 09, 2008 7:21 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by JohnAStebbins »

Interesting. This would be a good question for the x264 developers. I'm not exactly an expert in these things and I'm probably going to explain this poorly. But I would expect that the algorithms used for estimating picture quality would be significantly affected by large amounts of black space. The resulting video in the non-cropped case is going to be of lower quality in the actual video region inside the black borders because the algorithm calculated that the overall quality of the frame was high because the black borders are so easy to reproduce in high quality with few bits. The black borders contribute to the the overall quality of the frame and allow that overall quality to be achieved in fewer bits because black regions encodes to very few bits.

This is one of the reasons we recommend cropping. If you do not crop, the quality of the video inside the black boarders suffers.
Deleted User 13735

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by Deleted User 13735 »

Black borders "may" result in fewer i-frames because of uniformity of a large portion of the frame real estate. Fewer % of changed pixels=fewer i-frames. More i-frames = more bits.

Of course, I haven't tested this ridiculous theory, so I'm holding may hand out for a sound knuckle -rapping, should someone happen along and disprove it.
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

I read all replies with great interest and I implemented my tests.
I used the previous Video test
Start Trek XI - blu-ray edition - 34secs 157MB - AVC L4.1
with this NEW H264 Options :
level=4.1:rc-lookahead=60:ref=4:bframes=16:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=48:analyse=all:trellis=2

This is the summary table:

Code: Select all

RF   C.No(MB) C.Yes(MB)  %Y-N
00   520      527        +1,3
13   157      178        +13,4      
14   147      160        +8,8
15   137      143        +4,3
16   126      125        -0,8
17   114      108        -5,3

1 - in 'placebo quality' (RF00: no compress) the Croppep-NO is greater then Cropped-YES !!?? (the two files have not the same size: why?)
2 - C.YES is greater than C.NO up to rf15
3 - C.YES is smaller than C.NO by RF16 on forward

If I understand the observation of JohnAStennins:
1 - the quality of RF13/C.No (157MB) is probably equivalent at quality of source video (157MB)
2 - cropping the video (with the same RF value and option) the compressor works only the image (not black boarders) and to maintain the same target quality produces more bytes (178MB)
3 - If I want cropping the video to get the same quality of the video inside the black boarders of RF13/C.No: which are the compression parameters to be used?

thanks for your help
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

Sorry:

the previous reply contain an error:

1 - in 'placebo quality' (RF00: no compress) the Croppep-NO is greater then Cropped-YES !!?? (the two files have not the same size: why?)

is :

1 - in 'placebo quality' (RF00: no compress) the Croppep-YES is greater then Cropped-NO !!?? (the two files have not the same size: why?)
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by rollin_eng »

While this is interesting what is your end goal here?
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

The goal is to understand how the h264 compression works.

The main questions are:
1 - why the trend of the column% Y-N is positive up to RF15, then negative? The theory of JohnAStebbins is interesting but does not explain this.
2 - The case of RF00 (lossless) is even stranger: the size of video cropped is greater than size of video no-cropped!

Surely there is an explanation: probably only a technician can give the answer.

Thanks to all those who want to participate in the discussion
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by Woodstock »

Given that your source was already compressed by a lossy encoder, encoding it in a "loss less" way is guaranteed to generate a larger file.

Remember John's "This would be a good question for the x264 developers." comment above?

Trying to understand h.264, more specifically, how the x264 implementation of it works, is really beyond the scope of the handbrake "Community support" section. The expertise in how x264 works at the "encoding the bits" level are probably better answered by people closer to the source (code, that is)...

Strangely, the links to the developers' forum go to a dead domain (doom10.org).
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

Correct : "Given that your source was already compressed by a lossy encoder, encoding it in a "loss less" way is guaranteed to generate a larger file".

But my tests show another thing: with equal RF and identical options and equal input video, the video cropped is GREATER then the same video not-cropped!

The table is clearer than a thousand words; I'm just trying with your help to explain these data.

I'll try to follow your advice by contacting Videolan.org,

thanks.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5723
Joined: Sat Feb 09, 2008 7:21 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by JohnAStebbins »

I already explained why the non-cropped video is smaller than the cropped video. But as I said in that post, I probably didn't explain it well. I'll give it another shot.

When you pick a specific RF, the encoder is going to try to make the average quality of the video meet a metric that is defined by that RF. If certain portions of the video have very little complexity, it the encoder can achieve the metric with fewer bits. Remember that it is computing an average quality, so the low complexity black part of the video artificially boosts the computed quality of the video. Since the computed quality is higher, the encoder will use fewer bits to encode it in order to meet your RF metric.

Computing what the necessary RF would be to make the video inside the black borders be the same quality as video in a cropped encode is pretty much not possible because it depends on how much black there is *and* how complex the video is. The complexity of the video is determined by things like image detail, motion, contrast and brightness changes, etc.
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

Thank you for the explanation (which was already very clear in your first post).

I believe it to be correct! In addition: presumably the algorithm works in a different way according to the specified level.
How else to explain these data:
RF13/14/15 video cropped is greater then no-cropped video
RF16/R17 video cropped is smaller then no-cropped video

if the algorithm works always in the same way the video cropped should be always larger than the no-cropped video (obviously with equal RF and the same options) or I wrong?

Thanks for your patience,
Deleted User 13735

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by Deleted User 13735 »

It's a mystery...
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by s55 »

It's a very complicated subject area. The affect on bitrate is probably affecting the detection thresholds so it's not surprising at all what yours seeing.

You also have to consider that there are numerous algorithms (settings) that all have an affect on quality and size that all interact with each other, so explaining exactly why something happens is a very complex discussion.
Deleted User 11865

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by Deleted User 11865 »

You're also using a rather short sample -- overall results may differ on a full-length feature.
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

I agree with all your comments.

At the end the really important thing it is that the quality of the compressed video meets our expectations!

Another important thing is to do always new questions to themselves and seek the answers: for this I thank you for your help.

If I have new news, I will update you.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by rollin_eng »

rollin_eng wrote: Thu Apr 06, 2017 11:23 am While this is interesting what is your end goal here?
HBGT wrote: Thu Apr 06, 2017 12:33 pm The goal is to understand how the h264 compression works.
HBGT wrote: Fri Apr 07, 2017 6:50 am At the end the really important thing it is that the quality of the compressed video meets our expectations!
Now these are very different goals which is why I asked :)

So to answer the first you are better off asking the x264 developers directly as they will have more knowledge of the inner workings.

As for the second, what are your expectations? Maybe we can help you meet them.
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

Sorry, :oops:

I try to explain better (my English is at school level):

the compression with
"level=4.1:rc-lookahead=60:ref=4:bframes=16:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=48:analyse=all:trellis=2"
options is perfect for me (At the end the really important thing it is that the quality of the compressed video meets our expectations). :D

Like the x264 algorithm works (and why in some cases cropped> no-cropped) is just a curiosity that I wanted to share with you.
For this, following your advice, I will contact the x264 developers. :?:

In other words, the discussion is only theoretical (I'm not looking for solutions to a problem). :!:
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by rollin_eng »

Your English is very good and I understand you very well.

What I am asking is what are you trying to do with this video? Why are you converting it?
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

I have a HTPC (media-center Kodi) with 4TB disks, almost completely full.

It all started with the copy of "Star Trek XI" on the hard disk: its size is 35 GB (audio and subtitles: English and Italian); too much for a HD video not 3D!

I tried a program for converting all my videos (and decrease the size) and I found HandBrake, I liked it immediately.

I did some tests on a piece of videos to find the best options x264.
During these tests I noticed that the cropped video size was greater than the same non-cropped video: I decided to write to the forum to share it!

using RF16 and "level = 4.1: rc-lookahead = 60: ref = 4: bframes = 16: b-adapt = 2: Direct = auto: b-pyramid = strict: me = um: subme = 10: merange = 48: analyze = all: trellis = 2 options ", the size of "Star Trek XI" should decrease (this is a prediction) from 35GB to 27GB with the same visual quality perception (I hope).

With the same options, "Star Trek VI" should decrease from 22GB to 12GB !!??.

In the coming days I will convert these two videos completely, then I'll do a visual test to evaluate the final quality (On the quality of vision I do not accept compromises!)
Deleted User 13735

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by Deleted User 13735 »

. In the coming days I will convert these two videos completely, then I'll do a visual test to evaluate the final quality (On the quality of vision I do not accept compromises!)
Vision is the BIGGEST compromise in video encoding, since no two people will view or react the same way, or see it the same way at a different time. Worth keeping in mind....
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by rollin_eng »

OK, now we are getting somewhere.

First, don't use the very start or very end of a standard movie to do any testing as they are not very indicative of the actual movie content usually. Try finding a chapter or so around the middle with a bit of action and non action, this will give you a better estimate of actual compression.

B) HB has many great built in presets, why have you chosen your settings?

iii) Never forget about audio, as this can save/not save space too.

4) Settings that work well for Star Trek XI may not work well for Star Trek VI and vice versa.
HBGT
Posts: 22
Joined: Tue Mar 21, 2017 11:51 am

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by HBGT »

rollin_eng,
thank you for your observations.

B) HB has many great built in presets, why have you chosen your settings?
the most accurate built-in is 'Super HQ 1080p 30 surround' but compared to my goal of quality it is low.
- It uses the Deinterlace filter (with HD sources I do not use any filter: often cause artifacts),
- sets the frame rate to 30 (I prefer to use the original frame rate, which is also recommended by HB),
- sets bframes = 5 (I prefer 16, x264 will choose the number in accord with source).
- use RF18, it has a compression level too high: does not guarantee an excellent video quality
- the tests that I run have shown the formation of some artifacts (especially in black areas).

iii) Never forget about audio, as this can save/not save space too.
True! HD audio in the HD video is usually the 10/15% of total size. But for me the sound is important as the video and usually use the 'auto passthru'

4) Settings that work well for Star Trek XI may not work well for Star Trek VI and vice versa.
True! For me RF16 with "level=4.1:rc-lookahead=60:ref=4:bframes=16:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=10:merange=48:analyse=all:trellis=2" options are the best compromise between quality, size and general use for each HD video.
The weight for the conversion is very high (1 hour of HD video 1920x1080: 6/8 hours conversion with intel i3 evy bridge) but the result is fantastic: I can not see differences between source and target (I use a video projector full HD and 3D).

I would be very happy if someone tried my x264 options and give me some advice to improve them!
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: VIDEO H264 cropped is greater then the same video no-cropped

Post by rollin_eng »

I would also think the cost of running your PC 24/7 plus your time might be more expensive than just buying more HD space.

That way you also keep 100% of the video and sound quality.
Post Reply