Jump to content

Some videos not playing/crashing Android TV app


joekrill

Recommended Posts

This is one of the logs where the recorded (via NextPVR) programme crashed on the Nvidia Shield TV.

 

How do you define "crashed"?

Link to comment
Share on other sites

Video started playing then after about 5 minutes froze bit sound continued for a while. I had to back out of Emby using the O button, close the application and try again. Scenario is repeated and with another recording from the same series. Actually it only seems to happen with the 'Dad's Army' recordings which are all 4:3 and originally SD although recorded off a HD channel. I suspect it is related to that.

 

I tried using Emby for Kodi which was better but eventually crashed out. These recordings work in Theatre and Emby browser. Not tried EA but I will give it a go later.

Link to comment
Share on other sites

Okay, so the app is not crashing or becoming unresponsive, the video is just freezing but you can back out of it?

Link to comment
Share on other sites

That transcode log looks like it is from an unsuccessful playback session (from the get-go) and, yes, it does appear there are problems with the file:

[matroska @ 000001ddc41600a0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[matroska @ 000001ddc41600a0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
[matroska @ 000001ddc41600a0] Can't write packet with unknown timestamp
Error writing trailer of D:\transcoding-temp\e9e959dd1b0318af2eb7c8a7e9499953.mkv: Invalid argument
Link to comment
Share on other sites

joekrill

Probably because you are not using Connect.  In order for Connect to properly work, you have to tell it that  your server requires SSL and the proper port.

 

Dashboard->Advanced.

 

Well technically Emby is still using port 8096 or whatever the defaults are. My Nginx instance is providing SSL and forwarding requests from 443 to 8096. So publically it's exposed on 443. It seems Connect doesn't support this setup? I've tried manually adding the server on Connect and it isn't working. If I send you address directly can you use that instead? 

 

Alternatively I can change the ports Emby is running on internally, and change the Nginx mappings. I'm not sure how that works when I have Nginx handling the SSL?

Link to comment
Share on other sites

Well technically Emby is still using port 8096 or whatever the defaults are. My Nginx instance is providing SSL and forwarding requests from 443 to 8096. So publically it's exposed on 443. It seems Connect doesn't support this setup? 

 

Connect will support that setup but you have to tell the server that you are using 443 as the external port.  There is a field for that on the page I directed you to above...

 

You need to enter 443 in this field:

 

5a2719c822f38_publicport.png

Link to comment
Share on other sites

joekrill

Connect will support that setup but you have to tell the server that you are using 443 as the external port.  There is a field for that on the page I directed you to above...

 

You need to enter 443 in this field:

 

 

I did that. I login to Emby Connect and choose the server, then it asks me to login to the server itself (it shows all of my "public" users, so it must have connected to the server successfully), at which point it shows me this:

 

5a27210fd05de_ScreenShot20171205at54302P

Link to comment
Share on other sites

What app are you using.  It is working for me now that you made that change.

 

Edit: Actually, it is accessing you over plain http port 80 so you must've made some other changes as well...

Link to comment
Share on other sites

I think the issue is possibly related to your reverse-proxy as I'm getting very strange 404 responses from normal Emby API calls and the request to stream the video is getting a 301 response (permanently moved).

Link to comment
Share on other sites

You want to configure the public port fields in such a way that the remote address that is displayed on your server dashboard matches whatever you would use to connect externally. 

 

The same goes for the require https setting. Let us know if this helps. thanks !

Link to comment
Share on other sites

joekrill

What app are you using.  It is working for me now that you made that change.

 

Edit: Actually, it is accessing you over plain http port 80 so you must've made some other changes as well...

 

I'm using HSTS, so you should not be able to access the site on port 80... you should be redirected to 443.

 

 

I think the issue is possibly related to your reverse-proxy as I'm getting very strange 404 responses from normal Emby API calls and the request to stream the video is getting a 301 response (permanently moved).

 

Are you sure this isn't because you're being redirected to HTTPS? That would usually result in a 307 in this case.

Link to comment
Share on other sites

joekrill

You want to configure the public port fields in such a way that the remote address that is displayed on your server dashboard matches whatever you would use to connect externally. 

 

The same goes for the require https setting. Let us know if this helps. thanks !

 

I have it configured this way now... sort of. I have an nginx server running as a reverse proxy which redirects any HTTP requests to HTTPS. Technically nginx interacts with Emby using HTTP, not HTTPS. Publically, however, all requests are HTTPS requests. Emby won't allow me to select "Require https for external connections" without also supplying an SSL cert. However, my SSL cert is automatically generated with LetsEncrypt and is handled by Nginx. 

Link to comment
Share on other sites

mastrmind11

I have it configured this way now... sort of. I have an nginx server running as a reverse proxy which redirects any HTTP requests to HTTPS. Technically nginx interacts with Emby using HTTP, not HTTPS. Publically, however, all requests are HTTPS requests. Emby won't allow me to select "Require https for external connections" without also supplying an SSL cert. However, my SSL cert is automatically generated with LetsEncrypt and is handled by Nginx. 

This is how myself and several others have it set up as well, and it's working properly, so I don't believe that's your issue.

Link to comment
Share on other sites

This is how myself and several others have it set up as well, and it's working properly, so I don't believe that's your issue.

 

Using Emby Connect?  If the URL reported on the dashboard for remote address does not match what is needed to access your server externally, then I don't see how Emby Connect could ever work.

Link to comment
Share on other sites

mastrmind11

Using Emby Connect?  If the URL reported on the dashboard for remote address does not match what is needed to access your server externally, then I don't see how Emby Connect could ever work.

Nevermind, missed the Connect part of the problem.  Disregard.

Link to comment
Share on other sites

joekrill

This is how myself and several others have it set up as well, and it's working properly, so I don't believe that's your issue.

 

You have your external ports set to 80 and 443, respectively? Do you leave "Custom ssl certificate path" blank? Do you have "Require https for external connections" enabled?

 

Incidentally, I wouldn't say I have any problems with this setup. I've never had issues before. I also don't use Emby Connect - I have a custom domain name setup that I use directly instead. It's still TBD whether any of this has anything to do with the video playing problems. I'm not totally convinced it does because at least 2 of these videos played just fine not too long ago.

Link to comment
Share on other sites

mastrmind11

You have your external ports set to 80 and 443, respectively? Do you leave "Custom ssl certificate path" blank? Do you have "Require https for external connections" enabled?

 

Incidentally, I wouldn't say I have any problems with this setup. I've never had issues before. I also don't use Emby Connect - I have a custom domain name setup that I use directly instead. It's still TBD whether any of this has anything to do with the video playing problems. I'm not totally convinced it does because at least 2 of these videos played just fine not too long ago.

Yes 80 and 443, custom ssl path is blank, but I do not have https for external connections enabled.

Link to comment
Share on other sites

Okay so we got remote access sorted - thanks for that.  Unfortunately, I'm not able to reproduce your issues that way either.

 

I played both the Jillian Michael's item and the first Curb Your Enthusiasm item from my Shield without issue.  The latter I allowed to play all the way through.

 

Both of those items did require the use of VLC in order to direct play them (due to their containers, I believe) but they did play fine.  Perhaps you have installed some special codec versions or something else on your Shield that are somehow interfering with the VLC playback?

Link to comment
Share on other sites

joekrill

Okay so we got remote access sorted - thanks for that.  Unfortunately, I'm not able to reproduce your issues that way either.

 

I played both the Jillian Michael's item and the first Curb Your Enthusiasm item from my Shield without issue.  The latter I allowed to play all the way through.

 

Both of those items did require the use of VLC in order to direct play them (due to their containers, I believe) but they did play fine.  Perhaps you have installed some special codec versions or something else on your Shield that are somehow interfering with the VLC playback?

 

Thanks again for spending so much time to help with this.

 

I've never had any video play using VLC (unless I set Emby to always use an external player). At least I don't think I have. Is this supposed to be automatic? Would it be obvious that it's using VLC? Or does it use some sort of embedded VLC version? I do have VLC installed, but what would happen in the case of a user who doesn't? 

Link to comment
Share on other sites

Thanks again for spending so much time to help with this.

 

I've never had any video play using VLC (unless I set Emby to always use an external player). At least I don't think I have. Is this supposed to be automatic? Would it be obvious that it's using VLC? Or does it use some sort of embedded VLC version? I do have VLC installed, but what would happen in the case of a user who doesn't? 

 

It is automatic and embedded in the app and you may never realize it is being used but I'm just wondering if maybe it uses codecs it finds on the machine so that, if you had some sort of custom ones, it could possibly interfere.  That's really a wild-hare guess though...

Link to comment
Share on other sites

joekrill

It is automatic and embedded in the app and you may never realize it is being used but I'm just wondering if maybe it uses codecs it finds on the machine so that, if you had some sort of custom ones, it could possibly interfere.  That's really a wild-hare guess though...

 

Oh ok, that makes sense. I don't have anything "unusual" installed. Meaning I haven't done any sideloading or installed anything obscure. I've certainly never installed any additional codecs directly. Maybe another app could have done something? 

 

Incidentally, I've been having a problem for well over a month with my Playstation Vue app -- it won't let me login. And while others have reported the same problem, it doesn't seem to be an across-the-board problem for ALL Android users. (And Sony has been useless in trying to resolve this). I'm starting to wonder if perhaps another app I have installed is somehow causing these problems and it may be related? Feels like a bit of a stretch. I didn't really think that was a possibility on Android without rooting, either. But just to be sure, I think when I get home tonight I'll try removing my other apps one-by-one and see if it has any effect. 

 

If that doesn't work, I'll try a factory reset and see if that helps at all. But I don't have high hopes because I've already done that 3 times trying to fix the Vue problem I had (which is also a reason I think it's unlikely another app is causing a problem). 

 

I'll also try removing the "Shared network folder" setting for my libraries just to see if maybe that could be causing my problem (and would explain why you wouldn't be seeing the problem).

 

If none of that proves fruitful, I'll tweak my docker setup so that the Emby container uses my macvlan network instead of the default bridge network. That way I can access it directly within my LAN without going through the nginx reverse proxy.

 

I'll report back along the way. Of course I'm open to additional suggestions to try and get this figured out!

Link to comment
Share on other sites

I'll also try removing the "Shared network folder" setting for my libraries just to see if maybe that could be causing my problem (and would explain why you wouldn't be seeing the problem).

 

Don't bother with that as I'm positive that will have no effect on this app but could cause you problems on others.

Link to comment
Share on other sites

joekrill

Well, I haven't really gone through everything I was planning to yet. Frankly, it's a huge pain to factory reset or uninstall a lot of apps because then I have to go through each one individually and login again with my cable provider, etc... so I was kind of hesitating doing all that. 

 

What I did do, however, was tweak how my Emby docker container is networked. Normally the container uses docker's default bridge network. So I connected it to a macvlan network I created, too -- this gives my Emby container it's own direct IP address on my LAN. Then when I connected directly instead of through the reverse proxy everything works just fine. This is basically what FunkadelicRelic discovered when having a similar problem, which I referenced in my first post. The main difference is that they were using HAProxy, while I'm using Nginx. 

 

So it's clearly something to do with the proxy... what exactly that is, though, I have no idea. I've checked and rechecked my Nginx config - everything seems correct and aligns with pretty much every guide I've seen about how this should be done. So I'm kind of at a loss at this point. It doesn't really seem worth going through a factory reset thing at this point. I would love to track down the culprit of all this, but I'm not even sure how to go about that at this point. Unless anyone has any ideas, I think for now I'll just continue to use this direct connection setup with my nVidia shield. 

 

But again, if anyone has other suggestions I'm happy to try them. Also thanks so very ,very much to ebr for spending so much time with this! 

  • Like 1
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
×
×
  • Create New...