Example of stuttering HEVC playback on Apple TV 4K

Server Version#: 1.18.8.2468 (FreeBSD ports)
Player Version#: 2.15 (14696) Apple TV 4K

I’ve been encoding my own content with x265 using the following ffmpeg flags, and it has been working fine for well over a year:

-c:v libx265 -tag:v hvc1 -pix_fmt yuv420p10le -preset slow

The mediainfo output results in:

Encoding settings : cpuid=xxxxxxx / frame-threads=4 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / 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 / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / 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=28.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=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=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / cll=0,0 / 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 / no-hdr / no-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

A new source of HEVC video is using a preset which results in the following:

Encoding settings : cpuid=xxxxxxx / frame-threads=4 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x804 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / hist-scenecut=0 / 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 / 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=0:0 / 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=abr / bitrate=2000 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=2 / cplxblur=20.0 / qblur=0.5 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / 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=0 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / cll=0,0 / 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 / hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / 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 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0

On an Apple TV 4k, with or without the ‘Enhanced’ player, the first example works flawlessly, but the second example results in a stream which suffers from severe video stuttering. Both work as expected in the iOS apps on an iPhone Xs Max and iPad Pro.

Cursory differences between the two are: hist-cutscene=0, no-frame-dup, no-sao, abr vs crf, and a few others.

I’ve confirmed the files play back as expected within VLC on the Apple TV.

Does the Plex client use the stock tvOS HEVC decoder when the Enhanced client is disabled?

Yes, when the enhanced player is disabled, the tvOS native AVPlayer is used for decoding/playback.

OK, so the next question is whether the Enhanced player is using the built-in tvOS HEVC decoder also.

There is something specific to the Plex tvOS app and video streams using the second profile which causes this. The only publicly available source I know which exhibits this are the new RARBG x265 encodes.

My lay explanation of what occurs is it appears the background, or a construct which typically matches backgrounds, gets continually reset or bounces back every dozen or so frames.

It would be useful to have confirmation that others have/have not observed this so I can rule my individual setup out.

We utilise the hardware decoder on the Apple TV, but we use our own playback engine (based on mpv).

1 Like

I am having this exact issue. Up until the new encodes I have NEVER experienced this sort of stutter on x265 files. Again, only with TVOS on apple TV.

A sample and logs would be very useful in investigating this :slight_smile:

A specific example: [link removed]

Anything on this list appears to be affected: [link removed]

If it’s not reproducible by an engineer involved with the Plex tvOS development, I can work on collecting appropriate logs.

If you want to provide a sample file, please see our guide here

Logs would also be appreciated up front in case it’s not something we can reproduce, or something specific to your environment

AC-R.HEVC.7z (29.1 MB) This sample exhibits the stuttering within the Plex tvOS application, and plays normally using VLC on the same Apple TV 4K over SMB.

Interested in a resolution to this. I recently started experiencing this with the same x265 movies you’ve been dealing with. I also don’t think this is specific to any one platform. In fact, I think this post, which was “resolved,” is the exact same thing we’re both experiencing. He even posted a video in there depicting the issue.

I’ll take a look at that today :slight_smile:

3 Likes

Hi , I don’t have any logs or data, but I can add some info to the above issue. I too only experience it through Apple TV with X265 files downloaded from RARBG. The same files work without any issues through the PLEX app on my Samsung TV, I only experience the stuttering visuals through PLEX on Apple TV (1080p version) (audio is fine)

Forgive me, is this linked to the issues I’m seeing since updating me apple tv app?

Has an engineer involved with the Plex tvOS client development been able to verify this issue?

We’re still investigating this one, I’m afraid! Hope to have some more information for you soon :slight_smile:

2 Likes

FYI all - if anyone uses Firecore’s INFUSE as an alternate player on tvOS, it also has the same stuttering issue. They are working on it and are going to submit the update to APPLE this week and hopefully push the update to users soon. PLEX, not sure if you have any colleagues over at Firecore, but maybe this can help.

Same problem on 2 seperate Sony Android TVs.
One is 2018 OLED (Shared user) & the other a top end LED from 2015 all running latest Android and Plex MP. Then playback is perfectly fine via the Apple TV 4K on the 2015 Sony… any update on this as yet?

This thread is specifically about the Apple TV having issues.

If you’re having issues with android TV, you will need to create a new thread in the android TV section of the . I can move your post for you if you like.

It’s funny (not Haha) this file has ‘the jerks’ in exactly the same way as the files here:

Now… we’re not allowed to make any kind of assumptions, guesses, or wild-ass-theories, but I have a few - and they all start and end with Plex.