Encoder Profile & Level Question

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
Silentbob
Posts: 6
Joined: Sat May 13, 2017 10:53 am

Encoder Profile & Level Question

Post by Silentbob »

I have just started to use Handbrake to convert our home movies from MTS to MP4, so we can play them on Apple TV. Howver I´m a little confused about Encoder profile and level.


Please detail your question or problem in as much detail as possible:

Changing from Encoder Profile Main to High and Encoder Level 4.0 to 4.1 increases file size.

- Original: MTS: 199 MB
- Encoder Profile Main/Encoder Level 4.0: 153 MB
- Encoder Profile High/Encoder Level 4.1: 276 MB

Resarching on the internet, I came to the conclusion that it would be the other way around. That changing to High and 4.1 would decrease the file size.

Is the something wrong or have I misunderstodd the whole thing?


Tell us about your environment. What version of HandBrake? What version of Windows are you running. etc.

- Windows 10 64 bit
- Handbrake 1.07

If there was any exception or error displayed, please copy it and paste it here:

No error


Please include the scan or encode log:

Code: Select all

 HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Ram: 8108 MB, 
GPU Information:
  NVIDIA GeForce GTX 960 - 21.21.13.7653
Screen: 1920x1080
Temp Dir: C:\Users\Klaus\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Klaus\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[12:51:01] hb_init: starting libhb thread
[12:51:01] 1 job(s) to process
[12:51:01] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "D:\\Konvetering Hjemmevideo\\Test 5.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 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": 1
    },
    "Title": 1,
    "Path": "D:\\Konvetering Hjemmevideo\\00005.MTS"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "veryslow",
    "Profile": "main",
    "Quality": 15.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[12:51:01] CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
[12:51:01]  - Intel microarchitecture Skylake
[12:51:01]  - logical processor count: 4
[12:51:01] Intel Quick Sync Video support: no
[12:51:01] hb_scan: path=D:\Konvetering Hjemmevideo\00005.MTS, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image D:\Konvetering Hjemmevideo\00005.MTS
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
[12:51:01] 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
[12:51:01] dvd: not a dvd - trying as a stream/file instead
[12:51:01] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[12:51:01] Found the following PIDS
[12:51:01]     Video PIDS :
[12:51:01]       0x1011 type H.264 (0x1b)
[12:51:01]     Audio PIDS :
[12:51:01]       0x1100 type AC3 (0x81)
[12:51:01]     Subtitle PIDS :
[12:51:01]       0x1200 type PGS Subtitle (0x90)
[12:51:01]     Other PIDS :
[12:51:01]       0x1001 type Unknown (0xff) (PCR)
[12:51:01] stream id 0x1100 (type 0x81 substream 0x0) audio 0x1100
[12:51:01] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[12:51:01] stream doesn't seem to have video IDR frames
[12:51:01] scan: decoding previews for title 1
[12:51:01] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[12:51:01] scan: audio 0x1100: ac3, rate=48000Hz, bitrate=256000 Unknown (AC3) (2.0 ch)
[12:51:02] stream: 26 good frames, 0 errors (0%)
[12:51:02] scan: 10 previews, 1920x1080, 50.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[12:51:02] scan: supported video decoders: avcodec qsv
[12:51:02] libhb: scan thread found 1 valid title(s)
[12:51:02] starting job
[12:51:02] decomb filter thread started for segment 0
[12:51:02] decomb filter thread started for segment 1
[12:51:02] decomb filter thread started for segment 3
[12:51:02] decomb filter thread started for segment 2
[12:51:02] mask filter thread started for segment 2
[12:51:02] mask erode thread started for segment 0
[12:51:02] mask erode thread started for segment 2
[12:51:02] decomb check thread started for segment 3
[12:51:02] mask filter thread started for segment 0
[12:51:02] mask dilate thread started for segment 3
[12:51:02] decomb check thread started for segment 0
[12:51:02] mask filter thread started for segment 3
[12:51:02] decomb check thread started for segment 1
[12:51:02] work: only 1 chapter, disabling chapter markers
[12:51:02] job configuration:
[12:51:02]  * source
[12:51:02]    + D:\Konvetering Hjemmevideo\00005.MTS
[12:51:02]    + title 1, chapter(s) 1 to 1
[12:51:02]  * destination
[12:51:02]    + D:\Konvetering Hjemmevideo\Test 5.mp4
[12:51:02]    + container: MPEG-4 (libavformat)
[12:51:02]  * video track
[12:51:02] mask erode thread started for segment 1
[12:51:02]    + decoder: h264
[12:51:02]      + bitrate 200 kbps
[12:51:02]    + filters
[12:51:02] decomb check thread started for segment 2
[12:51:02]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[12:51:02]      + Decomb (mode=39)
[12:51:02]      + Framerate Shaper (mode=0)
[12:51:02]        + frame rate: same as source (around 50.000 fps)
[12:51:02] mask erode thread started for segment 3
[12:51:02]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[12:51:02]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[12:51:02]    + Output geometry
[12:51:02]      + storage dimensions: 1920 x 1080
[12:51:02]      + pixel aspect ratio: 1 : 1
[12:51:02]      + display dimensions: 1920 x 1080
[12:51:02]  * Foreign Audio Search: Render/Burn-in, Forced Only
[12:51:02] mask dilate thread started for segment 1
[12:51:02]    + subtitle, Unknown (track 2, id 0x1200) Picture [PGS]
[12:51:02] mask dilate thread started for segment 0
[12:51:02] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[12:51:02] mask dilate thread started for segment 2
[12:51:02] yadif thread started for segment 0
[12:51:02] mask filter thread started for segment 1
[12:51:02] yadif thread started for segment 1
[12:51:02] yadif thread started for segment 3
[12:51:02] yadif thread started for segment 2
[12:51:02] sync: expecting 3092 video frames
[12:51:03] hb_ts_stream_decode - eof
[12:51:03] reader: done. 1 scr changes
[12:51:03] work: average encoding speed for job is 0.000000 fps
[12:51:03] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[12:51:03] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[12:51:03] vfr: lost time: 0 (0 frames)
[12:51:03] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:51:03] stream: 3096 good frames, 0 errors (0%)
[12:51:03] sync: got 0 frames, 3092 expected
[12:51:03] Subtitle track 2 (id 0x1200) 'Unknown': 129 hits (0 forced)
[12:51:03] No candidate detected during subtitle scan
[12:51:03] starting job
[12:51:03] decomb filter thread started for segment 0
[12:51:03] decomb filter thread started for segment 1
[12:51:03] decomb filter thread started for segment 2
[12:51:03] decomb filter thread started for segment 3
[12:51:03] decomb check thread started for segment 0
[12:51:03] decomb check thread started for segment 1
[12:51:03] decomb check thread started for segment 2
[12:51:03] decomb check thread started for segment 3
[12:51:03] mask filter thread started for segment 0
[12:51:03] mask erode thread started for segment 0
[12:51:03] mask filter thread started for segment 2
[12:51:03] mask filter thread started for segment 3
[12:51:03] mask filter thread started for segment 1
[12:51:03] mask erode thread started for segment 1
[12:51:03] mask erode thread started for segment 2
[12:51:03] mask dilate thread started for segment 2
[12:51:03] mask dilate thread started for segment 0
[12:51:03] mask dilate thread started for segment 1
[12:51:03] mask erode thread started for segment 3
[12:51:03] work: track 1, dithering not supported by codec
[12:51:03] mask dilate thread started for segment 3
[12:51:03] work: only 1 chapter, disabling chapter markers
[12:51:03] job configuration:
[12:51:03]  * source
[12:51:03]    + D:\Konvetering Hjemmevideo\00005.MTS
[12:51:03]    + title 1, chapter(s) 1 to 1
[12:51:03]  * destination
[12:51:03] yadif thread started for segment 0
[12:51:03]    + D:\Konvetering Hjemmevideo\Test 5.mp4
[12:51:03]    + container: MPEG-4 (libavformat)
[12:51:03]  * video track
[12:51:03]    + decoder: h264
[12:51:03]      + bitrate 200 kbps
[12:51:03]    + filters
[12:51:03]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[12:51:03] yadif thread started for segment 1
[12:51:03]      + Decomb (mode=39)
[12:51:03]      + Framerate Shaper (mode=0)
[12:51:03]        + frame rate: same as source (around 50.000 fps)
[12:51:03] yadif thread started for segment 2
[12:51:03]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[12:51:03]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[12:51:03]    + Output geometry
[12:51:03]      + storage dimensions: 1920 x 1080
[12:51:03]      + pixel aspect ratio: 1 : 1
[12:51:03]      + display dimensions: 1920 x 1080
[12:51:03]    + encoder: H.264 (libx264)
[12:51:03]      + preset:  veryslow
[12:51:03] yadif thread started for segment 3
[12:51:03]      + profile: main
[12:51:03]      + level:   4.0
[12:51:03]      + quality: 15.00 (RF)
[12:51:03]  * audio track 1
[12:51:03]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 0x1100)
[12:51:03]      + bitrate: 256 kbps, samplerate: 48000 Hz
[12:51:03]    + mixdown: Stereo
[12:51:03]    + encoder: AAC (libavcodec)
[12:51:03]      + bitrate: 160 kbps, samplerate: 48000 Hz
[12:51:03] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[12:51:03] sync: expecting 3092 video frames
[12:51:03] encx264: min-keyint: 50, keyint: 500
[12:51:03] encx264: encoding at constant RF 15.000000
[12:51:03] apply_h264_level [warning]: framerate (50.000) too high for level 4.0 at 1920x1080 (max. 30.118)
[12:51:03] encx264: unparsed options: level=4.0:direct=auto:ref=4:8x8dct=0:me=umh:bframes=8:b-adapt=2:analyse=all:rc-lookahead=60:merange=24:subme=10:trellis=2:vbv-bufsize=25000:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [warning]: MB rate (408000) > level limit (245760)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile Main, level 4.0
[12:51:03] sync: first pts video is 0
[12:51:03] sync: first pts audio 0x1100 is 0
[12:59:23] hb_ts_stream_decode - eof
[12:59:23] reader: done. 1 scr changes
[12:59:52] work: average encoding speed for job is 6.037758 fps
[12:59:53] comb detect: heavy 0 | light 41 | uncombed 3054 | total 3095
[12:59:53] decomb: deinterlaced 0 | blended 41 | unfiltered 3054 | total 3095
[12:59:53] vfr: lost time: 0 (0 frames)
[12:59:53] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:59:53] stream: 3096 good frames, 0 errors (0%)
[12:59:53] ac3-decoder done: 1935 frames, 0 decoder errors
[12:59:53] h264-decoder done: 3095 frames, 0 decoder errors
[12:59:53] sync: got 3095 frames, 3092 expected
[12:59:53] sync: framerate min 50.000 fps, max 50.000 fps, avg 50.000 fps
x264 [info]: frame I:7     Avg QP:20.56  size:203641
x264 [info]: frame P:819   Avg QP:22.99  size: 98079
x264 [info]: frame B:2269  Avg QP:25.27  size: 32636
x264 [info]: consecutive B-frames:  0.3%  5.3%  2.0% 91.4%  1.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 39.8%  0.0% 60.2%
x264 [info]: mb P  I16..4: 17.4%  0.0%  9.4%  P16..4: 51.8% 14.9%  6.2%  0.1%  0.0%    skip: 0.3%
x264 [info]: mb B  I16..4:  1.5%  0.0%  0.8%  B16..8: 77.1%  3.4%  0.3%  direct: 7.3%  skip: 9.5%  L0:84.1% L1:14.1% BI: 1.8%
x264 [info]: direct mvs  spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 83.2% 93.2% 54.0% inter: 24.4% 65.1% 9.2%
x264 [info]: i16 v,h,dc,p: 19% 15% 32% 34%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 13% 20%  6%  7%  8%  7%  7%  7%
x264 [info]: i8c dc,h,v,p: 60% 17% 14%  9%
x264 [info]: Weighted P-Frames: Y:1.5% UV:0.6%
x264 [info]: ref P L0: 61.9% 14.2% 16.7%  7.1%  0.1%
x264 [info]: ref B L0: 96.8%  2.7%  0.5%
x264 [info]: ref B L1: 96.9%  3.1%
x264 [info]: kb/s:20136.29
[12:59:53] mux: track 0, 3095 frames, 155804211 bytes, 20129.74 kbps, fifo 256
[12:59:53] mux: track 1, 2903 frames, 1239853 bytes, 160.19 kbps, fifo 512
[12:59:53] libhb: work result = 0

# Encode Completed ...

rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Encoder Profile & Level Question

Post by rollin_eng »

Do you have the log for the other encode?
Silentbob
Posts: 6
Joined: Sat May 13, 2017 10:53 am

Re: Encoder Profile & Level Question

Post by Silentbob »

No, unfortunately not. But I will recreate it and post it later tonight.
Deleted User 11865

Re: Encoder Profile & Level Question

Post by Deleted User 11865 »

Considering RF 15 and Main at level 4.0, you're probably hitting the vbv-maxrate a lot (remember that level 4.0 is capped to 20/25 Mbps, whereas level 4.1 can go up to 50/62.5 Mbps for Main/High profiles, respectively).

Either way, you're cresting non-compliant bitstreams:
Silentbob wrote: Sat May 13, 2017 11:08 am

Code: Select all

[12:51:03] apply_h264_level [warning]: framerate (50.000) too high for level 4.0 at 1920x1080 (max. 30.118)
[12:51:03] encx264: unparsed options: level=4.0:direct=auto:ref=4:8x8dct=0:me=umh:bframes=8:b-adapt=2:analyse=all:rc-lookahead=60:merange=24:subme=10:trellis=2:vbv-bufsize=25000:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [warning]: MB rate (408000) > level limit (245760)
Our apply level function automatically takes care of all level constraints except resolution and framerate. For 1080p50 you need level 4.2 or above to create compliant H.264 bitstreams.
Last edited by Deleted User 11865 on Sat May 13, 2017 8:10 pm, edited 1 time in total.
Reason: Clarify maxrate on a per-profile basis
Silentbob
Posts: 6
Joined: Sat May 13, 2017 10:53 am

Re: Encoder Profile & Level Question

Post by Silentbob »

Logfile for Encoder profile High and Encoder level 4.1:

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Ram: 8108 MB
GPU Information:
  NVIDIA GeForce GTX 960 - 21.21.13.7653
Screen: 1920x1080
Temp Dir: C:\Users\Klaus\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Klaus\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[19:38:59] hb_init: starting libhb thread
[19:38:59] 1 job(s) to process
[19:38:59] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "D:\\Konvetering Hjemmevideo\\Test 6.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 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": 1
    },
    "Title": 1,
    "Path": "D:\\Konvetering Hjemmevideo\\00005.MTS"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "4.1",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 15.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[19:38:59] CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
[19:38:59]  - Intel microarchitecture Skylake
[19:38:59]  - logical processor count: 4
[19:38:59] Intel Quick Sync Video support: no
[19:38:59] hb_scan: path=D:\Konvetering Hjemmevideo\00005.MTS, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image D:\Konvetering Hjemmevideo\00005.MTS
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
[19:38:59] 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
[19:38:59] dvd: not a dvd - trying as a stream/file instead
[19:38:59] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[19:38:59] Found the following PIDS
[19:38:59]     Video PIDS :
[19:38:59]       0x1011 type H.264 (0x1b)
[19:38:59]     Audio PIDS :
[19:38:59]       0x1100 type AC3 (0x81)
[19:38:59]     Subtitle PIDS :
[19:38:59]       0x1200 type PGS Subtitle (0x90)
[19:38:59]     Other PIDS :
[19:38:59]       0x1001 type Unknown (0xff) (PCR)
[19:38:59] stream id 0x1100 (type 0x81 substream 0x0) audio 0x1100
[19:38:59] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[19:38:59] stream doesn't seem to have video IDR frames
[19:38:59] scan: decoding previews for title 1
[19:38:59] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[19:39:00] scan: audio 0x1100: ac3, rate=48000Hz, bitrate=256000 Unknown (AC3) (2.0 ch)
[19:39:01] stream: 26 good frames, 0 errors (0%)
[19:39:01] scan: 10 previews, 1920x1080, 50.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[19:39:01] scan: supported video decoders: avcodec qsv
[19:39:01] libhb: scan thread found 1 valid title(s)
[19:39:01] starting job
[19:39:01] decomb filter thread started for segment 0
[19:39:01] decomb filter thread started for segment 1
[19:39:01] decomb filter thread started for segment 3
[19:39:01] decomb filter thread started for segment 2
[19:39:01] decomb check thread started for segment 1
[19:39:01] decomb check thread started for segment 2
[19:39:01] mask dilate thread started for segment 1
[19:39:01] mask erode thread started for segment 3
[19:39:01] decomb check thread started for segment 3
[19:39:01] mask filter thread started for segment 1
[19:39:01] work: only 1 chapter, disabling chapter markers
[19:39:01] job configuration:
[19:39:01]  * source
[19:39:01]    + D:\Konvetering Hjemmevideo\00005.MTS
[19:39:01] mask filter thread started for segment 2
[19:39:01]    + title 1, chapter(s) 1 to 1
[19:39:01]  * destination
[19:39:01]    + D:\Konvetering Hjemmevideo\Test 6.mp4
[19:39:01]    + container: MPEG-4 (libavformat)
[19:39:01]  * video track
[19:39:01]    + decoder: h264
[19:39:01]      + bitrate 200 kbps
[19:39:01]    + filters
[19:39:01]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[19:39:01]      + Decomb (mode=39)
[19:39:01]      + Framerate Shaper (mode=0)
[19:39:01] mask erode thread started for segment 0
[19:39:01]        + frame rate: same as source (around 50.000 fps)
[19:39:01]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[19:39:01]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[19:39:01]    + Output geometry
[19:39:01]      + storage dimensions: 1920 x 1080
[19:39:01]      + pixel aspect ratio: 1 : 1
[19:39:01]      + display dimensions: 1920 x 1080
[19:39:01]  * Foreign Audio Search: Render/Burn-in, Forced Only
[19:39:01]    + subtitle, Unknown (track 2, id 0x1200) Picture [PGS]
[19:39:01] mask filter thread started for segment 3
[19:39:01] mask erode thread started for segment 1
[19:39:01] decomb check thread started for segment 0
[19:39:01] mask erode thread started for segment 2
[19:39:01] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[19:39:01] mask dilate thread started for segment 0
[19:39:01] mask filter thread started for segment 0
[19:39:01] mask dilate thread started for segment 2
[19:39:01] mask dilate thread started for segment 3
[19:39:01] yadif thread started for segment 0
[19:39:01] yadif thread started for segment 1
[19:39:01] yadif thread started for segment 2
[19:39:01] yadif thread started for segment 3
[19:39:01] sync: expecting 3092 video frames
[19:39:02] hb_ts_stream_decode - eof
[19:39:02] reader: done. 1 scr changes
[19:39:02] work: average encoding speed for job is 0.000000 fps
[19:39:02] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[19:39:02] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[19:39:02] vfr: lost time: 0 (0 frames)
[19:39:02] vfr: gained time: 0 (0 frames) (0 not accounted for)
[19:39:02] stream: 3096 good frames, 0 errors (0%)
[19:39:02] sync: got 0 frames, 3092 expected
[19:39:02] Subtitle track 2 (id 0x1200) 'Unknown': 129 hits (0 forced)
[19:39:02] No candidate detected during subtitle scan
[19:39:02] starting job
[19:39:02] decomb filter thread started for segment 0
[19:39:02] decomb check thread started for segment 0
[19:39:02] decomb filter thread started for segment 2
[19:39:02] decomb check thread started for segment 3
[19:39:02] decomb filter thread started for segment 1
[19:39:02] mask filter thread started for segment 3
[19:39:02] decomb check thread started for segment 2
[19:39:02] mask dilate thread started for segment 0
[19:39:02] decomb filter thread started for segment 3
[19:39:02] mask filter thread started for segment 1
[19:39:02] mask filter thread started for segment 2
[19:39:02] work: track 1, dithering not supported by codec
[19:39:02] work: only 1 chapter, disabling chapter markers
[19:39:02] job configuration:
[19:39:02] decomb check thread started for segment 1
[19:39:02]  * source
[19:39:02]    + D:\Konvetering Hjemmevideo\00005.MTS
[19:39:02]    + title 1, chapter(s) 1 to 1
[19:39:02]  * destination
[19:39:02]    + D:\Konvetering Hjemmevideo\Test 6.mp4
[19:39:02]    + container: MPEG-4 (libavformat)
[19:39:02]  * video track
[19:39:02]    + decoder: h264
[19:39:02]      + bitrate 200 kbps
[19:39:02] mask erode thread started for segment 0
[19:39:02]    + filters
[19:39:02]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[19:39:02] mask erode thread started for segment 1
[19:39:02]      + Decomb (mode=39)
[19:39:02]      + Framerate Shaper (mode=0)
[19:39:02]        + frame rate: same as source (around 50.000 fps)
[19:39:02] mask erode thread started for segment 2
[19:39:02]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[19:39:02]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[19:39:02]    + Output geometry
[19:39:02]      + storage dimensions: 1920 x 1080
[19:39:02]      + pixel aspect ratio: 1 : 1
[19:39:02]      + display dimensions: 1920 x 1080
[19:39:02]    + encoder: H.264 (libx264)
[19:39:02]      + preset:  veryslow
[19:39:02]      + profile: high
[19:39:02]      + level:   4.1
[19:39:02] mask filter thread started for segment 0
[19:39:02]      + quality: 15.00 (RF)
[19:39:02]  * audio track 1
[19:39:02]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 0x1100)
[19:39:02]      + bitrate: 256 kbps, samplerate: 48000 Hz
[19:39:02]    + mixdown: Stereo
[19:39:02]    + encoder: AAC (libavcodec)
[19:39:02]      + bitrate: 160 kbps, samplerate: 48000 Hz
[19:39:02] mask erode thread started for segment 3
[19:39:02] mask dilate thread started for segment 1
[19:39:02] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[19:39:02] mask dilate thread started for segment 2
[19:39:02] mask dilate thread started for segment 3
[19:39:02] yadif thread started for segment 0
[19:39:02] yadif thread started for segment 1
[19:39:02] yadif thread started for segment 2
[19:39:02] yadif thread started for segment 3
[19:39:02] sync: expecting 3092 video frames
[19:39:02] encx264: min-keyint: 50, keyint: 500
[19:39:02] encx264: encoding at constant RF 15.000000
[19:39:02] apply_h264_level [warning]: framerate (50.000) too high for level 4.1 at 1920x1080 (max. 30.118)
[19:39:02] encx264: unparsed options: level=4.1:merange=24:rc-lookahead=60:ref=4:bframes=8:me=umh:direct=auto:analyse=all:vbv-bufsize=78125:b-adapt=2:subme=10:trellis=2:vbv-maxrate=62500
x264 [info]: using SAR=1/1
x264 [warning]: MB rate (408000) > level limit (245760)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile High, level 4.1
[19:39:02] sync: first pts video is 0
[19:39:02] sync: first pts audio 0x1100 is 0
[19:49:35] hb_ts_stream_decode - eof
[19:49:35] reader: done. 1 scr changes
[19:50:14] work: average encoding speed for job is 4.763064 fps
[19:50:14] comb detect: heavy 0 | light 41 | uncombed 3054 | total 3095
[19:50:15] decomb: deinterlaced 0 | blended 41 | unfiltered 3054 | total 3095
[19:50:15] vfr: lost time: 0 (0 frames)
[19:50:15] vfr: gained time: 0 (0 frames) (0 not accounted for)
[19:50:15] stream: 3096 good frames, 0 errors (0%)
[19:50:15] ac3-decoder done: 1935 frames, 0 decoder errors
[19:50:15] h264-decoder done: 3095 frames, 0 decoder errors
[19:50:15] sync: got 3095 frames, 3092 expected
[19:50:15] sync: framerate min 50.000 fps, max 50.000 fps, avg 50.000 fps
x264 [info]: frame I:7     Avg QP:16.66  size:317513
x264 [info]: frame P:819   Avg QP:18.73  size:184657
x264 [info]: frame B:2269  Avg QP:21.41  size: 56365
x264 [info]: consecutive B-frames:  0.3%  5.3%  2.0% 91.4%  1.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 12.6% 66.4% 20.9%
x264 [info]: mb P  I16..4:  8.5% 24.2%  7.9%  P16..4: 37.1% 17.6%  4.4%  0.3%  0.0%    skip: 0.0%
x264 [info]: mb B  I16..4:  0.9%  2.6%  0.9%  B16..8: 83.9%  6.7%  0.7%  direct: 2.8%  skip: 1.6%  L0:92.0% L1: 5.0% BI: 3.0%
x264 [info]: 8x8 transform intra:59.8% inter:30.0%
x264 [info]: direct mvs  spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 94.2% 98.1% 75.1% inter: 42.5% 70.8% 18.9%
x264 [info]: i16 v,h,dc,p: 14% 12% 50% 24%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13%  8% 12% 10% 11% 12% 10% 12% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 21% 20%  4%  3%  5%  4%  4%  5%
x264 [info]: i8c dc,h,v,p: 60% 16% 14%  9%
x264 [info]: Weighted P-Frames: Y:1.5% UV:0.6%
x264 [info]: ref P L0: 68.4% 16.7% 10.5%  4.4%  0.0%
x264 [info]: ref B L0: 98.2%  1.5%  0.3%
x264 [info]: ref B L1: 94.9%  5.1%
x264 [info]: kb/s:36361.82
[19:50:15] mux: track 0, 3095 frames, 281349229 bytes, 36350.03 kbps, fifo 128
[19:50:15] mux: track 1, 2903 frames, 1239853 bytes, 160.19 kbps, fifo 256
[19:50:15] libhb: work result = 0

# Encode Completed ...

Silentbob
Posts: 6
Joined: Sat May 13, 2017 10:53 am

Re: Encoder Profile & Level Question

Post by Silentbob »

Rodeo wrote: Sat May 13, 2017 5:13 pm Either way, you're cresting non-compliant bitstreams:
Silentbob wrote: Sat May 13, 2017 11:08 am

Code: Select all

[12:51:03] apply_h264_level [warning]: framerate (50.000) too high for level 4.0 at 1920x1080 (max. 30.118)
[12:51:03] encx264: unparsed options: level=4.0:direct=auto:ref=4:8x8dct=0:me=umh:bframes=8:b-adapt=2:analyse=all:rc-lookahead=60:merange=24:subme=10:trellis=2:vbv-bufsize=25000:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [warning]: MB rate (408000) > level limit (245760)
Our apply level function automatically takes care of all level constraints except resolution and framerate. For 1080p50 you need level 4.2 or above to create compliant H.264 bitstreams.
Thank you Rodeo. The first part of your answer I think I understand.

The second part though (Quoted), I would appreciate if you put in layman terms.
Silentbob
Posts: 6
Joined: Sat May 13, 2017 10:53 am

Re: Encoder Profile & Level Question

Post by Silentbob »

Never mind, rereading it I think I understand it.

A follow up question: How high an RF factor would I need with Encoder Profile High/Encoder Level 4.2 to create smaller than original file sizes?
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Encoder Profile & Level Question

Post by mduell »

Depends on the source. For an arbitrarily low bitrate source, you'll need an arbitrarily high RF to get a smaller file.
Silentbob
Posts: 6
Joined: Sat May 13, 2017 10:53 am

Re: Encoder Profile & Level Question

Post by Silentbob »

Thank you.

Final question. I´v been researching a bit, but can´t seem find anything about Encoder Level. Right now I´m using 4.2. However would it make sense to go higher and is 5.0/5.1/5.2 supported by common devices these days?
Deleted User 11865

Re: Encoder Profile & Level Question

Post by Deleted User 11865 »

Not really, most devices are capped at level 4.1, newer devices at level 4.2 (for support of 1080p high frame rate videos, i.e. above 30 frames per second). Some devices support higher levels (required for Ultra HD), however.
Post Reply