[BUG] HEVC 4K transcoding instead of DirectStream (updated ) - please fix

xbox-one

#1

Hello, Plex team,

This bug is already 3 months old. More and more users are complaining about.
1. First I have reported it on March 23rd. I thought it was related to HEVC and FLAC combination.
2. Now more people facing it here: forums.plex.tv/discussion/323240/2-10-4-4-70-just-broke-4k-on-my-xbox-one-x#latest
3. and here: forums.plex.tv/discussion/319867/all-4k-hevc-content-is-being-transcoded-why#latest
4. and here: forums.plex.tv/discussion/322847/4k-playback-direct-play-xbox-one-x#latest
5. and probably here: forums.plex.tv/discussion/319386/hdr-buffers-like-crazy-also-bitstreaming-hd-audio-is-still-needed#latest
6. and probably here: forums.plex.tv/discussion/304351/xbox-one-s-4k-hevc-ac3-direct-play-for-a-minute-then-override-transcode#latest

Resolution is very simple for those users:
1. Take MKV
2. Convert to MP4/AC3
3. Plex stops switching and never transcodes

Now the stupid bug forces Plex to switch to transcode instead of DirectPlay after 15-30secs. Theory of cause: transcode is probably initiated because of switching to DASH, why switching to DASH occurs nobody knows. When you take resolution steps with MP4, DASH is never used, but HTTP is used as it should be with MKV source.

Please address this issue. This is annoying issue and is ignored for several months now.

Thank you!


#2

It's not being ignored, here's the latest from Plex team posted just a few days ago: https://forums.plex.tv/discussion/comment/1679720/#Comment_1679720

TL;DR: Plex team needs MS to fix a bug in Xbox OS before Plex can begin working on their end of a fix for this issue. MS has their fix in the pipeline.


#3

@wsavona said:
It's not being ignored, here's the latest from Plex team posted just a few days ago: https://forums.plex.tv/discussion/comment/1679720/#Comment_1679720

TL;DR: Plex team needs MS to fix a bug in Xbox OS before Plex can begin working on their end of a fix for this issue. MS has their fix in the pipeline.

Thanks for prompt reply. Though people say that MP4/AC3 is not a solution, I assume this may caused by different Xbox+network+Plex server configurations. Let's wait and see how it performs after fix.

Thanks again.


#4

If anyone wants to roll the dice and see if this issue is fixed yet, the new Xbox alpha build has been released.
https://news.xbox.com/en-us/2018/06/11/new-preview-alpha1806-system-update-6-11-18/


#5

@Soundtweaker said:
If anyone wants to roll the dice and see if this issue is fixed yet, the new Xbox alpha build has been released.
https://news.xbox.com/en-us/2018/06/11/new-preview-alpha1806-system-update-6-11-18/

Nope, no dice. Moussa did say that there was a platform issue coupled with a bug in the plex app. Hopefully whatever MS needed to fix has been and he can now correct it at the plex end.


#6

@"DJ Callyman" said:

@Soundtweaker said:
If anyone wants to roll the dice and see if this issue is fixed yet, the new Xbox alpha build has been released.
https://news.xbox.com/en-us/2018/06/11/new-preview-alpha1806-system-update-6-11-18/

Nope, no dice. Moussa did say that there was a platform issue coupled with a bug in the plex app. Hopefully whatever MS needed to fix has been and he can now correct it at the plex end.

Currently even with skip ahead ( news.xbox.com/en-us/2018/06/11/alpha-skip-ahead-ring-now-open-to-alpha-xbox-insiders/ ), bug is active.


#7

@dxhelios said:
Currently even with skip ahead ( news.xbox.com/en-us/2018/06/11/alpha-skip-ahead-ring-now-open-to-alpha-xbox-insiders/ ), bug is active.

Are you able to specify which bug it is?
1) 4K playback constant buffering

2) HEVC failing to play and falling back to transcoding

Number 1 is the current platform bug looking for the fix, number 2 is the issue I believe is occurring on the Xbox One X's but leads almost instantly into number 1 preventing debugging.


#8

@jmckee said:

@dxhelios said:
Currently even with skip ahead ( news.xbox.com/en-us/2018/06/11/alpha-skip-ahead-ring-now-open-to-alpha-xbox-insiders/ ), bug is active.

Are you able to specify which bug it is?
1) 4K playback constant buffering

2) HEVC failing to play and falling back to transcoding

Number 1 is the current platform bug looking for the fix, number 2 is the issue I believe is occurring on the Xbox One X's but leads almost instantly into number 1 preventing debugging.

Second one. I do not know, the reason, but switching to dash is obvious. And MP4/AC3 is using HTTP, then switching to dash should be the reason of transcoding - this what logic indicates to me. But bugs are not expected to be logical, right? :)
Repro is simple take any 4K/HEVC (will be HDR 99% of the times) movie, makemkv, launch on Xbox One X for 15-30 secs. if you need I can try to record repro.


#9

@dxhelios said:
Second one. I do not know, the reason, but switching to dash is obvious. And MP4/AC3 is using HTTP, then switching to dash should be the reason of transcoding - this what logic indicates to me. But bugs are not expected to be logical, right? :)
Switching to dash is because HEVC is not a valid target for HLS streaming. So if remuxing occurs it needs to switch to DASH to support the HEVC. Basically what you are seeing is it tries to play the original stream as is, the player is rejecting the stream, the app sees the player reject the stream and automatically requests a remux to try and keep playing smoothly. This is where it would then get stuck because of the first bug. But it sounds like that the first bug may have been fixed with the preview.

Repro is simple take any 4K/HEVC (will be HDR 99% of the times) movie, makemkv, launch on Xbox One X for 15-30 secs. if you need I can try to record repro.
This is something we know is happening and how to get it to happen. The problem was that because it was falling back into a transcode it instantly fell into the first bug which meant we couldn't do any follow on debugging because it effectively got stuck immediately after the error.


#10

@jmckee said:

@dxhelios said:
Second one. I do not know, the reason, but switching to dash is obvious. And MP4/AC3 is using HTTP, then switching to dash should be the reason of transcoding - this what logic indicates to me. But bugs are not expected to be logical, right? :)
Switching to dash is because HEVC is not a valid target for HLS streaming. So if remuxing occurs it needs to switch to DASH to support the HEVC. Basically what you are seeing is it tries to play the original stream as is, the player is rejecting the stream, the app sees the player reject the stream and automatically requests a remux to try and keep playing smoothly.

Now i am confused. I have never mentioned HLS. What HLS has to do with it? It is hard to capture behavior and after latest updates - todays console and Xbox One and I have also upgrade Plex Server today - Plex Xbox One player always displays stream type as dash... Bug is present but I will try to nail down the repro. Also when I perform Xbox to PC streaming while playing on Xbox One, HDR content is lost. I think most important first step is to either fix or doublecheck diagnostics stats on Xbox One - displayed information is incorrect - I need manually search through server client logs, this makes repro more difficult. Anyway, I will get back to you as soon as I create repro recording.


#11

@dxhelios said:
Now i am confused. I have never mentioned HLS. What HLS has to do with it?
HLS is the default streaming protocol for almost every Plex App. Previously, there was a problem with the DASH protocol and HEVC streaming that prevented HEVC from working correctly. Because HLS doesn't support HEVC and DASH had a problem HEVC could not be streamed at all before. Now that HEVC in DASH is working HEVC can be streamed instead of force transcoded.

Since you are seeing the DASH Protocal that means your server is direct streaming the video and I would guess transcoding the audio. Most HEVC 4K videos I have seen have TrueHD audio which the Xbox currently cannot play so must be transcoded. Which is why you are seeing the Dash Protocol instead of HLS.

When direct playing you should see the protocol set to HTTP.

It is hard to capture behavior and after latest updates - todays console and Xbox One and I have also upgrade Plex Server today - Plex Xbox One player always displays stream type as dash...
As I mentioned above if you are playing a 4K UHD video with TrueHD/HD audio it almost guaranteed to at a minimum direct stream the video which will switch the protocol from HLS to DASH. This is almost entirely dependent on the media being played along with the settings that are checked in the app.

Bug is present but I will try to nail down the repro.
We already know how to reproduce it, the problem is being able to do any debugging because of the other bug that isntantly locks the stream up.

Also when I perform Xbox to PC streaming while playing on Xbox One, HDR content is lost.
The transcoder does not support HDR to HDR transcoding yet. So anytime the video needs to be transcoded out of HEVC, HDR gets stripped out.

I think most important first step is to either fix or doublecheck diagnostics stats on Xbox One - displayed information is incorrect - I need manually search through server client logs, this makes repro more difficult.
The diagnostic stats on the Xbox One should be correct. If you are seeing something different from what the logs are saying let me know what it is and we can investigate why it's displaying what it is.


#12

App has been updated. Anyone know what the changes are?

Edit: Can confirm that HEVC content still falls back to transcoding.


#13

@dxhelios said:
Currently even with skip ahead ( news.xbox.com/en-us/2018/06/11/alpha-skip-ahead-ring-now-open-to-alpha-xbox-insiders/ ), bug is active.

FYI there hasn't been a separate build released to the skip ahead ring yet. Still the same as Alpha Ring.


#14

@Snail02 said:

@dxhelios said:
Currently even with skip ahead ( news.xbox.com/en-us/2018/06/11/alpha-skip-ahead-ring-now-open-to-alpha-xbox-insiders/ ), bug is active.

FYI there hasn't been a separate build released to the skip ahead ring yet. Still the same as Alpha Ring.

I have newer version anyway.


#15

@jmckee said:

@dxhelios said:
Now i am confused. I have never mentioned HLS. What HLS has to do with it?
that HEVC in DASH is working HEVC can be streamed instead of force transcoded.

Since you are seeing the DASH Protocal that means your server is direct streaming the video and I would guess transcoding the audio.

Clear, I meant DirectStream, not DirectPlay - my bad - updated title.
HLS = HTTP - it is clear now.

When direct playing you should see the protocol set to HTTP.

yes and that is what confused me - I see HTTP, then switch to DASH after 15 secs. I have recording - see below.

Bug is present but I will try to nail down the repro.
We already know how to reproduce it, the problem is being able to do any debugging because of the other bug that isntantly locks the stream up.

Also when I perform Xbox to PC streaming while playing on Xbox One, HDR content is lost.
The transcoder does not support HDR to HDR transcoding yet. So anytime the video needs to be transcoded out of HEVC, HDR gets stripped out.

I think most important first step is to either fix or doublecheck diagnostics stats on Xbox One - displayed information is incorrect - I need manually search through server client logs, this makes repro more difficult.
The diagnostic stats on the Xbox One should be correct. If you are seeing something different from what the logs are saying let me know what it is and we can investigate why it's displaying what it is.

They are incorrect.
1. I have selected AC3 track. Stats show TrueHD.
2. Allow AC3 is set to false. Why? if it plays AC3
3. Allow EAC3 is set to false. Why? If Xbox supports Dolby Digital. Ok, maybe it is work in progress.
4. DirectPlay should not work. Stats show that DirectPlay is true.

Here is the recording: 1drv.ms/v/s!At-xoQr8r-DamPZDWk_LrGNVbmVjyw


#16

@"DJ Callyman" said:
App has been updated. Anyone know what the changes are?

Edit: Can confirm that HEVC content still falls back to transcoding.

Moussa posts the app release notes here:
http://forums.plex.tv/discussion/comment/1684300/#Comment_1684300


#17

@dxhelios said:
They are incorrect.
1. I have selected AC3 track. Stats show TrueHD.
2. Allow AC3 is set to false. Why? if it plays AC3
3. Allow EAC3 is set to false. Why? If Xbox supports Dolby Digital. Ok, maybe it is work in progress.
4. DirectPlay should not work. Stats show that DirectPlay is true.

I spoke with the developers today to get some clarification/confirm what I was thinking.

The settings on the right is part of the shared back end. The allowAC3/eAC3 settings are not present in the Xbox One's because the Xbox One so the diagnostic screen is displaying the default values. They do not actually affect the playback capability on the Xbox One. Because the xbox capabilities are already know there isn't a toggle for codecs it can play. (Codec's it can't play shouldn't ever be a worry because they're already blacklisted by the MDE)

There is definitely something weird going on before hand, is it possible for you to post the log from when you start this video? I think it is only specific to the Xbox One X as I can't get anything similar to reproduce with the Xbox One S (And I don't have an X myself) and with what you gave us and the logs should clear up anything that should (or shouldn't be happening)


#18

The issue where it starts to play in HDR, buffers, switches to transcording, then continues playing without HDR happens on the Xbox One S as well. I have both an X and an S and see the same behavior on both.


#19

@TheRealDeria said:
The issue where it starts to play in HDR, buffers, switches to transcording, then continues playing without HDR happens on the Xbox One S as well. I have both an X and an S and see the same behavior on both.

Can you provide logs showing this?

The only way I can get that to happen on the S is using developer options to force something that should never be happening, so any other data points would be helpful. And even when I do force it into the mode either 1 of 2 things happens: It plays video with no audio and has 0 issues, or the video resets itself every 15 seconds but no actual buffering. The first behavior is what should happen with unsupported audio, the 2nd behavior is because the stream gets killed by the Xbox as it isn't something it is expecting to play. So any additional data points would be useful in determining what is happening as I can't get it to reproduce without forcing specific options that shouldn't be available 'in the wild'


#20

@jmckee said:

@TheRealDeria said:
The issue where it starts to play in HDR, buffers, switches to transcording, then continues playing without HDR happens on the Xbox One S as well. I have both an X and an S and see the same behavior on both.

Can you provide logs showing this?

The only way I can get that to happen on the S is using developer options to force something that should never be happening, so any other data points would be helpful. And even when I do force it into the mode either 1 of 2 things happens: It plays video with no audio and has 0 issues, or the video resets itself every 15 seconds but no actual buffering. The first behavior is what should happen with unsupported audio, the 2nd behavior is because the stream gets killed by the Xbox as it isn't something it is expecting to play. So any additional data points would be useful in determining what is happening as I can't get it to reproduce without forcing specific options that shouldn't be available 'in the wild'

Sure. Let me collect the logs today. I understand scenario with unsupported audio and the issue (that is recorded) is generally fixed with converting to MP4/AC3 partially. You MUST have only one AC3 track and it should be MP4 container. I say partially because if you resume from sleep this may not work, if you switch from HDMI to headphones or back it may not work. I assume there are more bugs/issues related to how Plex works with the platform. I resolve most of the issues by restarting console, but this issue is annoying as requires unnecessary step of converting to MP4/AC3, it takes storage and time to perform.