Jump to content


Photo

Unable to stream to android app. Was previously working

streaming transcoding android app

  • Please log in to reply
20 replies to this topic

#1 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 19 January 2016 - 12:46 PM

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, 19 January 2016 - 12:47 PM.


#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:49 AM

Posted 19 January 2016 - 01:05 PM

what log is this from? are you sure that was from the android app?



#3 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 19 January 2016 - 01:31 PM

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.



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:49 AM

Posted 19 January 2016 - 01:34 PM

what is the version of the server?



#5 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 19 January 2016 - 02:05 PM

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, 19 January 2016 - 02:06 PM.


#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:49 AM

Posted 19 January 2016 - 02:28 PM

Yea the above error should be resolved in the last stable release. What OS are you on?



#7 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 19 January 2016 - 02:44 PM

ubuntu 14.04 LTS.  I'll look into a manual upgrade.  Don't know when the package will be updated.

 

Thanks for your help, Luke.



#8 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 21 January 2016 - 03:17 PM

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.



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:49 AM

Posted 21 January 2016 - 03:36 PM

Log not available.



#10 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 21 January 2016 - 04:32 PM

hmm.  dunno what happened.  Take 2:

 

http://pastebin.com/CmXtwHrZ



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:49 AM

Posted 21 January 2016 - 04:36 PM

Please provide the complete log file as well as the transcoding log if there was one, thanks.



#12 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 21 January 2016 - 05:14 PM

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.

http://pastebin.com/FYcK3dXY

 

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

 

There is a HTTP POST http://mydomain.com:...essions/Playing.

 

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

 

 

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

GET http://255.255.255.2.../stream.mkv?...

 

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, 21 January 2016 - 05:17 PM.


#13 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 25 January 2016 - 01:55 PM

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, 25 January 2016 - 01:58 PM.


#14 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 26 January 2016 - 06:28 PM

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.



#15 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:49 AM

Posted 26 January 2016 - 10:53 PM

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.



#16 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 28 January 2016 - 12:44 PM

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.



#17 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 28 January 2016 - 01:01 PM

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.



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139743 posts
  • Local time: 08:49 AM

Posted 28 January 2016 - 02:35 PM

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.



#19 miquelx OFFLINE  

miquelx

    Member

  • Members
  • 19 posts
  • Local time: 01:49 PM

Posted 29 January 2016 - 12:05 PM

@andrew0404
Regarding your issue with SSL, if you have a rooted phone I would be more then happy to help you installing the certificate as system for VLC to detect it.



#20 andrew0404 OFFLINE  

andrew0404

    Advanced Member

  • Members
  • 37 posts
  • Local time: 08:49 AM

Posted 01 February 2016 - 01:26 PM

Yes I am rooted.  where do I need to put the cert?  Would a valid certificate from letsencrypt fix the problem as well?







Also tagged with one or more of these keywords: streaming, transcoding, android app

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users