Jump to content

Android App Playback Broken


Recommended Posts

chiefnerd
Posted (edited)

Strange one this- it isn't the app causing it because I've back tracked a few versions to one I know 100% was working across the board and it affects both Android TV and Android Mobile App. As far as I can figure iOS apps are unaffected.

 

Now direct play to the App's player works but that's it- if it requires transcoding it's broken, Live TV broken (won't transcode) but as soon as you do it in the web interface (on Android) all works as it should.

 

At one point Live TV would only work in an external player but that no longer even works but if a movie requires transcoding it'll work in an external player.

 

I've checked the logs and true enough- Live TV when opened via the web interface triggers transcoding, when opened via the app it does not trigger any transcoding so that's the issue as far as I can figure out. 

 

Is anyone else having the same issue - as in, is it a known issue or is it specific to me and possible best off uninstalling, removing all emby files and reinstalling again?

Edited by chiefnerd
chiefnerd
Posted

It won't even generate a transcoding log if playback is started from the app for Live TV, do it via the web interface it starts a log straight away. In the main server log it just shows this error:

 

2017-01-07 07:12:38.7461 Info HttpClient: Found userInfo in url: emby:floppy123 ... url: http://emby:floppy123@163.172.20.179:9981/stream/channelid/1834668002?ticket=E7835580FFB9CA33A6471A48FE2D0EF12A981039&profile=pass
2017-01-07 07:12:38.7484 Error HttpServer: Error processing request
*** Error Report ***
Version: 3.1.2.0
Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe -restartpath /usr/lib/emby-server/restart.sh
Operating system: Unix 3.13.0.106
64-Bit OS: True
64-Bit Process: True
Mono: 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 28 20:21:39 UTC 2016)
Processor count: 40
Program data path: /var/lib/emby-server
Application directory: /usr/lib/emby-server/bin
System.ArgumentOutOfRangeException: value
Parameter name: Must be >= 0
 at SocketHttpListener.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x0003a] in <b95bb480f67e4723bc930e5ac02dc79f>:0 
 at Emby.Server.Implementations.HttpServer.SocketSharp.WebSocketSharpResponse.SetContentLength (System.Int64 contentLength) [0x00000] in <94cb9849d4534920b1b6cc233e9f2dbd>:0 
 at ServiceStack.HttpResponseExtensionsInternal+<WriteToResponseInternal>c__async1.MoveNext () [0x001b9] in <eaf6c545840d4e8a8d2971c7a6b76dd0>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
 at ServiceStack.Host.RestHandler+<ProcessRequestAsync>c__async1.MoveNext () [0x00253] in <eaf6c545840d4e8a8d2971c7a6b76dd0>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
 at Emby.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>c__async0.MoveNext () [0x00668] in <94cb9849d4534920b1b6cc233e9f2dbd>:0 
System.ArgumentOutOfRangeException
 at SocketHttpListener.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x0003a] in <b95bb480f67e4723bc930e5ac02dc79f>:0 
 at Emby.Server.Implementations.HttpServer.SocketSharp.WebSocketSharpResponse.SetContentLength (System.Int64 contentLength) [0x00000] in <94cb9849d4534920b1b6cc233e9f2dbd>:0 
 at ServiceStack.HttpResponseExtensionsInternal+<WriteToResponseInternal>c__async1.MoveNext () [0x001b9] in <eaf6c545840d4e8a8d2971c7a6b76dd0>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
 at ServiceStack.Host.RestHandler+<ProcessRequestAsync>c__async1.MoveNext () [0x00253] in <eaf6c545840d4e8a8d2971c7a6b76dd0>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
 at Emby.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>c__async0.MoveNext () [0x00668] in <94cb9849d4534920b1b6cc233e9f2dbd>:0 
chiefnerd
Posted

And transcoding log when played via web app:

 

 
{"Protocol":"Http","Id":"9535509e893341919cd173d7bb42b1da_cff41bf69b469a90b1c1bb5c9c7e512a","Path":"http://emby:floppy123@163.172.20.179:9981/stream/channelid/1878649543?ticket=E1F7D7F8CDEC048627AE8851BDAC83CAD802C84D&profile=pass","Type":"Default","Container":"mpegts","ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":true,"RequiresOpening":true,"RequiresClosing":true,"SupportsProbing":true,"LiveStreamId":"a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_9535509e893341919cd173d7bb42b1da_cff41bf69b469a90b1c1bb5c9c7e512a","MediaStreams":[{"Codec":"h264","TimeBase":"1/90000","CodecTimeBase":"1/50","NalLengthSize":"0","IsInterlaced":false,"BitRate":3000000,"BitDepth":8,"RefFrames":1,"IsDefault":false,"IsForced":false,"Height":720,"Width":1280,"AverageFrameRate":25,"RealFrameRate":25,"Profile":"High","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":31,"IsAnamorphic":false},{"Codec":"aac","Language":"eng","TimeBase":"1/90000","CodecTimeBase":"1/48000","DisplayTitle":"EngAAC stereo","IsInterlaced":false,"ChannelLayout":"stereo","BitRate":123000,"Channels":2,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":123000,"RequiredHttpHeaders":{},"DefaultAudioStreamIndex":1}
 
/usr/bin/ffmpeg -fflags +genpts -i "http://emby:floppy123@163.172.20.179:9981/stream/channelid/1878649543?ticket=E1F7D7F8CDEC048627AE8851BDAC83CAD802C84D&profile=pass"-map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -flags -global_header -fflags +genpts -map_metadata -1 -map_chapters -1 -threads 4 -codec:a:0 copy -y "/var/lib/emby-server/transcoding-temp/733d6d5711cb2b72ce14199c2939a123.mkv"
 
 
ffmpeg version 3.2.2 Copyright © 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
  Duration: N/A, start: 1.400000, bitrate: N/A
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [sAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](eng): Audio: aac (LC) ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp, 132 kb/s
Output #0, matroska, to '/var/lib/emby-server/transcoding-temp/733d6d5711cb2b72ce14199c2939a123.mkv':
  Metadata:
    encoder         : Lavf57.56.100
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1280x720 [sAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 132 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Posted

can you please attach the complete emby server log? thanks.

Posted

ffmpeg 3.2.x is probably the cause. Try downgrading to 3.1.x or earlier

 

 

Sent from my SM-G900F using Tapatalk

chiefnerd
Posted

I'll have to make a stripped version- logs tend to be massive.

 

This from a restart then trying to play from the app, then playing from web interface (will also be other things).

server-63619371355.txt

Posted

so this is only affecting live tv?

chiefnerd
Posted (edited)

Live TV won't work at all in the app and any video that needs to be transcoded will only work in an external player.

 

 

If it helps everything is via Nginx Reverse Proxy and Cloudflare as well but the exact same issue persists if I access direct and the only other change is to the conf file as follows:

 

MONO_ENV="MONO_THREADS_PER_CPU=400 MONO_GC_PARAMS=nursery-size=512m"

 

We have 128GB Ram on that server but I've found anything more than 512m nursery size throws some queer errors.

Edited by chiefnerd
Posted

Well the video file scenario is an easy one. You're using ffmpeg 3.2 and we've identified a regression in ffmpeg that is affecting all of our apps that transcode to mkv. So the solution for that is to use an earlier version of ffmpeg.

chiefnerd
Posted (edited)

If you'd like access to login and try it yourself I'm more than happy to give you access...you can also let me know if you think it's quick enough with your changes and also running via reverse proxy.

 

I've tried various settings with the transcode to set to Off, and also MP4- still persists but I thought by default Emby uses it's own version of FFMPEG rather than a user installed version?

Edited by chiefnerd
Posted

it's using your system installed version, which is at

-ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe

so if you can replace those with something slightly older than you should be good to go with video files. 

 

I see the problem with live tv and it is different. It is trying to stream it in a way that's not possible because it's from a remote source, so that is easily handled.

chiefnerd
Posted

I'll have a look at the ffmpeg issue and is there any code I can quickly change to sort the Live TV out?

 

It's been seriously driving me up the wall- we were using the TVHeadend plugin but ti's all over the place so I've resorted to making an m3u of the tvheadend outputs.

chiefnerd
Posted

I've quite literally just uninstalled the version of ffmpeg I had so now it's using the installed version of FFMPG that came with Emby- that OK? But still nothing with Live TV.

chiefnerd
Posted (edited)

Something seriously amiss with Live TV, just checked the TV Server- Emby opens a stream, then immediately closes it- opens another stream without waiting then opens ANOTHER stream leaving 2 streams running from the Server without any output to the app- 1st stream opened shows valid user agent the subsequent 2 streams have user agent showing as blank as well- it's very odd behaviour. This only happens if accessed from the App, via web interface it opens the stream, tests it and re-opens it- both showing correct user agent, no duplicate streams opened...this really is very, very strange.

Edited by chiefnerd
chiefnerd
Posted

Another update- I've extracted that ffmpeg archive and quite literally just overwrote the included FFMPEG and reset permissions and ownership and I've suddenyl got Live TV working in the app again but the 2 versions seemed identical so maybe something was corrupt- I'm still testing now.

chiefnerd
Posted

Nope- worked for a little while then back to exactly the same behaviour- opens a stream on the server, drops it, re-opens 2 more streams both with user agent details missing and not accepting any data ie the stream output is 0.

 

This is pretty major glitch this- do you have any idea what is causing it?

chiefnerd
Posted

Already provided the logs before - nothing else has changed

chiefnerd
Posted

More logs...server log should show me trying a channel in the app 3 times and failing, followed by 1 attempt in the web interface with success. Also attached the successful log from the playback in the web interface.

 

Very quickly checking and there's an error in the emby URL and is showing as port 8096- the reverse proxy is setup for 80, the app is connecting over 80, web interface connected via 80, emby external url is set to 80 but in the log it reports 8096. Seems to be working despite the wrong port for some reason but it's something of note. And yes, the issue is persistent whether I connect via the proxy or direct to IP.

ffmpeg-directstream-8982a5d7-6fdd-49a2-8d96-9f9829128990.txt

server-63619430400 (1).txt

Posted

Already provided the logs before - nothing else has changed

 

What has changed is your ffmpeg configuration. That's a pretty big change so that's why I asked to start from the beginning again.

Posted

Yea issue in your log now is what I mentioned in post #12, and that is resolved for the next release. Thanks.

  • 2 weeks later...
Posted (edited)

SOrry I didn't get back to you on this post Luke, so in the next server update you're sorting it or in the next App release?

 

Great support as always sorting things out- I really do not know why people are still using Plex, Emby does alot more and doesn't feel the need to offer branded support for specific things or 'partners' like Plex like to call them...keep up the great work.

 

FYI- just noticed Emby Theater is also affected. Seems the only apps able to play Live TV are iOS.

Edited by chiefnerd
  • 2 weeks later...

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...