Jump to content

Unable to stream to android app. Was previously working


Recommended Posts

In my initial tests, I set up emby on android, connecting to a ubuntu server.  I had it connected via wifi, and tested playback with movies/tv, and even live tv.  All worked flawlessly.  Then I tested playback over 4G.  I was amazed that it worked, especially because I didn't use emby connect and I don't think I ever specified my public ip to the app.  But there I was streaming live tv and movies while sitting in the mall waiting on my wife.  I was very impressed.


Now, after dertermining that emby would suit my needs and testing emby for kodi locally on a spare Rpi, I am ready to transition over.  But all of a sudden playback on my phone doesn't work.  I haven't changed anything that I know of.  It doesn't matter if it is locally over wifi connected directly to the emby port, or externally over 4G going through my reverse proxy.


Streaming and transcoding work fine in chrome from an external location going through the reverse proxy.


On my phone I get: Playback error: There was an error processing the request.  Please try again later.


I know it attempting to transcode:

my transcode log: http://pastebin.com/2jFK5E8a


I don't know much about dlna profiles yet, thinking that since I am using the android and kodi plugins, and the web interface, I wouldn't be using dlna.  Are these profiles used for the app connection as well?  Maybe it is a profile issue.

Edited by andrew0404
Link to post
Share on other sites

Ok, to make sure, I restarted the server and removed all the logs.


Here is the server log: http://pastebin.com/Apm729pp


And the transcode log: http://pastebin.com/V4UXQ73U



So in messing around I was able to get another video to play.  So perhaps this is nothing more than a format issue.  I could have sworn that some of the videos that wont play now played before, but perhaps I am mistaken.

Link to post
Share on other sites

Version 3.0.5782.0


I know there is an update, but I installed using apt-get, and the package hasn't been updated yet.

Edited by andrew0404
Link to post
Share on other sites

Ok,  I still have a similar issue, but now its not trying to transcode.  Seems intermittent in that sometimes the same video will play, sometimes it fails with the same error as before.  However, it doesn't attempt to transcode.


Log: http://pastebin.com/qXvjtney\

no transcode log created.


I am now on Server Version 3.0.5786.0 on Ubuntu 14.04 LTS Trusty

Emby for Android Version 2.5.73 on Android 5.1.1


Web interface in chrome is transcoding as expected.

Link to post
Share on other sites

There was no transcode log.  That was the section of log during the attempt to play the video.  I started the capture before I started Emby for Android, and ended it a few seconds after the error message appeared.


I had already cleared out the logs to try to get a fresh logfile, during that I restarted the server.  Now the videos play just fine. 


I noticed a difference in the android app.  Before when I would hit play the spinning emby icon would pop up immediately, and quickly give the error.

Now, I get the android "waiting" icon (spinning circle) for several seconds (10-15) before the emby icon pops up.  Then the video begins playing. 


Here is the new server log with it working.



I notice a difference after line 16 of the original log...


There is a HTTP POST http://mydomain.com:8096/emby/Sessions/Playing.


after that in the first log, a HTTP Response 204 to Time: 10ms. http://mydomain.com:8096/emby/Sessions/Playing is received.  No content.



In the working log, after the HTTP POST http://mydomain.com:8096/emby/Sessions/Playing. (Line 584), no 204 is received, instead it is followed by two GET request, the second is the request for the stream:



Followed by the ffmpeg transcode command. 


I don't know what the error messages and socket exceptions are after I terminated the playback, or whether they are indicative of a problem.


I can't provide anything else until I see the problem again.  I'll check periodically.  It seems likely that something is occurring after the server has been active for a while that breaks it.  The odd thing is that transcoding over the web client was still working fine.  Obviously restarting the server fixed it.  I will hold on to the current logs, maybe they will shed some light on it if it breaks again.


Thanks, Luke.

Edited by andrew0404
Link to post
Share on other sites

After doing some testing, this is not a problem with the mobile app per say, it is an issue with apache redirects.  It is possibly an issue with the websocket connection.  But somehow it has worked on occasion.


here is the android log: http://pastebin.com/HBECuvHU


Things work if I forward a port and access the server directly.  From what I read, it is difficult to reverse proxy both the http and websocket traffic from the same place.  The websocket seems to be connecting at the root, while the http connection seems to be connecting at /emby.  Maybe I can create a forward for ws:// at the root, which is ok unless I have another app that I need to forward a ws connection for.


However, line 42 looks like it is opening a stream via http, and then it is aborted on line 45.  (Warning: invalid next index, aborted !)  Is it possible that this is the problem and not the websockets?  After all, it works from the browser on a PC just fine using the redirect.



Not sure where or when the websocket is used in emby, other than in the provided log.

Edited by andrew0404
Link to post
Share on other sites

I changed over to the server beta build: Version 3.0.5849.0

I have verified that there is an issue not related to reverse proxies.  I opened both port 8096 and port 8920 on my router.  Was able to connect over http to 8096 and had no issues.  I could stream just fine.


I decided that until I can fix the reverse proxy, at least I can use the ssl port.  I got my certificate configured, which is already trusted on my phone, and got it running.  I can connect just fine to 8920, log in, and browse my library, but when I start a stream I still have the "Playback Error: There was an error processing the request.  Please try again later" message.  I noticed a Socket.IO Error in the server log, not sure if that is any help.


Server Log: http://pastebin.com/cWvUrnZy

There were no transcode logs when playback failed.

Android Log: http://pastebin.com/HH7M0JwT


I tried all 3 connections in that log, reverse proxy via 443, http via 8096, and ssl via 8920.

Link to post
Share on other sites

Actually I do see one thing I can fix in the log, although I'm not sure it will change the outcome. But it's worth a shot. Please jump on the app's open beta if you're not already.


2.5.78 is the build number to try. Thanks.

Link to post
Share on other sites

It took a while for the beta to update on my phone.  I now have 2.5.79.  Still not streaming over 8920, which is no suprise.  You didn't think it would fix that, looks like it fixed the Socket errors though.



Server Log: http://pastebin.com/qxDSw2v6

Android Log: http://pastebin.com/HZELpRbd



Let me know if there is any other testing I can do to track this down.  I know that ssl support for android is new, but it seemed from the other threads that it was possible to get working currently.

Link to post
Share on other sites

So I reread the ssl thread, and I see that things aren't all working with ssl.  I am not using a self-signed cert, but one signed by my own CA, which is installed as a user cert, and seems to be an issue with vlc.  I will look into letsencrypt.  I should probably have one of those now anyway, for all of my ssl uses.

Link to post
Share on other sites

I think the issue is out of our control with vlc, but our version of libvlc is about 4 months old and we do plan to update it in the near future, so there's a half decent chance it will resolve itself. if it doesn't we can look at contingency plans then, like an option to just use the native player perhaps.

Link to post
Share on other sites

I don't know if this is the same issue I was having but I had the same "On my phone I get: Playback error: There was an error processing the request.  Please try again later." issue going on and I found my solution.


I had recently sold my Geforce 770, and was using Intel onboard video for a few weeks while I was waiting for the replacement.  During that time I changed the transcoding from Auto to Intel Quicksync, or whatever it's called, to try it out.  After I installed my new Geforce 970, I forgot to change it back to Auto....and started having this problem.  Took me a few days to remember what I had done and realized it started after I installed my Geforce again.


Just a thought, I don't know if this will help or not...but this may be helpful for the dev team to give a better error message if someone accidentally does the same thing I did.

Edited by coolspot
  • Like 1
Link to post
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...