For a long time I was running PlexConnect with my AppleTV 3 with no problems. I converted all my BluRays to MKVs, some at very high quality (1080P RF 16), and all would play fine with no hiccups. I had transcoding set to "Auto" and the local streaming bitrate set to 1080P / 40 Mbps.
Recently, though, some of the high bitrate files (30+ Mbps) have made the Apple TV crash and reboot after only a few minutes of playing. There's no pause for buffering or anything like that; the screen just goes blank, the light on the ATV blinks, and it reboots within a few seconds back to the menu screen.
If I dial the max streaming rate down to 20 Mbps this problem doesn't occur, but that means the picture quality is being degraded and I really don't want to do that.
I have the Apple TV connected via ethernet to an Airport Extreme, which is running in Bridge Mode and connected to my primary Airport via ethernet. So it doesn't seem like transfer rate to the Apple TV should be an issue; it should be able to handle significantly more than the 30-35 Mbps required for these large files.
I'm not exactly sure when this issue started, since within the past few weeks I've updated my MacBook Pro (the machine running PMS Server) to Yosemite, and there's also been a recent update to PMS and the Apple TV itself.
I'm attaching my PMS log. Any help would be much appreciated!
Anything with 16 reference frames is going to be transcoded, regardless of local bitrate settings, the aTV just isn't capable of handling 16 reference frames. In order for a mkv file to be direct played without transcoding you either need to set the transcoder to "Direct Play" which with 16 ref frames will most likely crash the aTV or your file needs to have less than 8 ref frames.
Anything with 16 reference frames is going to be transcoded, regardless of local bitrate settings, the aTV just isn't capable of handling 16 reference frames. In order for a mkv file to be direct played without transcoding you either need to set the transcoder to "Direct Play" which with 16 ref frames will most likely crash the aTV or your file needs to have less than 8 ref frames.
I don't quite understand this explanation for a couple of reasons...
1. The default RF in Handbrake is 20. Files with that setting end up much smaller and work fine on the aTV. (8 would mean essentially no compression at all, which would result in an enormous file, as big or bigger than the source.)
2. Many MKVs with the 16 RF setting work fine, as long as the file size isn't too big. It tends to be the files that are 30 GB or bigger (which translates to 30-35 Mbps) that crash the aTV.
Sorry… my bad… when you said RF I assumed you where referring to Reference Frames. Disregard everything I said
Which preset are you using in Handbrake? Your not using the High Profile preset are you? Because if you are then you will run in to vbv-buffer or vbv-maxrate issues.
Could you provide a MediaInfo report on one of the files that crashes the aTV please.
[spoiler]General
Unique ID : 143667516032427132185152514447193554005 (0x6C155B6BF89AFFD82C34EA0F34DA3C55)
Complete name : Jarhead.2.Field.of.Fire.2014.1080p.Remux.AVC.DTS-HD.MA.5.1-ShocK.mkv
Format : Matroska
Format version : Version 2
File size : 25.4 GiB
Duration : 1h 42mn
Overall bit rate mode : Variable
Overall bit rate : 35.4 Mbps
Movie name : Jarhead.2.Field.of.Fire.2014.1080p.Remux.AVC.DTS-HD.MA.5.1-ShocK
Encoded date : UTC 2014-08-07 01:25:06
Writing application : MakeMKV v1.8.10 win(x64-release)
Writing library : libmakemkv v1.8.10 (1.3.0/1.4.1) win(x64-release)
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=3, N=12
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 42mn
Bit rate mode : Variable
Maximum bit rate : 35.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Language : English
Default : No
Forced : No
Audio
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Format profile : MA / Core
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 1h 42mn
Bit rate mode : Variable
Bit rate : Unknown / 1 509 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Compression mode : Lossless / Lossy
Title : Surround 5.1
Language : English
Default : Yes
Forced : No
Text #1
ID : 3
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : The same subtitle format used on BDs/HD-DVDs
Language : English
Default : Yes
Forced : No
Text #2
ID : 4
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : The same subtitle format used on BDs/HD-DVDs
Language : Spanish
Default : No
Forced : No
Text #3
ID : 5
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : The same subtitle format used on BDs/HD-DVDs
Language : French
Default : No
Forced : No
Sorry... my bad... when you said RF I assumed you where referring to Reference Frames. Disregard everything I said :(
Which preset are you using in Handbrake? Your not using the High Profile preset are you? Because if you are then you will run in to vbv-buffer or vbv-maxrate issues.
Could you provide a MediaInfo report on one of the files that crashes the aTV please.
I am indeed using the High Profile preset (but with increased quality) -- but as I said, most movies are playing fine; it's only the large ones that I'm having trouble with. (And even those used to play okay in the past.)
Here's a MediaInfo file for my high-quality MKV of Casino Royale, which will reliably crash the aTV within a few minutes regardless of where I start playing it.
@roidy, PMS is transcoding, so it's irrelevant (I think) the format of the file. What seems to happen is that PMS is transcoding to a format not accepted by the ATV3.
@roidy, PMS is transcoding, so it's irrelevant (I think) the format of the file. What seems to happen is that PMS is transcoding to a format not accepted by the ATV3.
Interesting... so maybe what's happening is that the file is DirectPlaying at first, but once it runs out of bandwidth PMS tries to transcode it, and that's when the crash happens?
ATV3 does not supports MKV's natively, so PMS will always transcode or remux the file. Maybe it is remuxing and the file is out of spec. Can you pls check if PMS is remuxing or transcoding ?
ATV3 does not supports MKV's natively, so PMS will always transcode or remux the file. Maybe it is remuxing and the file is out of spec. Can you pls check if PMS is remuxing or transcoding ?
Sure... How do I check that? I searched the log file for "remux" and nothing came up.
Direct Stream is the same thing as remuxing. Why PMS decides to direct stream instead of transcoding is a mistery to me (my PMS server is not capable to do either, so I've never studied this). For sure there is a "parameter file" somewhere that can be fine tuned so that PMS makes the correct decision. I'm sure that one of the experts will soon help you after this initial debug.
I've got it to stop crashing, for at least 10 minutes now.
In PlexConnect settings on ATV put Transcoder from Auto to On.
It started as a direct stream, and changed to transcode DTS to AC3. It still says the video is direct streaming.
However, I see that the CPU is being used quite a bit, I doubt it's working that hard just for audio. Maybe it's transcoding while keeping the bitrate and quality into a different video type.
Maybe it crashes when it peaks in bitrate and ATV can't handle it. I don't know if PMS should automatically transcode those peaks or not.
I've got it to stop crashing, for at least 10 minutes now.
In PlexConnect settings on ATV put Transcoder from Auto to On.
It started as a direct stream, and changed to transcode DTS to AC3. It still says the video is direct streaming.
However, I see that the CPU is being used quite a bit, I doubt it's working that hard just for audio. Maybe it's transcoding while keeping the bitrate and quality into a different video type.
Maybe it crashes when it peaks in bitrate and ATV can't handle it. I don't know if PMS should automatically transcode those peaks or not.
I switched mine to "Transcode" as well, keeping the 1080p/40Mbps setting. The movie still crapped out after a few minutes, although it seemed to make it a bit longer than before. (Still less than 5 minutes in.)
According to this the ATV3 is limited to h.264 High profile level 4.0. If you look here you can see that the max bitrate in this profile is 25Mbps. That explains. Maybe PlexConnect developers should not allow 40Mbps in the ATVSettings in order to not confuse users.
It's not PlexConnect's responsibility to decide what to play and what not to play, there's a profile on PMS that describes the clients Resources/Profiles/iOS-AppleTV.xml and it lists what the client i capable of playing. Currently the profile looks like this:
I edit that file every time that I update PMS and change "video.refFrames" to "15", as the ATV3 can play 720p files with more reference frames. It's just 1080p files with more than 8 that cause a problem.
You could add the following to your profile to force anything over 25mbit to be transcoded, but I don't think that the ATV3 has a true hard set limit on bitrate, I think it's a combination of the complexity settings used with the encoder.
I edit that file every time that I update PMS and change "video.refFrames" to "15", as the ATV3 can play 720p files with more reference frames. It's just 1080p files with more than 8 that cause a problem.
Sure... but not everybody has an aTV3 some people still use the older less powerful aTV2.
The problem that we the PlexConnect developers have is that whatever profile settings we create for the aTV somebody is going to report that some of their files don't play correctly anymore. The aTV is limited hardware and while yes some high bitrate/reference frame file work others don't, so it's a trade off. If we set the limits too high some people will get files that don't play correctly and may crash the aTV, however if we set the limits too low then every file will play but some of them will be transcoded and people will complain "oh my file is being transcoded and it should be playable". It's a no win situation. We have to create a profile that works for the majority of people, not just a single person.
People throw around bitrate values like 25Mbps and say oh the aTV can play that no problem, what they don't realise is that value is the average bitrate of the file and some sections of the video could peak at a much higher bitrate. This is easily controlled if you encode your own stuff by setting sensible vbv-buffer and vbv-maxrate values, this is why if you compare Handbrakes High Profile and ATV3 presets the ATV3 one has much lower vbv-buffer and vbv-maxrate values, because that's all the aTV3 can handle.... but we all know that most people don't encode there own file and instead get them from other places ;) So it's hit and miss as to weather the file they get is within the specs of the aTV.
As to why the OP's file are now crashing when they played fine before... well nothing that I know of has changed with the way PlexConnect handles file playback. The only thing that seems to have changed for the OP is the version of PMS and the aTV's firmware version. To me at least it seem that the aTV 7.0 and 7.0.1 firmwares aren't as stable as the older 6.0 versions so that could be the problem. Unfortunately I don't think you can rollback to firmware 6 anymore, but the OP could try rolling back to an older version of PMS to see if that solves the problem.
People throw around bitrate values like 25Mbps and say oh the aTV can play that no problem, what they don't realise is that value is the average bitrate of the file and some sections of the video could peak at a much higher bitrate. This is easily controlled if you encode your own stuff by setting sensible vbv-buffer and vbv-maxrate values, this is why if you compare Handbrakes High Profile and ATV3 presets the ATV3 one has much lower vbv-buffer and vbv-maxrate values, because that's all the aTV3 can handle.... but we all know that most people don't encode there own file and instead get them from other places ;) So it's hit and miss as to weather the file they get is within the specs of the aTV.
As to why the OP's file are now crashing when they played fine before... well nothing that I know of has changed with the way PlexConnect handles file playback. The only thing that seems to have changed for the OP is the version of PMS and the aTV's firmware version. To me at least it seem that the aTV 7.0 and 7.0.1 firmwares aren't as stable as the older 6.0 versions so that could be the problem. Unfortunately I don't think you can rollback to firmware 6 anymore, but the OP could try rolling back to an older version of PMS to see if that solves the problem.
Thanks for the info. All my files are self-encoded from my Blu-Rays. I'd just hate to have to do so many of them again when they were working before, and my goal was to keep them as close as possible to original quality. (And I already spent all summer converting my whole library!)
I did try downgrading PMS, but that didn't help. Hopefully a future aTV software update will make the device more stable on these files. In the meantime I'll keep the transcoder set at 20 Mbps.
Was hoping that a new computer would help (I have the Retina iMac i7 coming in a week) but it doesn't seem like that's the limiting factor here.
Sure... but not everybody has an aTV3 some people still use the older less powerful aTV2.
Me, I have an ATV3 on my main TV and an ATV2 on my bedroom TV :D
There are a ton of different iOS profiles, most of them point to another file. It would be nice if we actually had different profiles for the ATV2 and ATV3 so that the ATV3 wouldn't be limited to what the ATV2 can play.
Thanks for the info. All my files are self-encoded from my Blu-Rays.
I just had a look at the CasinoRoyale.txt log you provided and as I suspected you've encoded them using the High Profile preset, which uses vbv-bufsize and vbv-maxrate values that are way out of spec for the aTV.
Values that high will give you bitrate spikes that the atv isn't designed to handle. That's why Handbrake has a proper AppleTV 3 preset with the correct values that work on the aTV.