Awful quality streaming on apple tv whereas ok on laptop

Server Version#: 1.18.3.2156
Player Version#: appletv (the one before the 4K version) and plex server v2.13(14243)

Hello guys,

I used to watch movies streamed on my AppleTv from my PlexMediaServer hosted on an old Macbook Air. Everything was working fine and I have recently moved that setup on a proper Synology 218+ NAS. Now when I watch movies on my AppleTv that are streamed by my NAS, the quality is horrible (encoded to 320p). I have been browsing the web for days now and found a few lead but nothing satisfactory. So let me share with you what I have found in my logs so far:

When playing from my AppleTv, the quality as said above is not good at all and the Apple Tv displays the streaming infos:

Playback settings: Convert to 320p (Play Original quality is available but don’t have any effect)
Technical Details: Source: Transcode Quality 480x240@0.4Mbps

In my server logs, I can see that there seems to be a limitation that forces the server to encode at a lower resolution :

08:49:54.640 - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
08:49:54.640 - MDE: Cannot direct stream audio stream due to profile or setting limitations
08:49:54.641 - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): selected media 0 / 3
08:49:54.642 - Streaming Resource: Calculated bandwidth of 3016kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 720kbps
08:49:54.642 - Streaming Resource: Determining preferred transcode encoders through transcode only decision.
08:49:54.642 - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
08:49:54.644 - Streaming Resource: Reducing playback quality for 685kbps stream bitrate: video resolution to 480x240, audio channels to 2, quality to 24, disable video DS as 5303kbps is > the 541kbps available
08:49:54.646 - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
08:49:54.646 - Scaled maximum bitrate for resolution reduction to 316Kbps.
08:49:54.646 - MDE: Selected protocol hls; container: mpegts
08:49:54.646 - MDE: analyzing media item 3
08:49:54.646 - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): Direct Play is disabled
08:49:54.646 - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): media must be transcoded in order to use the hls protocol
08:49:54.646 - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - video.width limitation applies: 1280 > 480
08:49:54.646 - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
08:49:54.647 - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): Direct Streaming is disabled, so video stream will be transcoded
08:49:54.647 - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): no remuxable profile found, so video stream will be transcoded
08:49:54.647 - MDE: Cannot direct stream video stream due to profile or setting limitations
08:49:54.647 - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
08:49:54.647 - Scaled maximum bitrate for resolution reduction to 316Kbps.

What’s funny is that when I play the exact same media it from a recent laptop in a browser from my NAS, everything goes well, technical details of the streaming below:

Media

  • Duration 2:10:04
  • Bitrate 1728 kbps
  • Width 1280
  • Height 640
  • Aspect Ratio 1.85
  • Video Resolution 720p
  • Container MP4
  • Video Frame Rate 24p
  • Web Optimized No
  • Audio Profile lc
  • Video Profile high

Part

  • Duration 2:10:04
  • File Green.Book.2018.720p.BluRay.H264.AAC-RARBG.mp4
  • Size 1.57 GB
  • Audio Profile lc
  • Container MP4
  • Web Optimized No
  • Video Profile high
  • Codec H264
  • Bitrate 1499 kbps
  • Bit Depth 8
  • Chroma Location left
  • Chroma Subsampling 4:2:0
  • Coded Height 640
  • Coded Width 1280
  • Frame Rate 23.976 fps
  • Height 640
  • Level 4.1
  • Profile high
  • Ref Frames 4
  • Stream Identifier 1
  • Width 1280
  • Display Title 720p (H.264)
  • Codec AAC
  • Channels 6
  • Bitrate 229 kbps
  • Language English
  • Audio Channel Layout 5.1
  • Profile lc
  • Sampling Rate 48000 Hz
  • Stream Identifier 2
  • Display Title English (AAC 5.1)

The logs are attached here : Plex Media Server.log (296.4 KB)

From my AppleTv (the one causing issue): starts at 08:49:54.640
From my browser (the one working): starts at around 08:59:23

I have searched for this audio limitation, etc, try to check every settings everywhere, but I think it is time for me to get fresh eyes on that issue!

Do you have an idea of what’s going on ?

Thank you!

Somewhere, you’ve got a bandwidth/quality limitation specified which it is bumping into. There are a couple places to check for this.

  • On the server itself, under Settings -> Remote Access. See what “Limit remote stream bitrate” is configured as. Note: You may not have this setting as it is Plex Pass-only (your forum handle doesn’t show you as having one).
  • In the Plex app settings on the Apple TV under Video Quality, see if “Home streaming” or “Internet streaming” are set such that it would limit stream quality. Also, make sure “Auto Adjust Quality” is off.

It’s behaving as if it thinks the Apple TV is on a remote network and is throttling video quality to accommodate configured bandwidth restrictions. Do you have multiple networks, with the Apple TV being on one and the Plex Media Server running on the other?

2 Likes

Hi there, thank you for your prompt reply.

I don’t have any PlexPass indeed so I am now wondering how my Plex behaves?
Regarding your second suggestion, Home Streaming is at Maximum, Internet Streaming at Maximum, and Auto Adjust Quality deactivated. Btw in Audio Quality, Internet Streaming is set to Original.

My Apple Tv is plugged through ethernet to my apple airport extreme, so is my NAS.
The setup that works is when I watch from my laptop browser which is also connected to my airport extreme over wifi this time. That setup works and there is no bandwidth restriction obviously. The movie is the same and also stored on my NAS.
And what I don’t understand is that when I bring back to life my old plex server on my old macbook air as a plex server (connected to my airport extreme over wifi too), I can watch my movie without any trouble on the apple tv connected as a plex client to my macbook air. The problem seems to be happening between my Apple Tv and the NAS only, and it is driving me crazy!

So, in short:

[AppleTvPlexClient]–ethernet–{AirportExtremeRouter}–ethernet–[NASPlexServer] => restriction
[MacBookProPlexClient]–wifi–{AirportExtremeRouter}–ethernet–[NASPlexServer] => OK
[AppleTvPlexClient]–ethernet–{AirportExtremeRouter}–wifi–[MacBookAirPlexServer] => OK

I have 2 different wifi network but the only wifi connection I share across these 3 set-ups is the one exposed by the airport extreme on 5Ghz. The only thing I was thinking of was the limitation of the audio capabilities of my HDMI + tv audio combo that would trigger a video compression (as it seems to be the case sometimes - video also compressed because of audio limitation). that’s why I put back my old setup to make sure it was also working - as I changed TV also.

What do you think?
Thanks for your help.

By the way, as you have raised the question of the multiple networks, it kinda make me think that I might be missing something (related to the multiple networks I had), and as I wanted to get rid of my airport extreme for some time, I removed it and I am not relying on a TPLink router only (it was my internet provider before only). So my setup has evolved to:

[AppleTvPlexClient]–ethernet–{TPLinkRouter}–ethernet–[NASPlexServer] => restriction
[MacBookProPlexClient]–wifi–{TPLinkRouter}–ethernet–[NASPlexServer] => OK

Still the same


I have declared permanent lease on my NAS: 192.168.1.10, and same on my AppleTv: 192.168.1.11.

My macbook pro is playing the movie from: http://192.168.1.10:32400/, and once again it works well.

Something is triggering a bandwidth limit of 720 kbps. Have a look in the Preferences.xml file in your Plex data directory (this article will show you where that is). See if you have these two parameters listed there:

WanPerStreamMaxUploadRate
WanTotalMaxUploadRate

If so, what are their values? Though, really, those values shouldn’t have any impact on devices on the same network. Can you do a test where you connect your Apple TV to your network via Wi-Fi?

May I have the complete logs ZIP of both sessions,
Created as:

  1. With system as quiescent as possible,
  2. Start Playback
  3. Play 30 seconds
  4. Stop
  5. Wait 30 seconds for logs to flush
  6. Play next for 30 seconds
  7. Stop
  8. Wait another 30 for logs to flush
  9. Settings -Server - Troubleshooting - Download Logs
  10. Attach the ZIP file

I am looking for the MDE decisions. These will tell me what PMS and the player negotiated. I can then provide the answers why the difference occurs.

1 Like

@pshanew, I have checked my xml and there are no such keys in the file. Here are the interesting ones though:

TranscoderQuality="0" 
TranscoderH264BackgroundPreset="veryfast" 
TranscoderTempDirectory="" 
PubSubServer="139.162.75.196" 
PubSubServerRegion="hnd" 
TranscodeCountLimit="0"

I tried with Wi-Fi only and I have the same issue.

@ChuckPa, I have gone through the steps you mentioned, here are the timestamps for your reference.

A around 23:49:37.021, the session that works
At around 23:51:48.155, the session with limitation

Fresh logs attached.

Plex Media Server Logs_2020-02-17_23-53-35.zip (3.2 MB)

Thank you guys

1 Like

Just wanted to add that we have two Apple TVs with the Plex App. Both work very well. One is a Apple TV 4 Gen and the other is an Apple TV 4K. Both connect to my Synology DS 416 Play running Plex Media Server. Both of the Apple TV use wifi to connect. The Synology is connected to our home network with ethernet. We used to have stalling problems but the connecting the NAS with ethernet instead of a PowerLine connection solved these stalling issues. Also our PMS has taken on a whole new level of performance since I upgraded our NAS from 1 GB of RAM to 8 GB of RAM. Hope this helps and good luck getting to your speed/quality issues.

1 Like

Thanks for the logs.

Reviewing them I see:

eb 17, 2020 23:51:48.155 [0x7f8a23fef700] DEBUG - MDE: Selected protocol hls; container: mpegts
Feb 17, 2020 23:51:48.155 [0x7f8a23fef700] DEBUG - MDE: analyzing media item 3
Feb 17, 2020 23:51:48.155 [0x7f8a23fef700] DEBUG - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
Feb 17, 2020 23:51:48.155 [0x7f8a23fef700] DEBUG - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
Feb 17, 2020 23:51:48.155 [0x7f8a23fef700] DEBUG - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
Feb 17, 2020 23:51:48.155 [0x7f8a23fef700] DEBUG - MDE: Cannot direct stream audio stream due to profile or setting limitations
Feb 17, 2020 23:51:48.155 [0x7f8a23fef700] DEBUG - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): selected media 0 / 3
Feb 17, 2020 23:51:48.156 [0x7f8a23fef700] DEBUG - Streaming Resource: Calculated bandwidth of 3016kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 720kbps
Feb 17, 2020 23:51:48.156 [0x7f8a23fef700] DEBUG - Streaming Resource: Determining preferred transcode encoders through transcode only decision.
Feb 17, 2020 23:51:48.156 [0x7f8a23fef700] DEBUG - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
Feb 17, 2020 23:51:48.158 [0x7f8a23fef700] DEBUG - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
Feb 17, 2020 23:51:48.158 [0x7f8a23fef700] DEBUG - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
Feb 17, 2020 23:51:48.159 [0x7f8a23fef700] DEBUG - Streaming Resource: Reducing playback quality for 685kbps stream bitrate: video resolution to 480x240, audio channels to 2, quality to 24, disable video DS as 5303kbps is > the 541kbps available
Feb 17, 2020 23:51:48.159 [0x7f8a23fef700] DEBUG - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
Feb 17, 2020 23:51:48.159 [0x7f8a23fef700] DEBUG - Scaled maximum bitrate for resolution reduction to 316Kbps.
Feb 17, 2020 23:51:48.159 [0x7f8a23fef700] DEBUG - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
Feb 17, 2020 23:51:48.159 [0x7f8a23fef700] DEBUG - Scaled maximum bitrate for resolution reduction to 316Kbps.
Feb 17, 2020 23:51:48.162 [0x7f8a23fef700] DEBUG - MDE: Selected protocol hls; container: mpegts
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: analyzing media item 3
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): Direct Play is disabled
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): media must be transcoded in order to use the hls protocol
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - video.width limitation applies: 1280 > 480
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): Direct Streaming is disabled, so video stream will be transcoded
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): no remuxable profile found, so video stream will be transcoded
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor.
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - Scaled maximum bitrate for resolution reduction to 316Kbps.
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - Green.Book.2018.720p.BluRay.H264.AAC-RARBG - audio.channels limitation applies: 6 > 2
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: Cannot direct stream audio stream due to profile or setting limitations
Feb 17, 2020 23:51:48.163 [0x7f8a23fef700] DEBUG - MDE: Green.Book.2018.720p.BluRay.H264.AAC-RARBG (2018): selected media 0 / 3

Here you can see the transcoder scaling up the bitrate to as it normally does but then it clamps back down due to the target resolution.

In the player (AppleTV) you should have “Original Quality” or “Maximum” (I use maximum). You should also have the checkbox play smaller videos at original quality.

While I have an AppleTV 4K, the other AppleTV models should also still have good hardware in them. This said, I can push 100+ Mbps at the 4K without it blinking. There is no reason any AppleTV cannot handle this.

As stated above, Verify the streamlng settings.
Also, in the AppleTV app, Verify those settings are up as well. The 20 Mbps setting is more than adequate. If the Network and AppleTV cannot handle 20 Mbps, I will reluctantly assert this isn’t really Plex’s problem. I think diagnosis should begin at the network to stress test it and the device itself to verify it’s fully up to 13.3 tvOS firmware revision.

Hey,

Sorry for my late reply.

Streaming Resource: Calculated bandwidth of 3016kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 720kbps Streaming Resource: Determining preferred transcode encoders through transcode only decision. Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor. Streaming Resource: Reducing playback quality for 685kbps stream bitrate: video resolution to 480x240, audio channels to 2, quality to 24, disable video DS as 5303kbps is > the 541kbps available Scaled up video bitrate to 2248Kbps based on 1.500000x fudge factor. Scaled maximum bitrate for resolution reduction to 316Kbps.

I am a bit lost here: does it mean that the transcoder will try to send an upscaled video of 2248 over the network with a bandwidth capacity of 3016, which looks ok at first. Then it somehow hits a limit saying that the bandwidth is only 720, so must adapt the 2248 video bitrate to something that ends up being a 316 bitrate video ? Am I right?

Changing decision parameters provided by client to fit bandwidth limit of 720kbps
=> is this guy the culprit that starts thw whole downscaling process ?
In that case, it seems to be coming from the AppleTv ?

I am trying to understand who gives this limitation, is it the network or the apple tv ? As stated before my old MacBookAir can send the video without any issue on this apple tv which I believe means the apple tv is perfectly capable to give a workable bandwidth with no limitation. Also, the same NAS can stream the video over the network to my macbookPro so it means the network is also able to sustain the load. What makes this specific association (NAS <-> AppleTv) behaving differently?

Just for my understanding:

  1. What is this line doing exactly ? does it trigger the video transcoding ? audio.channels limitation applies: 6 > 2

  2. And do we know why the transcoder upscales at all at first (why is that a normal behavior)?

Edit: I don’t have the options you are mentioning on my appleTv regarding the smaller videos. What are the streaming settings I have to check exactly ?

Thank you!

You need to go the Plex app settings screen, not the Apple TV settings app.

Checked but still can’t find it. Is that supposed to be available on all versions that are recent enough ?

A few more hints, I have checked the logs of my PlexClient on my AppleTv:

logging (2).zip (894.2 KB)

2020/02/25 19:44:58.686 (218 MB) (2856417) :heavy_minus_sign: PMKPlaybackSession.m:410 | Play decision: {
directPlay = “3000 - This app cannot play this item. The reason is: audio.channels limitation applies: 6 > 2.”;
general = “1001 - Direct play not available; Conversion OK.”;
transcode = “1001 - Direct play not available; Conversion OK.”;
}

2020/02/25 19:44:58.996 (218 MB) (2856417) :heavy_minus_sign: PMKPlaybackSession.m:410 | Play decision: {
directPlay = “3000 - App cannot direct play this item. Direct play is disabled.”;
general = “1001 - Direct play not available; Conversion OK.”;
transcode = “1001 - Direct play not available; Conversion OK.”;
}

2020/02/25 19:44:59.031 (218 MB) (2856417) :heavy_minus_sign: PMKPlaybackOptions.m:516 | Maximum video bitrate capped by server ‘PeterPlex’ to 1000 because of ‘relay’: a direct connection to the server is not available

So the interesting part starts at 2020/02/25 19:44:58.

The configuration problem is in the Apple TV Plex client app. I have two Apple TVs and the quality was bad on both, including stuttering video. The solution for me was to edit the video settings in the Apple TV Plex client app. It took a few attempts to find the settings in the client. I’m not sure why it’s in the Account section, but once found, OK. I turned off Direct, adjusted my video down one setting from Maximum, and everything plays beautifully. I know I should have made one change at a time. I’ll go back and troubleshoot it discretely. But honestly after chasing this for a week. I am real happy to have found this solution.

1 Like

Thank you for your reply, I have to say you gave me hope when I read your post, but it didn’t work for me.
It looks like this specific association between my NAS and my AppleTv doesn’t work where the NAS and the AppleTv are working separately with other devices (AppleTv with another plex server, and my NAS with another plex client).
@ChuckPa, do you have any hint on my questions ?

Thanks!

Just getting to read back through this now and review using my AppleTV.
P;lease give me a few minutes.

I’m sorry, It will be some time before I can go further in this.

  1. I cannot play anything on tvOS. It blames the transcoder
  2. The transcoder states I have no HW acceleration (which is incorrect).
  3. It just dies without error code.

Aouch, thank you for this ChuckPa, let me know how it goes.

Ok, I’m back.

Never forget rule #1 - DO NOT USE PRODUCTION FOR DEVELOPMENT! :man_facepalming: :rofl:

Here’s a picture from my AppleTV, with geek overlay enabled.
There’s a lot of great info in that overlay.

Hello @ChuckPa, want to point me to something specific ?
Seems to be working fine on your side!