BUG: Strange behavior of Recommended settings for original video quality

ios

#1

I have some 1080p movies and their bitrates are only 7-8 Mbps for video. Including audio stream should not exceed 20 Mbps by any means.

Incorrect bitrate for Recommended setting?

The first issue is that Recommended setting doesn’t seem to work correctly for these low rate video streams. Here are some steps to reproduce. The only way to get them direct play was to use Maximum (20 Mbps) instead of Recommended setting.

  1. Use Recommended settings for video streaming (Settings - Video Quality - Home Streaming - Recommended)
  2. Play any 1080p movie, then it’s being transcoded to 20 Mbps as if it’s set to Maximum.
  3. Manually select Play Original Quality in the Playback Settings would fix it (direct play / streaming rather than transcoding)
  4. Then if you go back to Settings, Home Streaming is now set to Maximum instead of Recommended.
  5. Play any 1080p movie, then it’s being transcoded again like step 2 above.
  6. Now it’s repeating step 3 and so on.

.

Incorrect bitrate for Chromecast?

Now there’s another issue when casting them to Chromecast. Casting 1080p with either Recommended or Maximum settings would always lead to transcoding and it seems like the app fails to pick up correct bitrates for “original video quality”. Here are steps to reproduce.

  1. Play any 1080p movie and start casting, then the movie is being transcoded to 20 Mbps. Interestingly, Playback Settings show Play Original Quality as 20 Mbps when it’s supposed to be much lower like 7-8 Mbps.

  1. Select Play Original Quality then the list suddenly changes its title to “Original” from “20 Mbps”. Now movie is on direct play.

The issue looks like iOS specific since there was no problem when casting from Chrome browser on the desktop.


#2

Hi there, I have the same problem. Would be cool if it could be fixed


#3

+1. Same issue here.


#4

Is there any news ?


#5

I have no idea if the dev has ever read this report.


#6

On apple TV this is working perfectly... may some plex iOS dev get there one day :pensive:


#7

@tomyun could you reproduce the issue again and immediately after share the server and iOS logs?

Instructions for Server logs: https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files
Instructions for iOS logs: https://support.plex.tv/hc/en-us/articles/201636593-iOS-Logs

Those should say why it decided to transcode instead of direct play.


#8

@sergiou87 just sent a message with the logs.


#9

Thanks @tomyun !

This is what the logs say:

Oct 28, 2017 13:30:08.921 [0x700004426000] DEBUG - MDE: **********************: no direct play video profile exists for http/mkv/h264/flac
...
Oct 28, 2017 13:30:08.921 [0x700004426000] DEBUG - Streaming Resource: Reached Decision id=11976 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. No direct play video profile exists for protocol http, with container mkv, and video codec h264. Transcode=1001,Direct play not available; Conversion OK.) media=(id=12077 part=(id=12081 decision=transcode container=mpegts protocol=hls streams=(Video=(id=12132 decision=copy width=1920 height=1080) Audio=(id=12133 decision=transcode bitrate=258 encoder=aac_at channels=2 rate=48000) Subtitle=(id=14593 decision=transcode bitrate=2147483647 encoder=webvtt languageCode= location=segmented))))

The problems with that file I see are:
1) the file is mkv and Apple's video player cannot play it, so Direct Play is not supported and at least requires Direct Stream (remux the video)
2) the audio track is FLAC for which there is Direct Play support only in music (but we'll add it for video if possible), so this needs to be transcoded to AAC.

With that, the server is copying the video stream (it's not transcoding it, because h264 video is supported) and just transcoding the audio stream to AAC. It's transcoding, but should be super cheap.

Eventually we should be able to make it Direct Play FLAC audio format, and it won't need to transcode the audio stream anymore. But still, since you're using MKV, it needs to remux the video to HLS so that the Apple's video player can read it.

Any chance you could share with me a sample of that video file so we can check if we can add support for FLAC audio streams in videos? Instructions to generate a sample: https://support.plex.tv/hc/en-us/articles/201035968-Generating-Sample-Files-from-Media

I hope that helps :blush:


#10

@sergiou87 I think that’s not the problem. Yes, this is a MKV file with FLAC codec so audio needs transcoding, but video should be direct streamed. Whenever I play them on iPad, both video and audio are transcoded regardless of my settings. I always have to manually choose “Play Original Video Quailty” in the playback settings to make its video direct streamed. It seems to only happen with 1080p videos files. (or maybe those with FLAC audio codec? either case this is not alright).


#11

@tomyun but it says it's not transcoding the video, it's copying it:
streams=(Video=(id=12132 decision=copy width=1920 height=1080)
So it's "direct streaming" the video, but transcoding the audio. At least, that's what it should be doing :confused:

Where do you see it's transcoding?


#12

@sergiou87 I checked that on both Plex app and Plex Media Server status. On the app, it was saying "Transcoded" for both video and audio. PMS status was also clearly saying "Transcoded" at first then changed to "Direct Streaming" after I chose "Play Original Video Quality".


#13

@sergiou87 just sent another PM to show you a video recorded from iPad showing what happened there. Also attached images from PMS clearly showing transcoding happened first and then changed to direct streaming.


#14

Yup, looks like the same problem I have!


#15

Any advances on this? I am also having the same issues as described above. Frustrating part is that casting from the chrome browser is uninterrupted perfect viewing.