4K HDR stuttering on CE Amlogic-ng

Bug report


4K HDR10 encodes with Amlogic-ng stutter

With CoreELEC Amlogic-ng builds, encodes of 4K HDR10 movies stutter, both on latest nightly and stable. Older Amlogic, S905X, S912 etc are not affected as I’ve verified it on S905X running latest stable 9.2.0 build. All samples play fine in VLC on a PC and my Samsung TV’s internal player. I’ve in addition remuxed the samples to not include TrueHD Atmos tracks, yet the stuttering still occur and are not related to audio tracks in the samples.

To Reproduce


Steps to reproduce the behaviour:

  1. Download any of the samples over at GD: CE Aml-ng playing 4K HDR encodes stutter.
  2. Play any one of them on CE Amlogic-ng device (S905X2, S922X…)
  3. Play any one of them on CE Amlogic device (S905, S912…)

Debuglog


I did not enable logging, so I don’t have a debug log. However, here is another user’s debug log from playback of another encode with stuttering (http://ix.io/1ZKj) from the post in Odroid N2 test builds.

Mediainfo


Sample 01 - Fast And Furious Presents Hobbs And Shaw (2019) - 2160p x265 HDR10 TrueHD Atmos 7.1
General
Unique ID                                : 7572961118244338775950015180609136953 (0x5B27FCF68359D1473FFF9984E6BA939)
Complete name                            : Fast And Furious Presents Hobbs And Shaw (2019) - 2160p x265 HDR10 TrueHD Atmos 7.1.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 232 MiB
Duration                                 : 1mn 40s
Overall bit rate mode                    : Variable
Overall bit rate                         : 19.4 Mbps
Encoded date                             : UTC 2019-11-07 23:25:14
Writing application                      : mkvmerge v39.0.0 ('In The Waiting Line') 64-bit
Writing library                          : libebml v1.3.9 + libmatroska v1.5.2

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1mn 40s
Bit rate                                 : 15.9 Mbps
Width                                    : 3 840 pixels
Height                                   : 1 604 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.108
Stream size                              : 190 MiB (82%)
Writing library                          : x265 3.2+8-7fc1f6ef2b96:[Windows][GCC 9.2.1][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=5 / numa-pools=32,0 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1604 / interlace=0 / total-frames=196646 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=4 / selective-sao=0 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=17.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50) / cll=1000,419 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 419 cd/m2

Audio #1
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1mn 40s
Bit rate mode                            : Variable
Bit rate                                 : 2 750 Kbps
Maximum bit rate                         : 5 394 Kbps
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 KHz
Frame rate                               : 1 200.000 fps (40 SPF)
Compression mode                         : Lossless
Stream size                              : 32.9 MiB (14%)
Title                                    : English TrueHD
Language                                 : English
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1mn 40s
Bit rate mode                            : Constant
Bit rate                                 : 640 Kbps
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 KHz
Frame rate                               : 31.250 fps (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 7.65 MiB (3%)
Title                                    : English
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Text #1
ID                                       : 4
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 1mn 23s
Bit rate                                 : 79 bps
Count of elements                        : 22
Stream size                              : 830 Bytes (0%)
Title                                    : English SDH
Language                                 : English
Default                                  : No
Forced                                   : No

Text #2
ID                                       : 5
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1mn 23s
Bit rate                                 : 53.8 Kbps
Count of elements                        : 44
Stream size                              : 548 KiB (0%)
Title                                    : English PGS
Language                                 : English
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : en:Chapter 01
Sample 02 - Scary Stories to Tell in the Dark (2019) - 2160p x265 HDR10 TrueHD Atmos 7.1
General
Unique ID                                : 144672874706683583883615777738335259040 (0x6CD6FB6E6EC1F36FB3F7B4D2615D09A0)
Complete name                            : Scary Stories to Tell in the Dark (2019) - 2160p x265 HDR10 TrueHD Atmos 7.1.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 88.5 MiB
Duration                                 : 1mn 25s
Overall bit rate mode                    : Variable
Overall bit rate                         : 8 652 Kbps
Encoded date                             : UTC 2019-11-07 23:22:27
Writing application                      : mkvmerge v39.0.0 ('In The Waiting Line') 64-bit
Writing library                          : libebml v1.3.9 + libmatroska v1.5.2

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1mn 25s
Bit rate                                 : 6 125 Kbps
Width                                    : 3 840 pixels
Height                                   : 1 612 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.041
Stream size                              : 62.6 MiB (71%)
Writing library                          : x265 3.2+9-971180b100f8:[Windows][GCC 9.2.1][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=4 / numa-pools=20 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1612 / interlace=0 / total-frames=155276 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=4 / selective-sao=0 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=17.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,0) / cll=1000,235 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0000 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 235 cd/m2

Audio #1
ID                                       : 2
Format                                   : MLP FBA
Format/Info                              : Meridian Lossless Packing FBA
Commercial name                          : Dolby TrueHD
Codec ID                                 : A_TRUEHD
Duration                                 : 1mn 25s
Bit rate mode                            : Variable
Bit rate                                 : 1 781 Kbps
Maximum bit rate                         : 3 150 Kbps
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 KHz
Frame rate                               : 1 200.000 fps (40 SPF)
Compression mode                         : Lossless
Stream size                              : 18.2 MiB (21%)
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1mn 25s
Bit rate mode                            : Constant
Bit rate                                 : 640 Kbps
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 KHz
Frame rate                               : 31.250 fps (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 6.55 MiB (7%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Text #1
ID                                       : 4
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 33s 992ms
Bit rate                                 : 56.2 Kbps
Count of elements                        : 23
Stream size                              : 233 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

Text #2
ID                                       : 5
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 33s 992ms
Bit rate                                 : 68.2 Kbps
Count of elements                        : 27
Stream size                              : 283 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 6
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 34s 76ms
Bit rate                                 : 60.0 Kbps
Count of elements                        : 21
Stream size                              : 249 KiB (0%)
Language                                 : Spanish
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : en:Chapter 01

CoreELEC version and device


Amlogic-ng
CoreELEC nightly version: CoreELEC-Amlogic-ng.arm-9.2-nightly_20191107-Odroid_N2
CoreELEC stable version: CoreELEC-Amlogic-ng.arm-9.2.0-Odroid_N2
Device: ODROID-N2 4GB
Device Tree: Regular Odroid S922X

Amlogic (old)
CoreELEC stable version: CoreELEC-Amlogic.arm-9.2.0-Generic
Device: Mecool M8S Pro+ (S905X)
Device Tree: gxl_p212_2g

Confirm that this problem exists.

The stuttering does not occur in Android (selfinstall-odroidn2-eng-s922_9.0.0_master-91-20191028) with the following applications tested:

  • Kodi
  • VLC
  • mpv
  • MX Player
  • Video Player

As I can’t select bit depth/colour subsampling in Android, I used YCbCr444 36bit vs YCbCr444 30bit used in CoreELEC.

@CI6N0Z I have just tested the Fast and Furious sample on our experimental kernel that we are working on and there is no stutter.

There is no ETA for this to be rolled out yet unfortunately.

1 Like