Android support is lackluster?

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Tyestor
Posts: 66
Joined: Fri Oct 05, 2012 6:19 pm
Location: Brisbane, Australia
Contact:

Android support is lackluster?

Post by Tyestor »

As the title says, Android support appears to be lackluster. The Android .conf is very barebones. At least compared to other .confs (like the PS3.conf, for example). Can someone either help me create a .conf that works well for at least Nexus 7 2013s (flo) or someone that knows way more about building. conf files (which is probably a lot of people) add to it in a meaningful way and I'll be happy to test and report on it. One of my main issues, other than a poor .conf (perhaps the they are related?), is that it doesn't appear that any settings in UMS are being applied to the video file being played on my device. For example, I disabled subtitles in UMS but they still appeared when I played a video file on my device (BubbleUPnP => Library => Universal Media Server => <filepath to video> => Tap thumbnail for video => Video opens in MXPlayer). Also, since I primarily watch anime and since a lot of anime nowadays is released in 10-bit h.264 in an mkv container, there really should be a way to force transcode 10-bit videos to 8-bit (or whatever is done to make them playable on PS3 since my PS3 doesn't have any issues with playing 10-bit mkvs even though it can't play mkvs or 10-bit files). Even though my N7 2013 can play 10-bit videos, they are quite laggy (heavy framedrops). My nexus doesn't have any trouble with 8-bit files regardless of resolution or bitrate.

Currently, I'm using MX Player (with the ARMv7 Neon custom codec) as my player, BubbleUPnP for my Android DLNA renderer and UMS for my PC DLNA server (obviously). My device is a Nexus 7 2013 (flo) using Cyanogenmod 11.

Thanks.
Goldfire
Posts: 10
Joined: Fri Dec 05, 2014 6:38 pm
Location: Sydney, Australia

Re: Android support is lackluster?

Post by Goldfire »

If you're interested in doing a workaround that I use, read on, otherwise wait for someone else to chime in and give you something more solid, but, I actually use this daily to catch up on my shows and it works perfectly.
I have an older TF300T tablet that just quite doesn't have the grunt to play raw 10bit files back without some sort of assistance, which is also quite a bit weaker than your Nexus 7 '13. Not having enough power is annoying because sometimes I'd rather watch 10bit anime in bed before going to sleep as opposed to sitting in the loungeroom/at the computer.

Because there isn't much support for Android, I use XBMC that connects to UMS and the computer transcodes everything and sends it over. I know this is double (or more like triple) handling, but, it works:

1) Grab XBMC for Android here: http://mirrors.kodi.tv/releases/android ... bi-v7a.apk
2) Close UMS and Insert this into the XBMC.conf:

Code: Select all

#----------------------------------------------------------------------------
# Profile for Xbox Media Center.
# See DefaultRenderer.conf for descriptions of all the available options.
#

RendererName = XBMC
RendererIcon = xbmc.png

# ============================================================================
# This renderer has sent the following string/s:
#
# User-Agent: XBMC/10.0 r35648 (Mac OS X; 11.2.0 x86_64; http://www.xbmc.org)
# User-Agent: Platinum/0.5.3.0, DLNADOC/1.50
# ============================================================================
#

UserAgentSearch = Neptune|Platinum|XBMC

TranscodeAudio = WAV
DefaultVBVBufSize = true
MuxDTSToMpeg = true
WrapDTSIntoPCM = false
H264Level41Limited = false
MaxVideoBitrateMbps = 30
MaxVideoWidth = 1280
MaxVideoHeight = 720
TranscodeExtensions = mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi

# Supported subtitles formats:
SupportedExternalSubtitlesFormats = SUBRIP
SupportedInternalSubtitlesFormats = SUBRIP
This will basically force UMS to transcode the file types "mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi" and force it down to 720p (because, let's face it, you won't really see a difference between 720p and 1080p on a 7" screen), it'll also force it down to 30Mbps to lessen the load on your wireless (Wireless N 2.4GHz or 5.0GHz strongly recommended).

3) Load up UMS and XBMC on your Nexus
4) In XBMC, Files => Add Videos... => Browse => UPnP Devices => Universal Media Server => OK => OK

You should be able to browse around and view the files you want. For true styling and proper font rendering, follow my short guide here: viewtopic.php?f=9&t=2551 - this will give you a 1:1 playback for anime that uses special fonts, rather than font substituting.

Early on before I worked this method out for myself, I tried all different approaches similar to yours with BubbleUPnP and others. If this method works for you, you might as well go ahead and remove BubbleUPnP. Keep MX Player though for viewing other things, which is especially helpful when using ES File Explorer and pulling over simple files on the fly like 8bit MKV, MP4 or AVI - Note that MX doesn't quite give you full styling like UMS transcoding when using that guide I linked to.

If that works for you, let me know. I use it on two devices currently and they both work fine.
10bit files do actually work perfectly fine on MX Player, but you need quite a bit of grunt (tested on my Z2 @ 2.3GHz Quad)

EDIT: Fixed the conf file above.
Last edited by Goldfire on Mon Dec 08, 2014 12:28 am, edited 1 time in total.
Tyestor
Posts: 66
Joined: Fri Oct 05, 2012 6:19 pm
Location: Brisbane, Australia
Contact:

Re: Android support is lackluster?

Post by Tyestor »

Yeah, your method works. Subtitles now disable/enable when unchecked/checked in UMS (so probably an issue with Android.conf since XBMC uses XBMC.conf). My 10-bit file is now no longer laggy (is it being transcoded?). However, you're right, this is a workaround. I don't like XBMC's UI AT ALL and I really don't want to be forced to use it. Video quality is also noticeably worse (for me, anyway, with my glorious 1920x1200 IPS screen) too using XBMC instead of MX Player. It really would be nice too for the UMS devs to fix subtitle problems (fixes are in the works for MX Player: http://forum.xda-developers.com/apps/mx ... s-t2718297).

Thanks anyway dude, I'll use this for now until Android support is better although I have little faith since I did post about this last year and little-nothing has been done about it.
Goldfire
Posts: 10
Joined: Fri Dec 05, 2014 6:38 pm
Location: Sydney, Australia

Re: Android support is lackluster?

Post by Goldfire »

Tyestor wrote:Yeah, your method works. Subtitles now disable/enable when unchecked/checked in UMS (so probably an issue with Android.conf since XBMC uses XBMC.conf). My 10-bit file is now no longer laggy (is it being transcoded?). However, you're right, this is a workaround. I don't like XBMC's UI AT ALL and I really don't want to be forced to use it. Video quality is also noticeably worse (for me, anyway, with my glorious 1920x1200 IPS screen) too using XBMC instead of MX Player. It really would be nice too for the UMS devs to fix subtitle problems (fixes are in the works for MX Player: http://forum.xda-developers.com/apps/mx ... s-t2718297).

Thanks anyway dude, I'll use this for now until Android support is better although I have little faith since I did post about this last year and little-nothing has been done about it.
No worries. Anything with these extensions are being forced to transcode: mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi - I know that the stock XBMC is pretty shit, so, go into your Settings => Appearance => Skin => Get More... => re-Touched - you'll have a much nicer time using that theme compared to stocko - hopefully that will alleviate some of your dislike with the UI.

If you feel that the quality is worse (I couldn't really see too much of a degradation in quality, but then again, my TF300T screen is 720p), try upping the "MaxVideoBitrateMbps = 30" to something closer 60-80 and remove the "MaxVideoWidth = 1280" / "MaxVideoHeight = 720" lines so you'll receive 1080p resolution content rather than it downscaling to 720p (assuming the content is 1080p of course) - you'll need to fiddle around with the max bitrate and/or resolution until you find something that's right - I mainly look at trying to lessen the load so there are no hiccups during playback.

As for MX Player, I still use it for many different things myself, but anything 10-bit or subtitled, I have to use with XBMC - unless you have quite a lot of grunt on the CPU.
Tyestor
Posts: 66
Joined: Fri Oct 05, 2012 6:19 pm
Location: Brisbane, Australia
Contact:

Re: Android support is lackluster?

Post by Tyestor »

Goldfire wrote:
Tyestor wrote:Yeah, your method works. Subtitles now disable/enable when unchecked/checked in UMS (so probably an issue with Android.conf since XBMC uses XBMC.conf). My 10-bit file is now no longer laggy (is it being transcoded?). However, you're right, this is a workaround. I don't like XBMC's UI AT ALL and I really don't want to be forced to use it. Video quality is also noticeably worse (for me, anyway, with my glorious 1920x1200 IPS screen) too using XBMC instead of MX Player. It really would be nice too for the UMS devs to fix subtitle problems (fixes are in the works for MX Player: http://forum.xda-developers.com/apps/mx ... s-t2718297).

Thanks anyway dude, I'll use this for now until Android support is better although I have little faith since I did post about this last year and little-nothing has been done about it.
No worries. Anything with these extensions are being forced to transcode: mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi - I know that the stock XBMC is pretty shit, so, go into your Settings => Appearance => Skin => Get More... => re-Touched - you'll have a much nicer time using that theme compared to stocko - hopefully that will alleviate some of your dislike with the UI.

If you feel that the quality is worse (I couldn't really see too much of a degradation in quality, but then again, my TF300T screen is 720p), try upping the "MaxVideoBitrateMbps = 30" to something closer 60-80 and remove the "MaxVideoWidth = 1280" / "MaxVideoHeight = 720" lines so you'll receive 1080p resolution content rather than it downscaling to 720p (assuming the content is 1080p of course) - you'll need to fiddle around with the max bitrate and/or resolution until you find something that's right - I mainly look at trying to lessen the load so there are no hiccups during playback.

As for MX Player, I still use it for many different things myself, but anything 10-bit or subtitled, I have to use with XBMC - unless you have quite a lot of grunt on the CPU.
Yeah, I changed the MaxVideoHeight parameter to 1200 so my Nexus wasn't being limited. I'll change the Bitrate too, most of the anime I watch are Bluray encodes (unless they're old/airing).

Curious why there isn't more specific parameters on what to transcode. Why just filetypes? Why not specific bit-depths (don't transcode 8-bit, transcode 10-bit)? Why not encode formats (don't transcode h.264, transcode h.265, vp9 etc...). Like, Nexus 7s are capable of playing 10-bit, h.264 mkvs but not well. So why can't UMS detect when my N7 is trying to play said file and just transoce those specific files instead of just transcoding every .mkv, regardless of what's inside (8-bit, which it can play easily, for example would still be transcoded)? I'm probably not explaining my thoughts very well but UMS' current implementation is essentially a "nuke it from orbit" approach. Transcoding is good but it should only be used when necessary, not for everything.

Anyway, thanks though lol.
Goldfire
Posts: 10
Joined: Fri Dec 05, 2014 6:38 pm
Location: Sydney, Australia

Re: Android support is lackluster?

Post by Goldfire »

Tyestor wrote:Yeah, I changed the MaxVideoHeight parameter to 1200 so my Nexus wasn't being limited. I'll change the Bitrate too, most of the anime I watch are Bluray encodes (unless they're old/airing).

Curious why there isn't more specific parameters on what to transcode. Why just filetypes? Why not specific bit-depths (don't transcode 8-bit, transcode 10-bit)? Why not encode formats (don't transcode h.264, transcode h.265, vp9 etc...). Like, Nexus 7s are capable of playing 10-bit, h.264 mkvs but not well. So why can't UMS detect when my N7 is trying to play said file and just transoce those specific files instead of just transcoding every .mkv, regardless of what's inside (8-bit, which it can play easily, for example would still be transcoded)? I'm probably not explaining my thoughts very well but UMS' current implementation is essentially a "nuke it from orbit" approach. Transcoding is good but it should only be used when necessary, not for everything.

Anyway, thanks though lol.
Yea, give the bitrate changes a go, especially if your sources are Bluray - I normally save those high quality ones for the loungeroom.

And shit, I've made a mistake in that XBMC.conf file - it's meant to be "TranscodeExtensions =" and not "TranscodeVideo =", sorry about that. I wouldn't be able to answer your next few questions though (I'm not a dev), you can try changing "TranscodeExtensions = mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi" to "StreamExtensions = mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi" and then when you want to watch something that you know is 10-bit, go into the --TRANSCODE-- folder and choose FFmpeg from there - but then again, you're probably best off just using XBMC exclusively for 10-bit playback and MX Player + ES File Explorer for everything else.

For more info though, checkout the DefaultRenderer.conf file for more variables that you can use, there might actually be something in there that you can piece together. Like I said for my solution though, it's just a simple workaround/bandaid fix.

PS. Forgot to mention that when you update UMS, the conf files will be reset to default. Make a backup of the conf when you get it all sorted out to your liking.
Tyestor
Posts: 66
Joined: Fri Oct 05, 2012 6:19 pm
Location: Brisbane, Australia
Contact:

Re: Android support is lackluster?

Post by Tyestor »

Thanks.
Tyestor
Posts: 66
Joined: Fri Oct 05, 2012 6:19 pm
Location: Brisbane, Australia
Contact:

Re: Android support is lackluster?

Post by Tyestor »

Weird. I'm trying to better the Android.conf and well...something strange is happening. So, one of the reasons why my 10-bit file is lagging in MX Player and not XBMC is because every file was being streamed and not transcoded. So I decided to try and fix that.

I changed this:

Code: Select all

StreamExtensions = mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi,mp4,mpg,mpeg,mov
To this:

Code: Select all

TranscodeExtensions = mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi,mp4,mpg,mpeg,mov
But now my file won't even play. It's just giving me a "Can't play that link" error. For some reason, when I change that parameter from Stream to Transcode, BubbleUPnP detects my file as an MPEG (which is weird because it should still play, right?) and not an MKV. When I change it back to Stream, it starts working again (BubbleUPnP starts detecting it as an MKV again). Maybe it has something to do with what format my file is being transcoded into? Any ideas?
Goldfire
Posts: 10
Joined: Fri Dec 05, 2014 6:38 pm
Location: Sydney, Australia

Re: Android support is lackluster?

Post by Goldfire »

Tyestor wrote:But now my file won't even play. It's just giving me a "Can't play that link" error. For some reason, when I change that parameter from Stream to Transcode, BubbleUPnP detects my file as an MPEG (which is weird because it should still play, right?) and not an MKV. When I change it back to Stream, it starts working again (BubbleUPnP starts detecting it as an MKV again). Maybe it has something to do with what format my file is being transcoded into? Any ideas?
Hm, when UMS transcodes with FFmpeg, it's converted to MPEG-2 for maximum compatibility, which is usually why you're going to need that higher bitrate cap we were talking about earlier - it isn't nearly as efficient as H.264 for example. However, what you're saying is true, BubbleUPnP should be able to at least pass that on to MX Player.

I can't give you a proper answer as to why BubbleUPnP knocks it back, you're getting the same troubles that I went through months and months ago, as well as the headaches - I eventually worked out the XBMC method and stuck with that.

You can however, try this out. I don't have the equipment with me, so this is all untested, but should work in theory (everything works in theory, right?)

Close UMS and head back to your renderers folder, you'll notice a line there within the Google-Android.conf called "TranscodeAudio = MP3" - there's an equivalent for video as well, trying adding and tinkering with this line: "TranscodeVideo = "

The default for that line is: MPEGPS-MPEG2-AC3 - which is the MPEG-2 file you're seeing. Within XBMC + re-Touched theme, as a video is playing, tap the screen and turn on "Media Info" at the top, it'll then display what you're receiving: MPEG-2, 720p and Dolby Digital (which is AC3) and how many channels of audio.

As a test, you can try changing the "MPEGPS-MPEG2-AC3" to one of the following taken from the DefaultRenderer.conf:

Code: Select all

#    Profile            Video           Audio   Container
#    ----------------------------------------------------
#    MPEGPS-MPEG2-AC3   MPEG-2          AC-3    MPEG-PS
#    MPEGTS-MPEG2-AC3   MPEG-2          AC-3    MPEG-TS
#    MPEGTS-H264-AC3    H.264           AC-3    MPEG-TS
#    MPEGTS-H264-AAC    H.264           AAC     MPEG-TS
#    WMV:               WMV 2 (WMV 8)   WMA 2   ASF
I would recommend using "MPEGTS-H264-AAC" as a start and then starting UMS back up and giving it a go in XBMC (just to determine if the change is actually working) - if this works, you should, in theory, see the MPEG-2 change to H.264 or similar. If that works, try applying that to your Google-Android.conf file and see where that takes you.

Sorry I can't really help much more, like I said, once I had the XBMC method, I didn't really go back to looking for a solution with the native Android.conf - good luck with it though.

PS. Make sure you enter the --TRANSCODE-- folder and transcode with FFmpeg, otherwise MEncoder might chuck a fit.
Tyestor
Posts: 66
Joined: Fri Oct 05, 2012 6:19 pm
Location: Brisbane, Australia
Contact:

Re: Android support is lackluster?

Post by Tyestor »

XBMC Config:

Code: Select all

#----------------------------------------------------------------------------
# Profile for Xbox Media Center.
# See DefaultRenderer.conf for descriptions of all the available options.
#

RendererName = XBMC
RendererIcon = xbmc.png

# ============================================================================
# This renderer has sent the following string/s:
#
# User-Agent: XBMC/10.0 r35648 (Mac OS X; 11.2.0 x86_64; http://www.xbmc.org)
# User-Agent: Platinum/0.5.3.0, DLNADOC/1.50
# ============================================================================
#

UserAgentSearch = Neptune|Platinum|XBMC

TranscodeAudio = WAV
TranscodeVideo = MPEGTS-H264-AAC
DefaultVBVBufSize = true
MuxDTSToMpeg = true
WrapDTSIntoPCM = false
H264Level41Limited = false
MaxVideoBitrateMbps = 100
MaxVideoWidth = 1920
MaxVideoHeight = 1200
TranscodeExtensions = mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi,mp4,mpg,mpeg,mov,wmv

# Supported subtitles formats:
SupportedExternalSubtitlesFormats = ASS,SUBRIP
SupportedInternalSubtitlesFormats = ASS,SUBRIP
With that config in XBMC, I had to go into the transcode folder and manually select ffmpeg. If I don't do that (pick the file outside the transcode folder) I get not video but I do get audio. Testing BubbleUPnP and MX Player now.

Android Config:

Code: Select all

#----------------------------------------------------------------------------
# Profile for Android.
# See DefaultRenderer.conf for descriptions of all the available options.
#

RendererName = Android
RendererIcon = android.png

UserAgentSearch = Android

TranscodeAudio = MP3
TranscodeVideo = MPEGTS-H264-AAC
DefaultVBVBufSize = true
MuxDTSToMpeg = true
WrapDTSIntoPCM = false
H264Level41Limited = false
ChunkedTransfer = true
MaxVideoBitrateMbps = 100
MaxVideoWidth = 1920
MaxVideoHeight = 1200
TranscodeExtensions = mkv,hdmov,hdm,flac,fla,dts,ogg,asf,asx,m2v,avi,mp4,mpg,mpeg,mov,wmv

# Supported subtitles formats:
SupportedExternalSubtitlesFormats = ASS,SUBRIP
SupportedInternalSubtitlesFormats = ASS,SUBRIP
Video still doesn't play whether I go into the transcode folder or not. It also still says "MPEG" next to the file name in BubbleUPnP. Sigh.
Post Reply