Page 1 of 1

HEVC levels

PostPosted: Thu Apr 11, 2019 9:22 pm
by dash
My TV supports HEVC but only up to level 4.0. I have a lot of videos (MKV) that are Main/4.1, which my TV point blank refuses to attempt to play.

Transcoding doesn't work very well for me as my TV struggles with the timings (it thinks videos are all 1 second long, and if I try to fast forward it gets to the end of the stream instantly and skips to next file). Plus I'm loathe to transcode when I don't need to!

What I've tried is to add levelGreaterThan="4.0" to the relevant <match> node in my profile, but this doesn't seem to work and it matches all h.265 streams irrespective of profile level. Looking through the default profiles this attribute isn't used elsewhere, so I assume it's only supported for h.264?

Does anybody have any suggestions how I can handle this?

Re: HEVC levels

PostPosted: Thu Apr 11, 2019 10:37 pm
by DenyAll
Profiles and profile levels is not supported for HEVC. Perhaps request it via bit bucket?

Levels above 4.1 for HEVC can often be associated with UHD resolutions (but not exclusively). Is you source video greater resolution than 1920x1080? If so, you can transcode based on that.

Re: HEVC levels

PostPosted: Fri Apr 12, 2019 3:31 pm
by zip
also, can you post ffmpeg -i of the file?

Re: HEVC levels

PostPosted: Tue Apr 23, 2019 1:53 pm
by dash
I doubt it needs to be encoded against 4.1 as it's only HD, but it is.

Output as requested:

  Code:
ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-libfdk_aac --enable-nonfree --enable-libx264 --enable-libx265 --enable-libxvid
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    CREATION_TIME   : 2016-10-27T06:10:29Z
    ENCODER         : Lavf56.1.0
  Duration: 00:44:43.69, start: 0.000000, bitrate: 2770 kb/s
    Chapter #0:0: start 0.000000, end 62.062000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 62.062000, end 589.923000
    Metadata:
      title           : 00:01:01.895
    Chapter #0:2: start 589.923000, end 1029.028000
    Metadata:
      title           : 00:09:49.798
    Chapter #0:3: start 1029.028000, end 1608.607000
    Metadata:
      title           : 00:17:08.986
    Chapter #0:4: start 1608.607000, end 2388.219000
    Metadata:
      title           : 00:26:48.607
    Chapter #0:5: start 2388.219000, end 2639.470000
    Metadata:
      title           : 00:39:48.094
    Chapter #0:6: start 2639.470000, end 2676.841000
    Metadata:
      title           : 00:43:59.220
    Chapter #0:7: start 2676.841000, end 2683.598000
    Metadata:
      title           : 00:44:36.799
    Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 2151891
      BPS-eng         : 2151891
      DURATION        : 00:44:43.640000000
      DURATION-eng    : 00:44:43.640000000
      NUMBER_OF_FRAMES: 64343
      NUMBER_OF_FRAMES-eng: 64343
      NUMBER_OF_BYTES : 721862679
      NUMBER_OF_BYTES-eng: 721862679
      _STATISTICS_WRITING_APP: mkvmerge v9.6.0 ('Slave To Your Mind') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.6.0 ('Slave To Your Mind') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-02-10 05:35:42
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-02-10 05:35:42
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      title           : Surround
      BPS             : 615646
      BPS-eng         : 615646
      DURATION        : 00:44:43.691000000
      DURATION-eng    : 00:44:43.691000000
      NUMBER_OF_FRAMES: 125798
      NUMBER_OF_FRAMES-eng: 125798
      NUMBER_OF_BYTES : 206525682
      NUMBER_OF_BYTES-eng: 206525682
      _STATISTICS_WRITING_APP: mkvmerge v9.6.0 ('Slave To Your Mind') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.6.0 ('Slave To Your Mind') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-02-10 05:35:42
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-02-10 05:35:42
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: ass
    Metadata:
      BPS             : 97
      BPS-eng         : 97
      DURATION        : 00:43:26.028000000
      DURATION-eng    : 00:43:26.028000000
      NUMBER_OF_FRAMES: 538
      NUMBER_OF_FRAMES-eng: 538
      NUMBER_OF_BYTES : 31738
      NUMBER_OF_BYTES-eng: 31738
      _STATISTICS_WRITING_APP: mkvmerge v9.6.0 ('Slave To Your Mind') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.6.0 ('Slave To Your Mind') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-02-10 05:35:42
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-02-10 05:35:42
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Re: HEVC levels

PostPosted: Fri Apr 26, 2019 5:33 pm
by zip
ffmpeg doesn't seem to output the level (only profile)

Re: HEVC levels

PostPosted: Sat Apr 27, 2019 2:18 pm
by dash
As far as I can tell, it doesn't for h.264 either:
  Code:
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x480 [SAR 629:720 DAR 629:480], SAR 159:182 DAR 477:364, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)


There are some levels shown if you use ffprobe -show_streams, but the numbers don't seem to resemble profile levels.

I've used mediainfo to get level information:

e.g.
  Code:
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L4.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 44 min 43 s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
  ... trimmed ...

Re: HEVC levels

PostPosted: Sat Apr 27, 2019 3:09 pm
by zip