XBMC Wrapper
#1
This app lets other players play xbmc media with small footprint through multiple methods.
The functions:
  • Samba access manipulation:
    • Auto mount as CIFS, and play from there (Medium CPU usage, perfect file handling)
    • Map to miniDLNA URL (given the database file), and play it (Low CPU usage, seek may not always work)
    • Stream over HTTP (High CPU usage, seek may not always work)
    • Replace the samba URL to local file path. (Only if your files are on the same device, e.g. if you have a shared xbmc database and playing on the server. Low CPU usage)
  • Re-stream HTTP specially for Allwinner A10 devices HW decoder.
  • Map XBMC PVR to TvHeadend Channels, and possibly re-stream. (*/* login for streaming required)
  • Use different external player per protocol

A little explanations:
Stream Samba shares over HTTP
It's almost the same (compared to SmbWrapper), only that it uses less CPU.

Auto mount as CIFS, and play from there
Mounts the given smb share to sdcard/xbmcwrapper with busybox and cifs, and plays the file from there.
Busybox should be in one of these places: "/system/bin/busybox", "/system/xbin/busybox", "/xbin/busybox", "/bin/busybox", "/sbin/busybox"
CIFS support in kernel required. UTF8 iocharset support in kernel recommended.

Map to miniDLNA URL
Given the miniDLNA files.db database (local or samba file), that contains the file you are trying to play, the wrapper will map the file to miniDLNA URL, and passes this to player.
You also need to specifiy the level to cut from samba url before searching in database.
E.g. you have a samba URL with smb://abc/disk/Movies/HD/abc.mkv, and your minidlna has the Movies directory set as root. In this case you need to to cut 2 leves (abc,disk) from samba URL.
This has the minimal CPU usage on both Server and Client side.

Re-stream HTTP specially for Allwinner A10 devices HW decoder.
Pre-buffers HTTP input, sometimes it can help HW decoder.

Map XBMC PVR to TvHeadend Channels, and possibly re-stream. (*/* login for streaming required)
I've made this for TvHeadend, as normally it would play in SW decoding mode which is unenjoyable. Now it uses HW decoder, if you use this wrapper.
With tvheadend 3.4patch1, and TvdVideo, it's possible to play in HW decoding mode without re-stream. (Less CPU usage)
XBMC uses its own id's for TV channels(the number before their name), you can set how to remap these to tvheadend channel id's to play in external player.
The syntax is the following:
Code:
<xbmcid>,<tvheadendid>;<xbmcid>,<tvheadendid>;...

Replace URL On-the-fly
If you are using mysql databse, you are accessing even local files over samba, which is a huge overhead. With this tool you can simply replace the samba url with a local file url, thus completely removing this overhead.

Download: https://play.google.com/store/apps/detai...bmcwrapper
Source: https://github.com/Xmister/XBMCWrapper
Reply
#2
Is the replace URL on-the-fly feature what I explained I was doing with cifsmanager back on birdy's thread?
Reply
#3
(2014-04-20, 04:21)dstealth Wrote: Is the replace URL on-the-fly feature what I explained I was doing with cifsmanager back on birdy's thread?

Not really, although it can be used together.
What you did was to change the database paths, which is not an options if someone is using mysql.
The replace feature is good for keeping the xbmc database in one format (e.g. samba), and then playing in an external player with another format. I've made this to play my local files without samba overhead.
You can use cifsmanager for remote files, and replace the url with this feature if you don't want this wrapper to stream the file for you, and instead you would like to rely on cifsmanager for the connection.
Reply
#4
Not sure how to use the wrapper... I changed my xbmc sources back to the direct smb links and tried using the wrapper but kept getting "this video could not be displayed" errors. Even tried Samba replace by entering "smb://PC/" rexplace with "file:///PC/" enabled and still didn't work....

Also, is there anyway to have it ADD the wrapper <player> extension into an existing playercorefactory.xml instead of replacing it? I mean there really isn't a need to keep an older playercorefactory.xml since the wrapper displays all players anyways but just incase someone has a particular player they like using for music or something. Luckily I had a backup of mine so I quickly just combined the two.
Reply
#5
I'm using AFP with XBMC to access my remote movies but I have the same problem of SMB.
Please, Can you add AFP protocol as one more option in XBMC Wrapper ?
Reply
#6
(2014-04-21, 19:35)dstealth Wrote: Not sure how to use the wrapper... I changed my xbmc sources back to the direct smb links and tried using the wrapper but kept getting "this video could not be displayed" errors. Even tried Samba replace by entering "smb://PC/" rexplace with "file:///PC/" enabled and still didn't work....

Also, is there anyway to have it ADD the wrapper <player> extension into an existing playercorefactory.xml instead of replacing it? I mean there really isn't a need to keep an older playercorefactory.xml since the wrapper displays all players anyways but just incase someone has a particular player they like using for music or something. Luckily I had a backup of mine so I quickly just combined the two.

The replace is for local files, e.g a sata drive connected to your board. For network shares you have to disable the replace and it will do a http stream . Or you have to replace it to locally mounted path, like "file:///mnt/sdcard/PC/", if you use cifs manager
Modifying the file is harder, and it's not the most important thing for me right now.

(2014-04-28, 23:16)aatrcoutinho Wrote: I'm using AFP with XBMC to access my remote movies but I have the same problem of SMB.
Please, Can you add AFP protocol as one more option in XBMC Wrapper ?

Probably yes.
Reply
#7
The solution with http stream is not good to link XBMC with external players... The solution of mount remote file system like local file systemis better because it goes in the root of the problem and we don't have to worry about problems in the upper layers (subtitle delays, audio sync types, etc.). But if you want to develop this solution you have to do better because some videos aren't playing with audio or subtitle.
Reply
#8
(2014-04-29, 02:38)aatrcoutinho Wrote: The solution with http stream is not good to link XBMC with external players... The solution of mount remote file system like local file systemis better because it goes in the root of the problem and we don't have to worry about problems in the upper layers (subtitle delays, audio sync types, etc.). But if you want to develop this solution you have to do better because some videos aren't playing with audio or subtitle.

Missing audio is not a problem of the stream, it's a codec problem (probably DTS), you have to download the codec for it. If subtitle is part of the stream, than it works too. Otherwise you have a few options, like subloader.
Reply
#9
Hi Xmister,

yesterday I discovered you thread about xbmc wrapper. I had not a lot of time, but I made a short installation and tried to use your XBMC Wrapper. The result was a big surprise: I started with your XBMC wrapper in playercorefactory the local videoplayerapp (Himedia Q10) a bluray.iso ... and it works !! unbelievable. This function is not useable with normal xbmc-installation. Nor Gotham or Frodo.

I understood that your motivation was to use the locale videoplayer-app of your device because of missing HW-acceleration in xbmc. That is the same problem what we have with the himedia devices. In the last weeks it becomes much better - but it is still the best solution to use the local vieoplayerapp instead of xbmc DVD-player. Especially for VC-1 coded video or video what is not "perfect".

Now I have some questions to the configuration:

I think - I do not need the TV Headend configuration, but I would like to use the PVR-functionality (dvbviewer) with the external player. Is this possible with the XBMC wrapper ?

What about the players-entries ? Will this add additional lines (and external players and rules) in playercorefactory or is the xbmc wrapper administrating the choice of the player?

And: samba replace.
On the himedia-devices we have the problem that we have to use mountpathes for using smb-shares. It seems that your idea is to make such a mount in xbmc-wrapper environment. Is thit right? How I have to use and configure it? Do I have to write in the lines the real smb-path ? And what is then? Do I have to install an empty folder f.e. in /nmt/sata/"folder4SMB" or is xbmc wrapper doing it itself so that I can use in xbmc the smb-shares in my network?

Ok, some that I will try in the next days and will report here. But maybe that you have some answers for me.
If it works how I think that it works: I think your tool is a big help for all users of android devices without HW-accelleration in xbmc. Especially for the himedia-community. :-)

Thank you for your good idea and therefore to implement it in this tool !!

SaEt9000
Reply
#10
now I have the first problem: I'm not able to save my changes ...
I tried to change a player or a path for samba. Then I exit the app and after restart the settings are the same as before. Where is the option to save the changes ?

I did my tries with version 1.1 and 1.2.

Thank you

SaEt9000
Reply
#11
(2014-05-19, 20:24)SaEt9000 Wrote: now I have the first problem: I'm not able to save my changes ...
I tried to change a player or a path for samba. Then I exit the app and after restart the settings are the same as before. Where is the option to save the changes ?

I did my tries with version 1.1 and 1.2.

Thank you

SaEt9000

Settings should be saved if you leave the app with the back button. If it still won't work, I will take a look.
About your other questions:
Using DVB Viewer would require rewriting the part that handles PVR, as it is now hard-coded to generate TVHeadend URL-s. That is, if DVBViewer streams can be accessed over http with a simple url.
You get the samba part wrong. The wrapper can do 2 things:
1. If your movies are local files, like you have a HDD connected to your Android, but still using samba because you have multiple XBMC instances with the same database: You can replace the samba path with a local file path, before starting the external player.
2. If your movies are over the network, the wrapper can make a http stream from them, and pass this to the external player, so you don't have to care about mounting samba shares locally.

Also, I'm sorry, but my time is really limited, so I can't guarantee an ETA of anything. And I won't be able to do anything at all from the middle of June until September.
Reply
#12
Thanks for you answer. I think, I understand.

But I have really the problem that my changes in configuration is not becoming saved. There is alway the same configuration after restarting the app.
Is there anywhere on the system a folder or a file where the configuration has to be saved? Maybe that there is something wrong on my system - but it is rooted and so it should not be a question of access-rights.

So could you please telle me, where the configuration should be saved and in which files?

Thank you !!

SaEt9000
Reply
#13
(2014-05-20, 22:13)SaEt9000 Wrote: Thanks for you answer. I think, I understand.

But I have really the problem that my changes in configuration is not becoming saved. There is alway the same configuration after restarting the app.
Is there anywhere on the system a folder or a file where the configuration has to be saved? Maybe that there is something wrong on my system - but it is rooted and so it should not be a question of access-rights.

So could you please telle me, where the configuration should be saved and in which files?

Thank you !!

SaEt9000

Well, it's the standard android settings api, so you will find everything in /data/data/hu.xmister.xbmcwrapper, but I'm not sure you can edit it by hand.
Reply
#14
A new version out, which tries to mount the remote share as a cifs filesystem and playing from there, thus completely removing http streaming and its issues.

V1.4 fixes HTTP bug introduced in 1.3, and supports more devices with CIFS mount. Also a "Save" menu option has been added.
Reply
#15
That sounds really interesting. I will test it in the next days and will give feedback.
Thanks for your work.

SsEt9000
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC Wrapper0