Kodi Community Forum
[LINUX] XBMC for Linux port to ARM architecture CPU and SoC chips? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: [LINUX] XBMC for Linux port to ARM architecture CPU and SoC chips? (/showthread.php?tid=35139)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48


- pfbach - 2011-12-24

Allright, I managed to make it work now.
Had to compile gst-ducati (master) and gst-plugins-base (ti-branch) (with ./configure --prefix=/usr) to make it fix my segfault problem. I will make a tutorial so I remember next time.

I start xbmc as session from lightgdm.
I am using a Philips 42" 1080p LCD TV.

What I have noticed so far, is that:
Menu is much faster, and has a frame rate at 30fps(cpu0/cpu1 7%/30%), but dropping when changing between sub menus. (video, system etc).
- SD content plays with black screen (fps:8-9, cpu0/cpu1: 12%/15%), as mentioned a few posts ago by someone else I think.
- 720p and 1080p (x264 and mpeg4/xvid) are playing at a frame rate around 22-16fps(xvid around 28-20). Much better than last time I tried Smile. The CPU load stays around 60% for cpu0, and 45% for cpu1 when playing content.
- Subtitles are showing.

There is a difference in fps between watching via network (ethernet 100mbit) and from a usb drive. usb drive gives 28-18fps (720p) and 23-18fps (1080p).

video/audio becomes out of sync when playing.

Let me know if there is anything I can do or test in order to make this work even better.


- Bigsy - 2011-12-24

Spotted this today: http://www.dealextreme.com/p/1080p-dual-system-android-2-3-linux-media-player-w-wifi-sd-2xusb-lan-optical-hdmi-av-111103

Runs android AND linux apparently so perhaps a possible xbmc host, might be worth keeping an eye on, I'm desperate for some cheap 1080p capable arm hardware that will run xbmc.


- overflowed - 2012-01-05

Thanks robclark, i merged your get additions to my git based on opdenkamps and sd and hd video playback seems to work very well.

I have just two issues, first one is, when i seek the framerate is dropping down for a few seconds to around 3-5fps. This also happens when starting video.

The second one is a little bit stranger, when watching live TV i see four rectangles, the tv image two times on the left side and on the right side two times streched lines:

Image

Something similar i noticed when watching airplay videos.

The debug log says:


15:41:06 T:1350562880 DEBUG: CDVDPlayer::HandleMessages - player started 1
15:41:06 T:1330385984 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
15:41:06 T:1330385984 NOTICE: fps: 0,000000, pwidth: 720, pheight: 576, dwidth: 1024, dheight: 576
15:41:06 T:1330385984 DEBUG: OutputPicture - change configuration. 720x576. framerate: 0,00. format: EGLIMG
15:41:06 T:1103745568 NOTICE: Using GL_TEXTURE_2D
15:41:06 T:1103745568 DEBUG: GL: Requested render method: 0
15:41:06 T:1103745568 DEBUG: Shader - Loading shader file yuv2rgb_vertex_egl_image_external_gles.glsl
15:41:06 T:1103745568 DEBUG: Shader - Loading shader file yuv2rgb_egl_image_external_gles.glsl
15:41:06 T:1103745568 NOTICE: GL: Selecting eglImage shader
15:41:06 T:1103745568 DEBUG: GL: Vertex Shader compilation log:
15:41:06 T:1103745568 DEBUG: Success.

i think dheight should be 768? I am unsure if this is gstreamer related, but without gst it was fine.

Any suggestions? don't even know where to have a look.


- robclark - 2012-01-05

overflowed Wrote:Thanks robclark, i merged your get additions to my git based on opdenkamps and sd and hd video playback seems to work very well.

I have just two issues, first one is, when i seek the framerate is dropping down for a few seconds to around 3-5fps. This also happens when starting video.

yeah, there are some seek issues.. I'm still trying to figure out how to handle that in a sane way.

The issue is that, since the way dvdplayer uses gst, decoding is happening in a different thread, if I don't do anything we end up feeding in 20-30+ input frames before we start getting output frames. And then later when we seek or pause, it takes ~1sec for video to react.

Recently I've begun experimenting with trying to throttle/flowcontrol things a bit, but it still sometimes gets in a mode where video rendering starts getting late and dropping frames (I think?)

overflowed Wrote:The second one is a little bit stranger, when watching live TV i see four rectangles, the tv image two times on the left side and on the right side two times streched lines:

Image

The top/bottom looking image appears to be interlaced video. I've not worked out how to render interlaced video. Possibly there is some shader tricks that could be employed.

The junk around the outside appears that the buffer is not being cropped. Normally the codec uses buffers that are a bit oversized to deal with cases where reference frames have some block/macroblock content that is moved beyond the visible edge of the picture and back in a future frame. I added some logic in gles2 linux renderer class to deal with the cropping but maybe it is getting reset in some cases?

overflowed Wrote:Something similar i noticed when watching airplay videos.

The debug log says:


15:41:06 T:1350562880 DEBUG: CDVDPlayer::HandleMessages - player started 1
15:41:06 T:1330385984 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
15:41:06 T:1330385984 NOTICE: fps: 0,000000, pwidth: 720, pheight: 576, dwidth: 1024, dheight: 576
15:41:06 T:1330385984 DEBUG: OutputPicture - change configuration. 720x576. framerate: 0,00. format: EGLIMG
15:41:06 T:1103745568 NOTICE: Using GL_TEXTURE_2D
15:41:06 T:1103745568 DEBUG: GL: Requested render method: 0
15:41:06 T:1103745568 DEBUG: Shader - Loading shader file yuv2rgb_vertex_egl_image_external_gles.glsl
15:41:06 T:1103745568 DEBUG: Shader - Loading shader file yuv2rgb_egl_image_external_gles.glsl
15:41:06 T:1103745568 NOTICE: GL: Selecting eglImage shader
15:41:06 T:1103745568 DEBUG: GL: Vertex Shader compilation log:
15:41:06 T:1103745568 DEBUG: Success.

i think dheight should be 768? I am unsure if this is gstreamer related, but without gst it was fine.

Any suggestions? don't even know where to have a look.



- overflowed - 2012-01-05

thanks, i assume you are right the tv signal are 50 half pictures/second here.
With turning off screen resizing the right bar disappears, don't know about the aspect ration, since there are two pictures.

I tried to edit the pipeline to decodebin2 ! ffmpegcolorspace ! deinterlace ! ffmpegcolorspace, but i don't see a picture now, audio starts for a few seconds and then everything stopped (i assume thats a/v sync).

Thought could be easy
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-deinterlace.html
good plugins are installed.

But i know too less about gst, does the dsp have to support deinterlace? Or can this be done in one pipeline by the cpu?
I assume the plugins-good are done by cpu?

Can i anywhere check the "top" of the dsp?

Will have to read how gstreamer works...


- robclark - 2012-01-05

overflowed Wrote:thanks, i assume you are right the tv signal are 50 half pictures/second here.
With turning off screen resizing the right bar disappears, don't know about the aspect ration, since there are two pictures.

I tried to edit the pipeline to decodebin2 ! ffmpegcolorspace ! deinterlace ! ffmpegcolorspace, but i don't see a picture now, audio starts for a few seconds and then everything stopped (i assume thats a/v sync).

I think deinterlace will do sw deinterlacing.. the performance won't be good, but might possibly be fast enough for standard-def video..

Better option would be if there was some way to do it with the shader. I think that is done w/ non eglImage shaders, but I've not had a chance to look into the shader magic that makes it work.



overflowed Wrote:Thought could be easy
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-deinterlace.html
good plugins are installed.

But i know too less about gst, does the dsp have to support deinterlace? Or can this be done in one pipeline by the cpu?
I assume the plugins-good are done by cpu?

Can i anywhere check the "top" of the dsp?

Will have to read how gstreamer works...



- robclark - 2012-01-05

btw, I've not had a chance to try this build myself (but I guess it should be identical to what I have), but linaro now has xbmc packages for omap/panda pushed to it's PPA (for those who aren't patient enough to recompile xbmc themself)

https://launchpad.net/~linaro-maintainers/+archive/overlay/+packages?field.name_filter=&field.series_filter=oneiric&field.status_filter=published&batch=75


- overflowed - 2012-01-06

ok, after removing the deinterlace ! ffmpegcolorspace i noticed, the video still does not appear. A git diff helped, I forgot to insert a ! at the end, the sink is still added after this. So i tried again, but still have two pictures (one above the other). CPU usage is not increased on sd (don't have an interlaced hd source).

Will have to do some more research but not before the weekend.


- ungoliant - 2012-01-12

robclark Wrote:btw, I've not had a chance to try this build myself (but I guess it should be identical to what I have), but linaro now has xbmc packages for omap/panda pushed to it's PPA (for those who aren't patient enough to recompile xbmc themself)

https://launchpad.net/~linaro-maintainers/+archive/overlay/+packages?field.name_filter=&field.series_filter=oneiric&field.status_filter=published&batch=75

First of all, hi, I just registered to the forums Smile

Second: I just build this and tested it on my Pandaboard ES: It has some bugs:
- seek: video slows down for a while and audio keeps going, and after a couple secs video plays faster to get in sync with audio.

- UI: I have 30 fps constant, but every 5-10 secs it drops for to ~15 FPS. I have noticed that if I am checkin the system info, when the FPS drops, the system info is gone for half second.

- Playback: Because of the above, playback is kinda painfull, with FPS drops every 5-10 secs.


- robclark - 2012-01-12

ungoliant Wrote:First of all, hi, I just registered to the forums Smile

Second: I just build this and tested it on my Pandaboard ES: It has some bugs:
- seek: video slows down for a while and audio keeps going, and after a couple secs video plays faster to get in sync with audio.

- UI: I have 30 fps constant, but every 5-10 secs it drops for to ~15 FPS. I have noticed that if I am checkin the system info, when the FPS drops, the system info is gone for half second.

- Playback: Because of the above, playback is kinda painfull, with FPS drops every 5-10 secs.

If you have ubuntu 11.10 filesystem, please try adding linaro PPA and using rsalveti's xbmc .deb, see http://rsalveti.wordpress.com/2012/01/06/hw-video-decode-and-xbmc-ubuntu-linaro/

There is one patch in there which helps somewhat, which I haven't had a chance to clean up and push. I'll try to do that this weekend if I have time. In general getting the flow control right with the way dvdplayer uses gst is, well, let's say a challenge. *Really* we badly need a native gstplayer to replace dvdplayer, which would solve all these issues w/ AV sync, fps, etc. But is perhaps a larger task.


- ungoliant - 2012-01-12

robclark Wrote:If you have ubuntu 11.10 filesystem, please try adding linaro PPA and using rsalveti's xbmc .deb, see http://rsalveti.wordpress.com/2012/01/06/hw-video-decode-and-xbmc-ubuntu-linaro/

There is one patch in there which helps somewhat, which I haven't had a chance to clean up and push. I'll try to do that this weekend if I have time. In general getting the flow control right with the way dvdplayer uses gst is, well, let's say a challenge. *Really* we badly need a native gstplayer to replace dvdplayer, which would solve all these issues w/ AV sync, fps, etc. But is perhaps a larger task.

That was exactly the way I got xbmc working on Linaro's build, I followed that blog. Now I realize you a the guy that made the patches Smile.

Is there any further testing you need to be done? I'm also on freenode, #linaro, nick nobill.


- RockerC - 2012-01-13

Have anyone looked using libdce directly in XBMC's "DVDPlayer" video player (without OpenMax and GStreamer) for the PandaBoard ES and other OMAP4 platforms?

http://www.phoronix.com/scan.php?page=news_item&px=MTAzNjY

https://github.com/robclark/libdce#readme

Quote:For those who became more interested in the PandaBoard ES after it was benchmarked on Phoronix last week, here's some details about the Distributed Codec Engine found on this OMAP4 platform from Texas Instruments.

For providing hardware accelerated codec support there is the Codec Engine for modern Texas Instruments ARM platforms. "Codec Engine (CE) is a framework that enables applications to easily instantiate and work with XDM codecs and algorithms using a common API."

Exposing this TI accelerated interface is "libdce", which is an open-source library maintained by Texas Instruments, and is currently supported by a few multi-media sample applications like omapfbplay and gst-ducati.

However, setting up libdce & co isn't quite as easy as if looking to use VDPAU or VA-API under Linux. Details on this project for those wanting to investigate more about the codec possibilities can find useful details from the GitHub project page.

That is, implement libdce directly in XBMC similarly to VDPAU and VAAPI?

robclark Wrote:There is one patch in there which helps somewhat, which I haven't had a chance to clean up and push.
@robclark, have you looked at the GStreamer code for XBMC from rabeeh to see if he done anything differently or added something you can use?

https://github.com/rabeeh/xbmc

He forked XBMC independently just like yourself and worked from topfs2 original GStreamer code to get it working on the CuBox by Solid-Run.

Maybe you and he can work together at cleaning up yours and his code so that you can push the the GStreamer code upstream to XBMC?


- RockerC - 2012-01-13

robclark Wrote:*Really* we badly need a native gstplayer to replace dvdplayer, which would solve all these issues w/ AV sync, fps, etc. But is perhaps a larger task.

Long term it might still be best to implement a proper a/v player abstraction layer framework and API in XBMC? Nod

Perhaps look at the UMMS (Unified Multimedia Service) audio/video player abstraction layer framework for XBMC?

http://forum.xbmc.org/showthread.php?tid=117321

Quote:Suggest that you look into implementing the UMMS (Unified Multimedia Service) audio video player abstraction layer framework into XBMC.

This article and UMMS introduction pdf sums up UMMS much better then I even can
http://lwn.net/Articles/465178/
http://wiki.meego.com/images/LinuxCon_2011_umms_introduction.pdf

However to put it simple, UMMS is an open source abstraction layer framework that have an consistent API which would make it possible for video and audio players to be treated as (binary) addons in XBMC.

Separating the video and audio players from the core XBMC application would also mean XBMC could have multiple video players and multiple audio players, and they could all be upgraded separately from the core application just like any other addon in XBMC.

Having the video and audio player separate binary addons using this API could open up future possibilities like having third-party closed source players dedicated for Blu-ray Disc playback or even DRM protected video on demand services like Netflix. This is possible since UMMS is LGPL licensed and is designed to use D-Bus service API to communicate between the frontend, and the backends it is language-independent and capable of providing license isolation, it could also be made to use a other open API then D-Bus, such as JSON-RPC or WebSocket to provide an bi-directional communications channel between the frontend and the backends.


Brendan Le Foll (username arfoll on the XBMC forums who also ported XBMC to MeeGo) have actually already coded his own proof of concept UMMS player for XBMC called madeo-uplayer that uses GStreamer and is written in Python
https://github.com/arfoll/Madeo-MUMS-player
https://github.com/arfoll/UMMS


UMMS official site
http://wiki.meego.com/Umms

Official git repositories for MeeGo middleware like UMMS are on meego.gitorious.org
http://meego.gitorious.org/meego-middleware/umms

First version of the module for Universal Multi Media Service has been published on the Meego OBS
https://build.meego.com/package/show?package=UMMS&project=MeeGo%3A1.2%3Aoss

The initial technical specification was published in March 2011 and can be found here
http://wiki.meego.com/File:Meego_Unified_MultiMedia_Service_V0.4.odt


Hope that the team developers have time to look into UMMS or some other type of Smile



- davilla - 2012-01-13

There is a gstplayer from another internal project. I'm looking into if release of it can be accelerated.

Unified Multimedia Service is python. Using python as the main internal player makes me nervous.


- BrokenCodes - 2012-01-15

Davilla, I am waiting patiently for theUni to finish DirectFB support ;-)

That will change everything.