Preferred container/codec for movies to Apple TV? [SOLVED]


DanielCoffey

Recommended Posts

I posted this question to the PLEX forums earlier today but they don't get as many eyeballs as threads here so I thought I would see if someone has the answer.

 

I am wondering what is the preferred container and codec for my BD movies that I will be playing on an Apple TV 4 with the intention of reducing transcoding on the fly.

 

On unRAID 6.1.9 I am seeing a single stream CPU load of about 40% on an i3-4160 3.6GHz once initial buffering is over and I was wondering if this was normal.

 

The situation at the moment is that I have the unRAID LimeTech Docker version of Plex (non-PlexPass) running on my NAS (Intel i3-4160 3.6GHz, 16Gb 1600 RAM, WD Caviar Red drives) on a wired ethernet (cat6) connection to a new Apple TV 4 running the current Plex App.

 

When I watch the unRAID CPU load when I play a movie it pegs at 100% for about 20s while buffering then jumps between 0% and 40% as chunks are buffered over the LAN.

 

The original movies are of course MKV files taken from my BDs with a variety of audio types but they have all been passed through ffmpeg to convert to MP4 with AAC audio on the following settings...

 

ffmpeg -i input.mkv -c:v copy -c:a libfdk_aac -b:a 128k output.mp4

 

When I look at one of the movies in VLC I see the following...

 

Stream 0 : Video, Codec H264 MPEG-4 AVC (part10)(avc1), Resolution 1920x1080, Frame rate 24, Decoded format Planar 4:2:0 YUV

Stream 1 : Audio, Codec MPEG AAC Audio (mp4a), Channels 3F2R/LFE, Sample rate 48000 Hz

Stream 2 : Subtitle, Codec tx3g, Language English

 

Should I be converting them to something else or is the CPU load normal given they are not compressed?

Link to comment

Apple TV supported formats etc are:

 

Video Formats

H.264 video up to 1080p, 60 frames per second, High or Main Profile level 4.2 or lower

H.264 Baseline Profile level 3.0 or lower with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats

MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats

 

Audio Formats

HE-AAC (V1), AAC (16 to 320 Kbps), protected AAC (from iTunes Store), MP3 (16 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, and 4), Apple Lossless, AIFF, and WAV; Dolby Digital 5.1 and Dolby Digital Plus 7.1

 

Photo Formats

JPEG, GIF, TIFF

 

Anything other than this is going to need to be transcoded.

 

I can't help you with the performance issues. I don't transcode anything locally. I use a player that can play anything (e.g. KODI) and therefore transcoding is never an issue.

Link to comment

Hmm... I seem to tick the boxes on codec types for both audio and video. Is the 40% CPU load just network and IO overhead then or is some sort of transcoding going on anyway? Does PLEX report if it has had to transcode to a log at all?

 

I have no idea about Plex I am afraid so I will have to let someone else chime in here for you.

 

That being said, IF you are running those formats and Plex is still transcoding then I would check for an option which might be forcing Plex to always transcode (or upscale) to a particular HD format. I know there is a setting like that in Emby for instance.

 

As I don't like to leave with an "I can't help you" I did a quick Google and found this page:

 

https://support.plex.tv/hc/en-us/articles/200250347-Transcoder

 

Good Luck!

Link to comment

Thanks for that link - it is to the page of settings that Plex uses when you do need it to transcode.

 

I am a little further forward now thanks to some searching in the bowels of reddit.

 

===

 

There is an easy way to see if Plex is transcoding a movie or not.

 

1. Begin playback on your PHT device.

2. Open the PMS web page and click the "Now Playing" pulse icon on the top right.

3. Click on the "I" Info icon (or press "I" apparently).

 

You will see information on the video and audio streams along with which streams are Direct and which are Transcoding.

 

When I streamed a BD 1080p movie, I saw "Transcoding... Video transcode (h264), Audio transcode (ac3)". This was when my unRAID CPU was reporting 100% load initial buffering and 40% upkeep buffering.

 

I checked the PHT settings in the Apple TV PLEX app and under Play - Settings - Quality I saw "8Mb, 1080p" was selected by default. This meant that PMS was being asked by PHT to transcode the original video stream down from Original to 8Mb hence the high CPU load.

 

I looked at the PHT - Settings - Local Video Quality and changed it to "Original 1080p" and resumed the playback. Instantly the CPU load dropped right down. Checking the PMS - Now Playing - Info page I saw "Transcoding... Video DirectStream Audio transcode (ac3)". The unRAID CPU was now reporting 40% load initial buffering and 15% upkeep buffering which is a lot more acceptable.

 

The reason the audio was still being transcoded was that the source was 5.1 and my playback television was 2.0 so some simple audio transcode was required.

 

===

 

Now an oddity... I then tried playing a SD 576p DVD and saw a high unRAID CPU load again so I looked into it.

 

The source was Video 576p H264, the audio was AAC Stereo. PMS - Now Playing - Info reported "Transcoding... Video transcode (h264), Audio DirectStream" and the unRAID CPU load was 85% load initial buffering and 30% upkeep buffering.

 

What was going in here was that PMS was offering 576p but PHT was demanding "Original, 1080p" so PMS was having to upsample the video stream from 576p to 1080p. The audio was going straight through as AAC 2.0.

 

The PLEX Apple TV app currently does not seem to make a distinction between SD and HD source and applies "Original, 1080p" to both SD and HD content even though my television would be happy to do the work. This is not a big issue for me as the large majority of my library is BD 1080p content with only about 20% being still DVD 576p. I can live with it but will continue to look into it.

Link to comment

And I have found the reason why my SD DVDs at 576p were being transcoded... PMS - Media Info shows "Anamorphic 1" which means the pixels are not "square" so the movie needs transcoding.

 

Apparently we can let PLEX do this or use Handbrake to correct it once. It is only likely to be an issue on DVDs, not BDs.

 

Previous discussion : https://forums.plex.tv/discussion/130104/stop-pms-transcoding-anamorphic-mkv-files-dvd-rips-from-720x576-to-719x404

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.