Video Streaming not working on Android

Need help? Post your questions here.

Moderator: moderators

Video Streaming not working on Android

Postby mfc_alpha » Tue May 27, 2014 2:10 pm

Hi,

I can not have video streaming on my nexus 4 (4.4.2) using subsonic 4.3.1.
Mx player is installed (v 1.7.26) and subsonic configured to use it.

When a movie is selected, a black loading screen apear. Just after video control appear, the player quit back to file selection.

Streaming is correctly working with the webUi.


In attachment or below, the server log (ArchLinux with subsonic 4.9-1) and adb log

Adb log
Code: Select all
--------- beginning of /dev/log/main
D/dalvikvm( 1893): GC_CONCURRENT freed 405K, 5% free 9445K/9928K, paused 3ms+16ms, total 38ms
I/goggles ( 1893): k: Checking for images newer than 1401094547561
--------- beginning of /dev/log/system
I/ActivityManager(  594): START u0 {flg=0x4000000 cmp=net.sourceforge.subsonic.androidapp/.activity.SelectArtistActivity} from pid 31046
I/MediaFocusControl(  594):   Remote Control   registerMediaButtonIntent() for PendingIntent{42112390: PendingIntentRecord{4291a380 net.sourceforge.subsonic.androidapp broadcastIntent}}
I/subsonic.FileUtil(31046): Deserialized object from /data/data/net.sourceforge.subsonic.androidapp/cache/indexes-2051236731.ser
I/ActivityManager(  594): Displayed net.sourceforge.subsonic.androidapp/.activity.SelectArtistActivity: +133ms
W/SurfaceFlinger(  175): couldn't log to binary event log: overflow.
I/ActivityManager(  594): START u0 {cmp=net.sourceforge.subsonic.androidapp/.activity.SelectAlbumActivity (has extras)} from pid 31046
D/subsonic.RESTMusicService(31046): Connections in pool: 3
I/subsonic.RESTMusicService(31046): Using URL http://MY_HOST:4040/rest/getMusicDirectory.view?u=admin&p=enc:636861726c696d&v=1.2.0&c=android&id=10418
I/MediaFocusControl(  594):   Remote Control   registerMediaButtonIntent() for PendingIntent{41f7aa80: PendingIntentRecord{4291a380 net.sourceforge.subsonic.androidapp broadcastIntent}}
I/ActivityManager(  594): Displayed net.sourceforge.subsonic.androidapp/.activity.SelectAlbumActivity: +126ms
W/SurfaceFlinger(  175): couldn't log to binary event log: overflow.
I/subsonic.RESTMusicService(31046): http://MY_HOST:4040 redirects to http://MY_HOST:4040
D/subsonic.MusicDirectoryParser(31046): Got music directory in 4ms.
D/AlarmManagerService(  594): Kernel timezone updated to -120 minutes west of GMT
D/MobileDataStateTracker(  594): default: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=default
D/MobileDataStateTracker(  594): default: Received state=CONNECTED, old=CONNECTED, reason=(unspecified)
I/GCoreUlr( 1076): Starting service, intent=Intent { act=com.google.android.location.reporting.ACTION_LOCATION_STATUS cmp=com.google.android.gms/com.google.android.location.reporting.service.DispatchingService (has extras) }, extras=Bundle[{status=LocationStatus[cell status: STATUS_SUCCESSFUL, wifi status: STATUS_TIMED_OUT_ON_SCAN, elapsed realtime ns: 16729182449867]}]
D/GCoreUlr( 1076): Throttling analytics event: entity, ApiMetadataStore:save_attempt, 1
D/GCoreUlr( 1076): Throttling analytics event: entity, ApiMetadataStore:saved, 1
I/subsonic.RESTMusicService(31046): Using video URL: http://MY_HOST:4040/rest/stream.view?u=admin&p=enc:636861726c696d&v=1.2.0&c=android&id=10497&format=raw
I/ActivityManager(  594): START u0 {act=android.intent.action.VIEW dat=http://MY_HOST:4040/rest/stream.view?u=admin&p=enc:636861726c696d&v=1.2.0&c=android&id=10497&format=raw typ=video/* pkg=com.mxtech.videoplayer.ad cmp=com.mxtech.videoplayer.ad/com.mxtech.videoplayer.ActivityScreen$WebDelegate (has extras)} from pid 31046
I/ActivityManager(  594): START u0 {act=android.intent.action.VIEW dat=http://MY_HOST:4040/rest/stream.view?u=admin&p=enc:636861726c696d&v=1.2.0&c=android&id=10497&format=raw typ=video/* flg=0x10000 pkg=com.mxtech.videoplayer.ad cmp=com.mxtech.videoplayer.ad/.ActivityScreen (has extras)} from pid 29871
V/MX.Player.Screen(29871): onCreate (com.mxtech.videoplayer.ad.ActivityScreen@41f92d80) dat=http://MY_HOST:4040/rest/stream.view?u=admin&p=enc:636861726c696d&v=1.2.0&c=android&id=10497&format=raw
V/MX.Player.Screen(29871):     << Extra >>
V/MX.Player.Screen(29871):  1) title=Iron.Man.[2008.French].DVDRip.DivX-LTT
V/MX.Player.Database(29871): States not found: http://MY_HOST:4040/rest/stream.view?u=admin&p=enc:636861726c696d&v=1.2.0&c=android&id=10497&format=raw (1ms)
I/MediaFocusControl(  594):  AudioFocus  requestAudioFocus() from android.media.AudioManager@41efca58tz@41fa02b0
I/MediaFocusControl(  594):   Remote Control   registerMediaButtonIntent() for PendingIntent{4200cda8: PendingIntentRecord{427fed88 com.mxtech.videoplayer.ad broadcastIntent}}
D/MX.Player.Screen(29871): === Enter surfaceCreated. holder=android.view.SurfaceView$4@42004ca8 _surfaceHolderCreated=null_surfaceView=android.view.SurfaceView{42004698 V.E..... ......ID 0,0-768,1280 #7f070013 app:id/surfaceView}
V/MX.Player.Screen(29871): HW Accel=true
D/MX.Player.Screen(29871): === Leave surfaceCreated.
I/ActivityManager(  594): Displayed com.mxtech.videoplayer.ad/.ActivityScreen: +178ms (total +195ms)
D/MX.Player.Screen(29871): Set fullscreen = false
W/IInputConnectionWrapper(31046): showStatusIcon on inactive InputConnection
D/MX.Player.Builtin(29871): Calibrating 0ms
W/MX.Player.PP(29871): Skipping 2ndary player due to host is not local - MY_HOST/195.36.215.197
V/MX.Player.Joint(29871): Creating a joint player. 1st=pg@42011188 2nd=null mix=0
D/MediaPlayer(29871): Couldn't open file on client side, trying server side
I/AwesomePlayer(  178): setDataSource_l(URL suppressed)
W/SurfaceFlinger(  175): couldn't log to binary event log: overflow.
V/MX.Player.Joint(29871): Video size: 0 x 0
E/MediaPlayer(29871): Should have subtitle controller already set
V/MX.Player.Joint(29871): 1st prepared. duration=52471660ms
V/MX.Player.Joint(29871): start
D/audio_hw_primary(  178): out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
D/audio_hw_primary(  178): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
D/ACDB-LOADER(  178): ACDB -> send_afe_cal
D/dalvikvm(29871): GC_CONCURRENT freed 262K, 3% free 10087K/10384K, paused 7ms+4ms, total 62ms
E/AudioSink(  178): received unknown event type: 1 inside CallbackWrapper !
E/MP3Extractor(  178): Unable to resync. Signalling end of stream.
V/MX.Player.Screen(29871): Activity result: Result is not returned because 'return_result' extra was not set.
V/MX.Player.Builtin(29871): === Begin closing built-in player
W/TimedEventQueue(  178): Event 3 was not found in the queue, already cancelled?
V/MX.Player.Builtin(29871): === End closing built-in player
I/MediaFocusControl(  594):   Remote Control   registerMediaButtonIntent() for PendingIntent{42ef5008: PendingIntentRecord{4291a380 net.sourceforge.subsonic.androidapp broadcastIntent}}
D/MX.Player.Screen(29871): === Enter surfaceDestroyed. holder=android.view.SurfaceView$4@42004ca8 _surfaceHolderCreated=android.view.SurfaceView$4@42004ca8_surfaceView=android.view.SurfaceView{42004698 V.E..... ........ 0,0-768,1280 #7f070013 app:id/surfaceView}
D/MX.Player.Screen(29871): === Leave surfaceDestroyed.
I/MediaFocusControl(  594):  AudioFocus  abandonAudioFocus() from android.media.AudioManager@41efca58tz@41fa02b0
I/MediaFocusControl(  594):   Remote Control   unregisterMediaButtonIntent() for PendingIntent{42ce7218: PendingIntentRecord{427fed88 com.mxtech.videoplayer.ad broadcastIntent}}


Server log
Code: Select all
[2014-05-27 15:44:52,722] INFO PlayQueueInputStream - admin listening to "Iron.Man.[2008.French].DVDRip.DivX-LTT/Iron.Man.[2008.French].DVDRip.DivX-LTT.avi"
[2014-05-27 15:44:58,897] WARN RESTFilter - Error in REST API: EofException
org.mortbay.jetty.EofException
   at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
   at org.mortbay.jetty.AbstractGenerator$Output.blockForOutput(AbstractGenerator.java:546)
   at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:567)
   at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907)
   at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:628)
   at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:575)
   at net.sourceforge.subsonic.controller.StreamController.handleRequest(StreamController.java:221)
   at net.sourceforge.subsonic.controller.RESTController.stream(RESTController.java:1172)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:473)
   at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:410)
   at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
   at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
   at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
   at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at net.sourceforge.subsonic.security.RESTRequestParameterProcessingFilter.doFilter(RESTRequestParameterProcessingFilter.java:108)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
   at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.RESTFilter.doFilter(RESTFilter.java:55)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:313)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
   at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.io.IOException: Connexion ré-initialisée par le correspondant
   at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
   at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
   at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
   at sun.nio.ch.IOUtil.write(IOUtil.java:51)
   at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:487)
   at org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:166)
   at org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:208)
   at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:693)
   ... 68 more

Last edited by mfc_alpha on Fri Jun 13, 2014 5:45 pm, edited 1 time in total.
mfc_alpha
 
Posts: 4
Joined: Tue May 27, 2014 1:56 pm

Re: Video Streaming not working on Android

Postby mfc_alpha » Sat Jun 07, 2014 7:51 am

Any idea on that ?
mfc_alpha
 
Posts: 4
Joined: Tue May 27, 2014 1:56 pm

Re: Video Streaming not working on Android

Postby mfc_alpha » Fri Jun 13, 2014 5:48 pm

Should I provide more informations ?

Issue persist with Android 4.4.3
mfc_alpha
 
Posts: 4
Joined: Tue May 27, 2014 1:56 pm

Re: Video Streaming not working on Android

Postby GJ51 » Sat Jun 14, 2014 3:08 pm

Video streaming on Android is not well implemented. The fact is that somewhat analogous to ipv6 the transition from Flash to HTML5 is not taking place as fast nor as smoothly as one would hope.

Subsonic is built on a Flash based system that transcodes the video formats in your library to flv format. Unfortunately, Android has made great efforts to eradicate flash from recently released versions. If you own an Android phone, anytime you get an upgrade from your carrier, it will look for and disable the flash player.

The answer needs to come from the developer. There needs to be a workable transition to HTML5 for both music and video that works both on the desktop and on Android and other mobile devices. This has been talked about for several years, but there doesn't appear to be any progress.

The best way to get Flash working on Android is to "side load" it onto your device. There are instructions out on the web you can find easily by googling for them. Personally, I just got tired of doing it every time it gets wiped off my phone and just don't bother any more.

It would be really great if something were to change and as I've suggested multiple times there was a real move to HTML5 and separation of the default transcodings for desktop and mobile devices. I'm not a programmer so I don't know how feasible doing this really is, but I don't expect anything along these lines to happen anytime soon.

For now, video on Subsonic is primarily for desktop environments that have the bandwith and Flash installed to handle the output.

EDIT: You may also want to look at this post:

viewtopic.php?f=16&t=11173

EDIT: OK - after some testing I was able to use the settings in the post above and get video working on both Dsub and the Madsonic app by selecting MX Player as the default video player. It doesn't work with the Subsonic app yet, it does work with Dsub and Madsonic.

HTH.

Thank you for prompting me to look into this - it's something I've been wanting to fix for a long while and just didn't get to.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Re: Video Streaming not working on Android

Postby mfc_alpha » Sat Jun 14, 2014 10:09 pm

Hello,

Thank you for your explanations and link.
Indeed, flv format will disappear, specially on Android.

It may make sense to have different type of format for different type of client (As you may have, for a given web site, a web version and a mobile version).
But we are talking about development now, so it's not a bug, it's a feature :)

Thx
mfc_alpha
 
Posts: 4
Joined: Tue May 27, 2014 1:56 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 74 guests