Jump to content

Apple TV app crashes during playback every time


justwondering
 Share

Go to solution Solved by corey,

Recommended Posts

justwondering

Hello,

 

I have a fresh install of Emby server 3.4.1.0 on a Raspberry Pi 3B+ with Raspbian Stretch (2018-06-27). I'm trying to play videos on an Apple TV 4th generation (A1625 32GB) running the current tvOS (11.4 15L577) with a new install of the Emby app.

 

All my media files are h264 in mp4 containers. I turned off transcoding permission for the Emby user to ensure direct play.

 

I've tried a variety of different files, and I always get the same result: it starts off playing normally, then after a few seconds I start seeing flickers of a gray screen that says:

 

"Oops. Something went wrong.

Maximum call stack size exceeded."

 

These occur just for 1 or 2 frames at a time, one every few seconds, with normal video in between. This continues for a minute or two, then the app crashes to the Apple TV home screen.

 

If I try to fast-forward, the app hangs for a long time (10+ seconds) as though it's going to resume play, then crashes without playing.

 

Server logs attached (Log1.txt is fast-forwarding, Log2.txt is just playing). I'm not sure how to provide logs from the Apple TV.

 

Everything about my system is plain vanilla (fresh installs, no customization, nothing weird) so it's odd to find such a debilitating error. Are others having trouble with the Emby Apple TV app?

 

If I can provide any further info please let me know.

 

Thanks,
Robert

Log1.txt

Log2.txt

Link to comment
Share on other sites

Hey @@justwondering --

 

I'm sorry to hear you're having playback problems! I do see a couple of errors in your server logs but I don't develop the server so hopefully @@Luke or @@ebr can chime in and provide some perspective on that one. As far as the Apple TV app itself (I'm one of the devs) we don't have an easy way to get logs off the device yet.

 

All my personal media is h264 in MP4 containers and I don't see this sort of behavior. Would you be able to upload one of  your problematic media files and private message me a link? Or if your Emby server is internet facing you could invite me as a guest and I can see if I can repeat it and capture better errors.

 

Thanks!

Link to comment
Share on other sites

justwondering

Thanks for taking a look!

 

I private messaged @@corey a link to the two files from the logs. Both files (and all the others I tested) do have embedded srt subtitles, and I always watch with subs turned on, so maybe that is related.

 

My server is not currently internet facing, but I could set that up if you think it would be helpful.

Edited by justwondering
Link to comment
Share on other sites

@@justwondering --

 

So I took a look at the files and it's definitely related to subtitles. As you mentioned the file has embedded subtitles. Emby server is saying that the subtitles are delivered externally (delivery method was external) when I would argue they shouldn't be since they are embedded. @@Luke any thoughts on that?

 

@@ebr on top of that subtitles are in a format that when we escape it results in an invalid format which is causing the error your seeing. For example the text track is:
 

 

<font size=\"40\">Some subtitle</font>

 

which when escaping gets converted to an invalid format such as:
 

 

<font size="40">yes</font>

 

Even if this didn't happen it appears you'd see duplicate subtitles (the embedded ones and the same ones Emby thinks it should be delivering externally).

 

Here's the media info:

5b3c2823bb5ef_ScreenShot20180703at94200P

Edited by corey
Link to comment
Share on other sites

@@justwondering --

 

So I took a look at the files and it's definitely related to subtitles. As you mentioned the file has embedded subtitles. Emby server is saying that the subtitles are delivered externally (delivery method was external) when I would argue they shouldn't be since they are embedded. @@Luke any thoughts on that?

 

That depends.  Can the Apple internal player display mov_text subtitles?

 

If it can, we can change the profile to allow that and it will mitigate this issue.  If not, we have a bit of a conundrum and may have to wait until the new player is ready...

Link to comment
Share on other sites

The subtitles were displaying with the native Apple player so we may be able to tweak the profile.

Link to comment
Share on other sites

justwondering

As a test, if the subtitles are disabled, is there still an issue?

 

I tried turning the subtitles off while the movie is playing and got the same behavior and crash.

 

Then I went into the app settings and set "Subtitle Selection" to "Never". Now when I start playback there are no subtitles and it works fine! I let it play for 40 minutes with no problems. Also fast-forwarding works.

 

Here's where it gets weird: If I select a subtitle language while the movie is playing, everything works fine. Subtitles show, movie plays, no crashes. If I exit with the menu button and start the movie over, it remembers my subtitle selection and plays with no problems. I tried a bunch of movies and TV episodes and they all work fine.

 

There is one odd thing, which is that if I exit with the menu button and then hit play, it starts from the beginning, skipping the expected "Resume Playing/Start from Beginning" choice.

 

If I turn the global subtitle selection back to "Default" then I get crashes again. Or if I start a movie using the "Select Audio or Subtitles" button, same crashes. But as long as I start and then choose the subtitles while it's playing, it seems to work fine.

Link to comment
Share on other sites

  • Solution

Thanks for providing feedback. The behavior you're seeing is in line with what I'd expect based on the media that you're trying to play. Unfortunately the native Apple player is limited in the number of formats it supports, including subtitles. So in certain scenarios there's a situation where there are embedded subtitles but Emby doesn't think the Apple player can handle them so it also runs our custom implementation. When the custom implementation is triggered (via the Default setting in the app or the Select Audio or Subtitles menu) it crashes because it's a format it doesn't expect.

 

However, when you select the subtitles while playing via the pull down menu that's actually Apple's native player setting and not the Emby app. It's toggling on and off the embedded subtitles.

 

With that said we may have an option to put a band-aid on this but we're also working on delivering a brand new player to the app to fix other deficiencies as well including this one.

 

Thanks!

  • Like 1
Link to comment
Share on other sites

justwondering

Thank you for the explanation @@corey. It sounds like for now I can just leave automatic selection turned off and choose subtitles manually every time.

 

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...