I’ve been running PMS on my WD MyCloud EX2 for some time, and it generally does pretty well. Sometime ago, I converted my entire library to HVEC in MKV, with some files having AC3 5.1 tracks. I had tested all of these things prior with Plex before going ahead with converting 1500+ files. A few months back now, I have not been able to play any HVEC MKV file that has AC3 5.1 selected on my Xbox One without triggering transcoding (which is what I was aiming to avoid by going MKV). It will Direct Play the same files with the AAC stereo track selected. I do know for sure this configuration worked before, or I would have never gone through the work to change all of my files to it. Does anyone have any clues as to what I’ve lost to lose the ability to play 5.1 movies with Plex?
Also, I have confirmed the files play fine with the native player on Xbox One, with the 5.1 track selected via DLNA.
The original Xbox One cannot direct stream HEVC. So anytime incompatible audio is met the video will need to be transcoded from HEVC to H264. The media player framework currently chokes really hard if an audio track that is not the first audio track is selected. Because of that anytime a secondary audio track is selected the file is remuxed so that the selected track becomes the primary track. If this is what is happening with your files then the HEVC will need to be transcoded as it can’t be sent to the Xbox One directly unless the file is fully direct played.
If that’s not the case we would need to see your logs when playing one of the problem files to try and see what is happening. AC3 and 5.1 channels should not trigger a remux/transcode by themselves so something else might be interfering with the playback.
I realize that there is a difference between Direct Play and Direct Stream, but I’d be remiss if I claimed to be good and saying which is which. I’ll attempt to clarify if I can, perhaps that will help my own understanding. Though I can say I’ve never seen my Xbox One play in anyway from my NAS unless it was via Direct Play.
Original Xbox One
Most of my files that have AC3 are secondary audio, but I have others that are primary.
Will only play HVEC MKV with secondary audio AC3 5.1 track selected through the native Media Player app provided by Microsoft. Will not play with Plex, will always attempt to transcode.
Will play the same HVEC MKV with the primary AAC track selected with Plex or Native plater.
If I play a different file, also HVEC MKV, that has a primary audio track that is AC3 5.1, Plex will play it via Direct Play without issue.
I suppose my confusion is why is it that the native Media Player can play the HVEC MKV and it’s second audio track without issue, but Plex cannot do the same? This is by no means a dig at Plex or anything else, but more of my own understanding. Googling this info is near impossible due to the common terms it covers.
I can’t say why it doesn’t work when accessing the media player framework, but what I can say is that when you try to direct play a secondary audio track via the app it actually causes the media player to reset roughly every 8 seconds. In normal playback the app would detect the crash and start transcoding, but because I was testing modes I forced it to continue direct playing but saw the same problem consistently and constantly.
Some terminology clarification:
Direct play - the en tire file is sent as is to the Xbox One for playback, almost like a simple file transfer.
Direct Stream - the specific stream is copied into the new container without conversion.
Sadly, it sounds like what you are seeing is exactly the behavior that should be happening. Audio tracks that are not primary need to remux to avoid the above problem. I can’t say if the limitation on HEVC direct streaming is because of the older hardware or a framework limit, but Moussa was unable to get HEVC streaming to work on the 1st gen Xbox One’s, but direct streaming does work. This is what forces those HEVC streams to try and transcode.
If you’re comfortable with ffmpeg, the following line is what I use to actually swap the first and second audio track to make things direct playable:
ffmpeg -i “input file” -map 0:0 -map 0:2 -map 0:1 -vcodec copy -acodec copy -disposition:a:0 default “output file.fixed”
Just make sure you add either .fixed or something else to the output name so ffmpeg does not try and read and write to the same file or it will delete the file.
Ok, I think I follow. So it’s a limitation in Microsoft’s API/Framework for playing the media from other apps outside the Native Player app. Fair enough. I believe I had chosen to start making the AC3 tracks the secondary track due to issues with Gen 2 Fire Stick playback of a similar issue, but I haven’t revisited that in a while, so I’ll likely use the ffmpeg command you gave me and switch them around.
I really appreciate your help and patience. Thanks for clarifying everything.
Oops, looking back at the command I was missing default after the -disposition tag. That tag is what sets the new 1st track as the default track. I had issues where if I swapped them without switching the default track and that was how I fixed them. I updated the previous post and here is the updated command as well:
Helo, Just seeing if there is any way to know the details to create a profile for xbox one s to allow 4k and hdr correctly.
had a stunning image through dlna via plex on xbox one s then crashed after 25 minutes and couldnt get it running again so had to watch it through the app with dulled out hdr.
I have also tried converting the files however it took 5 hours to do 3 minutes of film using ffmpeg and also handbrake so assume i was either using wrong settings or its going to take days to convert one file
The command above your post is what I use. If you want a version that moves the original audio track to track 2 and also converts a version to AC3 in te primary audio track, this is what I use:
ffmpeg -i In.mkv -map 0:v -c:v:0 copy -map 0:1 -ab 640k -ac 6 -c:a:0 ac3 -map 0:1 -c:a:1 copy -disposition:a:0 default Out.mkv
If the conversion is taking any more than 5-10 minutes something is wrong. The video stream should be copying with no conversion so it should be relatively quick between converting audio and simply duplicating the video stream.
On the Xbox One S if you are seeing dulled out HDR it means the server is transcoding the video. Currently, there are only a couple of things that can cause the server to transcode the video stream. Image based subtitles, bandwidth limitation, and direct play/stream disabled. The logs would point out for sure what is causing the problem for an easier diagnosis.
Are you using the handbrake GUI? As far as I know there is no way to passthrough a video stream and instead it will re-convert/compress every video stream you feed into it.
If you need a tool with GUI support mkvmerge would work better as it allows you to move the streams around without having to reconvert the video stream.
OK been messing around today and now have it working through mkvtools which i am removing the HD audio and keeping the video which is still in HVEC form.
cant get anything else to work which is irritating…