Unnecessary Transcoding

apple-tv

#1

Within the past few versions of PMS, I am seeing an issue with my Apple TV where an mkv file which should play just fine with direct stream is being transcoded from H264 to H264 and audio from AAC to AAC. I end up having to stop it, optimize the file for TV and it just converts it to mp4 but video and audio all look the same. How come direct stream seems to have gotten flakey in the last few releases?

Here's an example video file info:
Original MKV:
Media

Video Resolution 1080p
Duration 43:22
Bitrate 4164 kbps
Width 1920
Height 1080
Aspect Ratio 1.78
Container MKV
Video Frame Rate 24p
Audio Profile lc
Video Profile main
Title Original
Part

Duration 43:22
Size 1.26 GB
Audio Profile lc
Container MKV
Video Profile main
Codec H264
Bitrate 4164 kbps
Bit Depth 8
Chroma Subsampling 4:2:0
Frame Rate 23.81 fps
Height 1080
Level 4.0
Profile main
Ref Frames 1
Scan Type progressive
Width 1920
Codec AAC
Channels Stereo
Audio Channel Layout stereo
Profile lc
Sampling Rate 44100 Hz

And Optimized for TV:
Media

Video Resolution 1080p
Duration 43:22
Bitrate 4167 kbps
Width 1920
Height 1080
Aspect Ratio 1.78
Container MP4
Video Frame Rate 24p
Web Optimized Yes
Proxy Type 42
Audio Profile lc
Has 64bit Offsets 0
Target Optimized for TV
Target Tag I D 5401
Video Profile main
Title Optimized for TV
Part

Duration 43:22
File S02E02.mp4
Size 1.26 GB
Audio Profile lc
Container MP4
Has 64bit Offsets 0
Web Optimized Yes
Video Profile main
Codec H264
Bitrate 4064 kbps
Bit Depth 8
Chroma Subsampling 4:2:0
Frame Rate 23.976 fps
Height 1080
Level 4.0
Profile main
Ref Frames 1
Stream Identifier 1
Width 1920
Codec AAC
Channels Stereo
Bitrate 103 kbps
Audio Channel Layout stereo
Profile lc
Sampling Rate 44100 Hz
Stream Identifier 2

Now can someone tell me why this wouldn't directstream and instead attempted to transcode? My little QNAP can't handle transcode so i rely on Direct Play and Direct Stream for everything. This issue is with my Apple TV 4 and now my new Apple TV 4K. iOS has the same issue with the original MKV. I have my quality settings to maximum in all places.

Attaching my PMS logs too taken right after attempting to place this MKV file and it failing. Other MKV work fine, not sure why some are being finicky.

Thanks


#2

I am having the same problem.
After switching to an Apple TV 4k I started getting transcodes all the time!
I verified this with old videos that I know didn't transcode on my old ATV, and now they do.

Really annoying!


#3

Do you have subtitles switched on?


#4

@nickp85

you and the dozens ... possibly hundreads by now posts complaining on deaf @elan ears to fix...

keep it up though... in military tearms only the squeeky wheel get greased...


#5

Latest. v1.18 beta build has the "direct play" toggle returned to the app.


#6

@SauRoNZA said:
Do you have subtitles switched on?

Nope

@dragonmel thanks, hopefully there’s updates coming to fix this stuff. Been very disappointed in Plex lately after at least three years of use.


#7

I am having exactly the same issue.. no difference with or without subs.

You can "force" direct play if you first choose "convert automatically" in the individual file settings and play it, stop and then change it back to "Play original file" in the Settings/Quality options.

No issues with the same files on Shield Android Tv and Samsung Blurays Plex apps.
I love Plex but I am not using the Plex Apple TV app before this is fixed.

No difference with the latest Plex app version 1.18.1 or TVOS 11.1.


#8

Just to say I just noticed the exact same thing. PMS spinning the CPU transcoding what should be direct play (H264/AAC MKV) to Apple TV.

@olof79 thanks for the workaround.


#9

My entire library is m4v. Files that used to direct play and transcode!

All you my files used to direct play on all my iDevices. But now my Apple TV 4, iPhone se and iPad Air 1st gen just always transcode h264 to h264 and aac to acc (or ac3 to ac3).

When steaming the same content off the cloud guess what! It always direct plays!

Grrrrrrrrrrrrrrrrr. Why Plex why!

I mean what the point. It all unessary transcoding.

I feel Plex has really gone downhill over the past 12 months and I gave up posting on forums.

I’ve posted this out of shear fustration. I’m glad I only paid 50 dollars for Plex plans back in the day. I feel bad for those who’s spend over 100 on it.


#10

This issue sounds very similar to what I have been struggling with iOS app. The app somehow prefers transcoding over direct play/streaming for 1080p movies in my case. As the Plex dev @sergiou87 was taking a look at my issue recently, hope we get them fixed soon.


#11

@nickp85 can you share your server logs right after reproducing the issue, please? Those logs don't seem to have any useful info :(

Thanks!


#12

@sergiou87 said:
@nickp85 can you share your server logs right after reproducing the issue, please? Those logs don't seem to have any useful info :(

Thanks!

Something changed... three shows I tried to watch recently after downloading and had to "Optimize for TV" to play are now Direct Streaming without an issue. I played the original version, not the optimized one, for the test

I am a member of TestFlight for the Plex app on Apple TV and saw an update earlier today. Is it now fixed?

Perhaps it is some issue if they are played immediately after downloading? I usually watch shows shortly after they download without waiting until the next day. Does Plex server take time to realize it can direct stream a file?

By the way, it's usually the same shows every week that each new episode tries to transcode H264 to H264 and AAC to AAC.


#13

Weird O_o The decision to direct stream/play or transcoding is taken right before playback. Did you also update the server or only the Apple TV app?


#14

@sergiou87 said:
Weird O_o The decision to direct stream/play or transcoding is taken right before playback. Did you also update the server or only the Apple TV app?

I realized that the new beta version released yesterday did not auto-update on my Apple TV so it was still the version from Sunday. So the same Plex server version (1.9.4) and the same Apple TV app but the day the files downloaded, it was transcoding H264 to H264 and AAC to AAC but the day after, all 3 videos I tried to play the original direct stream without an issue.

Now I'm confused... will have to wait until the next show downloads that typically does this and try to get you the logs. Or maybe just move the file out of the Plex folder and move it back in so it's recognized again as a new download. Will see what I can get you.


#15

PMS has got to have some daily job that does something. I have an HEVC MP4 and modified my profile for Apple TV 4K to play it. It will play with Direct Play immediately after import, but the next day, it will transcode HEVC to H264 without changing anything on PMS. If I delete it from library by moving it to another folder, then move it back, it will again Direct Play until the next day.

Something on this server is making decisions contrary to logic. Can you please fix it??


#16

@nickp85 if it's a server issue, it's better to report it in the server forum.

But let's try to dig into it a bit more before that: can you get the video XML when it Direct Plays and then again when it transcodes?

Instructions to get that XML: https://support.plex.tv/hc/en-us/articles/201998867-Investigate-Media-Information-and-Formats

If the server is doing something, that XML should change.


#17

@sergiou87 I did a compare using Text Wrangler and the XML when it transcoded vs direct play is almost the same, same number of lines and I only see a few different ID numbers in there likely because it's a new record in the library when I delete and re-add it. I guess that rules out the server as the cause.


#18

Here's another example of a freshly downloaded file that did transcoding from H264 to H264 and AAC to AAC. Logs sent to you in a direct message. I will check the file again tomorrow to see if it now direct stream but this show I typically have problems with every week.


#19

From what I see there is a difference between the two XMLs, one of them include an extra Media element, that's because you probably have set up "Optimized Versions" in your PMS: https://support.plex.tv/hc/en-us/articles/213097057-Optimized-Versions

So when you download it, you have an MKV with h264 and AAC inside, that needs to be remuxed into MP4, and the day after it will optimize that video and convert it to MP4 with h264 and AAC (that extra Media element I mentioned), which can be direct played.

Does this make sense?


#20

No I don’t do automatic optimization. I manually optimized it for TV so I could watch that night which creates an mp4 version which uses direct play. What I’m saying is the original mkv version now uses direct stream where before it was transcoding immediately after download.