cwarren.qc 2 Posted January 26, 2015 Share Posted January 26, 2015 At some point in the last few months, the application "lost" the ability to direct stream to MxPlayer on my tablet. I did some tests and I think I found the problem. First, I tried all the settings in "Streaming Options" but it doesn't look like it's doing anything when using an external player. The URL that is sent to the external player is always the same (when looking in the android client log) : [Sat Jan 24 16:18:54 EST 2015] , Info , External player URL: http://192.168.1.100:25000/mediabrowser/videos/5a005324e30801200d239181968ff308/stream.ts?Params=;233a33634d9d604c;5a005324e30801200d239181968ff308;false;h264;aac;1;2;20552000;320000;;30.0;1920;1080;0;;1422134334986;;;; , 1 , main On the server, I saw that the stream was transcoded. Which was unexpected since the android client state that "The media is direct streamed rather the transcoded" when we choose the "External Player" option. After some digging in the server source code, I found the place where URL is parsed (in method "ParseParams" in MediaBrowser.Api/Playback/BaseStreamingService.cs) and noticed that the client gave an URL with "Static = false" to the External Player. To test my theory, I sent this URL directly to MxPlayer ("...;true;h264;aac..." instead of "...;false;h264;aac..."): http://192.168.1.100:25000/mediabrowser/videos/aaf343101d2ee244d4b51b90c2a20342/stream.ts?Params=;233a33634d9d604c;aaf343101d2ee244d4b51b90c2a20342;true;h264;aac;1;2;20552000;320000;;30.0;1920;1080;0;;1422132883220;;;; And everything worked perfectly in MxPlayer! I could seek, I could see the duration of the video, etc. On the server, I could see that the stream was not transcoded. Link to comment Share on other sites More sharing options...
Luke 37064 Posted January 26, 2015 Share Posted January 26, 2015 great stuff. now we can look into why the app is passing that. Link to comment Share on other sites More sharing options...
dark_slayer 103 Posted January 26, 2015 Share Posted January 26, 2015 Have you tried toggling the setting "strict h264" mode under streaming options? Link to comment Share on other sites More sharing options...
cwarren.qc 2 Posted January 27, 2015 Author Share Posted January 27, 2015 Yes, I tried all the possibilities in "Streaming Options" (HLS On/Off, Strict H264 On/Off). I didn't see anything difference, including the URL that is send to the External Player. Link to comment Share on other sites More sharing options...
dark_slayer 103 Posted January 27, 2015 Share Posted January 27, 2015 Hmm, out of ideas then Link to comment Share on other sites More sharing options...
jepsefan 0 Posted March 31, 2015 Share Posted March 31, 2015 I have the same problem With H265. Link to comment Share on other sites More sharing options...
cwarren.qc 2 Posted April 7, 2015 Author Share Posted April 7, 2015 I installed the latest version (2.2.19) on my tablet. It's a lot better but the streams are still transcoded. At least, now, with "HLS Support = On", I can see the duration of the video, seek, etc with an external player (MX Player). Which is almost as good as direct streaming. I checked the source code a little bit to see what changed. I noticed that the URL format is more 'explicit' : http://192.168.1.100:25000/mediabrowser/videos/b6fad03caea981b866d333848aa8387b/stream.webm?DeviceId=233a33634d9d604c&MediaSourceId=b6fad03caea981b866d333848aa8387b&VideoCodec=vpx&AudioCodec=vorbis&AudioStreamIndex=1&VideoBitrate=20552000&AudioBitrate=320000&ClientTime=1428359441302&PlaySessionId=2b34a7425639444a816dcf1940493672&api_key=053554cee8594654a1e1b6d656b83a3f I was still able to "force" a direct stream by adding "&Static=true" at the end of the URL: http://192.168.1.100:25000/mediabrowser/videos/b6fad03caea981b866d333848aa8387b/stream.webm?DeviceId=233a33634d9d604c&MediaSourceId=b6fad03caea981b866d333848aa8387b&VideoCodec=vpx&AudioCodec=vorbis&AudioStreamIndex=1&VideoBitrate=20552000&AudioBitrate=320000&ClientTime=1428359441302&PlaySessionId=2b34a7425639444a816dcf1940493672&api_key=053554cee8594654a1e1b6d656b83a3f&Static=true I didn't have access to some of the class of the android client (StreamInfo, StreamBuilder, etc) but I assume that the java class have the same method/properties as the c# ones (ex. https://github.com/MediaBrowser/MediaBrowser/blob/master/MediaBrowser.Model/Dlna/StreamInfo.cs).If that's the case, I wonder if the following change could fix the problem: in PlayerHelpers.buildExternalPlayerStreamInfo, add the bold line: AppLogger.getLogger().Info("Create StreamInfo"); StreamInfo streamInfo = new StreamBuilder(AppLogger.getLogger()).BuildVideoItem(options); streamInfo.setPlayMethod(PlayMethod.DirectStream); Link to comment Share on other sites More sharing options...
Luke 37064 Posted April 7, 2015 Share Posted April 7, 2015 No there's a separate external player profile that's intended to direct stream everything. So that's what needs to be looked at Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now