Reply
Thread Tools
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#21
Originally Posted by Fabry View Post
Your solution is ok and probably low resource consuming, but it needs a linux-box (or a Pi) as receiver and will it work with Hw Accelerated effects or 3D (games) ?
As it's stated in first post, relationship between X exportding display and GLES applications (mostly games, like Neverball) is "complicated" - i.e. no one currently have idea, if it would work or not, so we must check ourself. Personally, I think it wouldn't.

Of course exporting X require linuxbox (even, if the linuxbox is a ~credit-card like Raspberry Pi) - it's all about that.

Originally Posted by Fabry
I suppose that it is possible to allocate a second framebuffer on Omap Gfx, a framebuffer which isn't displayed to internal lcd but of course it is hw assisted by GPU + DSP.
That's interesting, but, honestly, I totally don't have a clue how to achieve it, or if it's achievable on our device. Don't even slightest idea on how to start checking, and where to get information about it. Any further info greatly appreciated.

Same apply for other ideas - I don't said that Your solution isn't worth considering, but is it achievable (on N900, not apple products) with current tools? If not, do we have any perspective for writing such? How much work would it take?

I must admit, that I'm focusing on X display exporting, as I wish to stick with something both effective and achievable. Personally, I can live without playing GLES games (Neverball ) on big screen, or using remote desktop explicitly for doing so (productivity things = most of Maemo programs - are priority IMO).

Of course, I'll change mind with pleasure, if Your ideas with video framebuffer encoding/decoding turns out to be achievable, and You - or someone else - come with a working solution.

Originally Posted by dr_frost_dk View Post
Can we get a guide to try it on the home linux boxes (i run nothing else )

A guide to how to hock up N900 to a computer and the X display "commands"

EDIT:
And for the Record i do grasp the many functions that are available with using the PI with our N900.
This is without a doubt the most awesome Addon to date
Unfortunately I don't have guide - that's why I asked for help here. ho ever, AFAIU, exporting X display and listening for it on other device shouldn't be rocket science or require coding skills (more than to write sh scripts, if needed). I would recommend to start with googling about exporting X display (*no* X forwarding over ssh), which I'm also planning to do.

Also, keep in mind, that whole idea with X display forwarding came from #maemo IRC talk (with SpeedEvil and DocScrutinizer [joerg_rw] - so, I think that some help can be also "sucked" from knowledgeable people on #maemo IRC.

I'll try to do so, when given some free time + I'll setup experimental linuxbox (in current conditions, only linuxbox that I have available to mess with freely is N900, but I'm planning to get my 'old' 3,5'' 80GB HD, and connect it via USB to some machine, then install linux on it, creating "safe" way to turn some machine into linuxbox, without being 'executed' for screwing something on main system).

given the fact, that it *does* require some time to even start, it would be great if someone can start messing with exporting X display before me

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2012-01-10 at 03:08.
 
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#22
Originally Posted by Estel View Post
Same apply for other ideas - I don't said that Your solution isn't worth considering, but is it achievable (on N900, not apple products) with current tools? If not, do we have any perspective for writing such? How much work would it take?

I must admit, that I'm focusing on X display exporting, as I wish to stick with something both effective and achievable. Personally, I can live without playing GLES games (Neverball ) on big screen, or using remote desktop explicitly for doing so (productivity things = most of Maemo programs - are priority IMO).

Of course, I'll change mind with pleasure, if Your ideas with video framebuffer encoding/decoding turns out to be achievable, and You - or someone else - come with a working solution.
I have spent near 10 hours on doing studies and then tests with gstreamer.

With ximagesrc + ffmpeg plugin to do colorspace conversion and then encoding process (I have tried h263, h264, mpeg2 and mjpeg) it works but cpu usage is over 70-80%@600 and there are many frames dropped even grabbing at 15 fps.

Passing to use DSP for encoding process (after I have changed, today, dsp libs to N9's version) the situation has much improved.
Cpu usage was still 50-60%@600MHz but frames dropped are sensibly decreased.

But the best results has been achieved when I have used DSP for colorspace conversion also.
With a screen grab at 15fps or lower the cpu usage is near (or lower) 40-45%@500

Here the command lines used by me to test yourself:

MJPEG
Code:
gst-launch ximagesrc ! video/x-raw-rgb,framerate=15/1! dspvpp ! dspjpegenc encoding-quality=60 ! avimux ! filesink location=/media/mmc1/testgrab.avi
H264
Code:
gst-launch ximagesrc ! video/x-raw-rgb,framerate=10/1! dspvpp ! dsph264enc ! max-bitrate=4000000 ! avimux ! filesink location=/media/mmc1/testgrab.avi
With H264 already at 15fps the phone is visibly slowed but still usable yet.
Cpu usage is not so high, but probably DSP is too busy and Maemo need dsp power for something and without it ...

Instead with MJPEG at 15fps phone is still very usable (even if a bit slowed) if you use the trick to save stream to SD.
Instead if you save stream to eMMC phone becomes very slow because of too much I/O traffic on eMMC bus.

Unfortunately MJPEG creates big-files (and so too much bitrate to stream it by WiFi).
I have tried some codec options to reduce bitrate but with no sensible result.

After some successes on recording to file I have tried direct stream by Wifi.
I have done some test with udpsink and tcpserversink but unfortunately I have never be able to play the received stream on PC.
But here is only my limited knowledge on gstreamer / mplayer / streaming techniques and not a technical problem.

Conclusion:
With stock software (gstreamer + dsp) 60fps are unreachable with decent result and even at 30fps there are many problems.
Until someone will find out better options I suggest to not exceed 10fps with h264 or 15fps with mjpeg.

But there are room to improve.
The first option to use is overclock (cpu and mostly dsp) but the main area to explore is to write a gstreamer plugin to access directly to omap FB dropping the usage of ximagesrc which uses much cpu when we raise grabbing speed

Of course the best solution would be a custom software like on Apple's AirPlay
Seen the results with gstreamer I suppose that there are many chances that a specific software (better if done all on dsp) can reach good results like Apple's AirPlay on N900 also

Last edited by Fabry; 2012-01-14 at 14:29.
 

The Following 4 Users Say Thank You to Fabry For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#23
@Fabry:
Try to encode your video stream in Mpeg2! Its results should be somewhere between Mjpeg and h264.
 

The Following User Says Thank You to sulu For This Useful Post:
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#24
Unfortunately gstreamer dsp plugin as encoders has only h264, h263 and Jpeg.
H263 is not usable because the needed dsp lib is not present on N900 and we must search and retrieve it on internet or on another Omap based phone

Last edited by Fabry; 2012-01-13 at 13:09.
 

The Following User Says Thank You to Fabry For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#25
Fabry, many thanks for Your extensive research! It's probably the first practical test, but it's very important path, as exporting X display (from N900 to desktop) seems to be *much* more problematic, that I've thought initially. all after all, if properly exporting X from N900 would be ever possible, it's going to arrive much later, than Fabry's proposed method.

15 fps is still much better, than what we usually get with VNC, not to mention quality of TV-Out.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#26
Originally Posted by Estel View Post
15 fps is still much better, than what we usually get with VNC, not to mention quality of TV-Out.
/Estel
Unfortunately it isn't a real 15fps.
Videostream is at 15fps and all frames seem to be present, but the video is not so fluid.
I suspect that ximagesrc (or other pluing on the pipeline) generates duplicated frame to achieve the nominal speed but the real grabbing speed is lower
 

The Following User Says Thank You to Fabry For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#27
I tried a few things during the weekend. First I thought we might be able to move X windows from the N900 (or at least from Easy Debian) to another computer using xpra [1]. In principle this works fine but unfortunately produces a lot of CPU overhead when watching video since it doesn't support GPU acceleration. Even my brandnew desktop computer is barely powerful enough to play SD videos this way, I don't even want to think about using it on the N900.
So this doesn't seem to be an option.

My 2nd idea was x2x [2] which means the Rhaspberry would do everything except input. This too works fine in principle. I can forward the keyboard from another computer and if I use one of the compass point switches even mouse forwarding works fine. But using the compass point switches means that the desktop feels like having two displays hooked up to one computer which usually is a good idea. Unfortunately it is no good idea at all if your input device is a touchscreen and not a regular touchpad because this way you can't leave your primary screen.
So what we need is either an option to make the N900's screen behave like a regular touchpad, i.e. interpreting movements as relative not as absolute (if someone could write a Maemo application that would cover the whole screen and transform the absolute inputs into relative outputs that would be great) or tell x2x to forward mouse movements as long as the cursor is on the x2x window (which I first thought is the case, but it seems it isn't - please prove me wrong and tell me which switch I missed!)

I see a 3rd option:
Keyboard forwarding with x2x works fine, and if we carry an N900, a Rhaspberry, a USB and an HDMI cable and most likely one or two chargers with us we can just as easily add a micro mouse to that, which unfortunately brings us back to our tiny but mighty pocket computer that we call N900 PLUS THE HUGE BAG WITH ALL THE EXTRA CABLES AND ADAPTERS.
btw: If we connect a mouse anyway the only point in connecting the N900 and the Rhaspberry is to spare the keyboard. TBH the N900's keyboard isn't great either so we could just use an onscreen keyboard with the mouse on the Rhaspberry and make that whole thing an awful lot cheaper by simply canceling the N900.

[1] http://packages.debian.org/search?ke...ll&section=all
[2] http://packages.debian.org/search?ke...ll&section=all
 

The Following 3 Users Say Thank You to sulu For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#28
Originally Posted by sulu View Post
I tried a few things during the weekend. First I thought we might be able to move X windows from the N900 (or at least from Easy Debian) to another computer using xpra [1]. In principle this works fine but unfortunately produces a lot of CPU overhead when watching video since it doesn't support GPU acceleration.
Watching videos isn't so much a problems - it's nice to have, yet main goal is to have working desktop with all productivity things (browser, libreoffice, etc). "In Principle" mean that it was working for both Maemo and Easy Debian, or only for ED?

Originally Posted by sulu View Post
My 2nd idea was x2x [2] which means the Rhaspberry would do everything except input. This too works fine in principle. I can forward the keyboard from another computer and if I use one of the compass point switches even mouse forwarding works fine. But using the compass point switches means that the desktop feels like having two displays hooked up to one computer which usually is a good idea. Unfortunately it is no good idea at all if your input device is a touchscreen and not a regular touchpad because this way you can't leave your primary screen.
So what we need is either an option to make the N900's screen behave like a regular touchpad, i.e. interpreting movements as relative not as absolute (if someone could write a Maemo application that would cover the whole screen and transform the absolute inputs into relative outputs that would be great) or tell x2x to forward mouse movements as long as the cursor is on the x2x window (which I first thought is the case, but it seems it isn't - please prove me wrong and tell me which switch I missed!)

I see a 3rd option:
Keyboard forwarding with x2x works fine, and if we carry an N900, a Rhaspberry, a USB and an HDMI cable and most likely one or two chargers with us we can just as easily add a micro mouse to that, which unfortunately brings us back to our tiny but mighty pocket computer that we call N900 PLUS THE HUGE BAG WITH ALL THE EXTRA CABLES AND ADAPTERS.
btw: If we connect a mouse anyway the only point in connecting the N900 and the Rhaspberry is to spare the keyboard. TBH the N900's keyboard isn't great either so we could just use an onscreen keyboard with the mouse on the Rhaspberry and make that whole thing an awful lot cheaper by simply canceling the N900.

[1] http://packages.debian.org/search?ke...ll&section=all
[2] http://packages.debian.org/search?ke...ll&section=all
Awesome work on research. Well, honestly, when i connect N900 to external desktop, I don't have any problem with connecting my USB mini-keyboard and bluetooth mouse - the point is that I can use device, that I have always with me (N900) as full-fledged PC connected to big desktop, by just adding three components 9Raspberry Pi, BT mouse, and mini-keyboard), that I take with me when needed.

Yet, things like using N900 as touchpad + N900's keyboard would be *nice* option to have. Wasn't BlueMaemo allowing to control computer via N900 screen in touchpad manner? It's FOSS, so maybe it's possible to suck (reverse-engineer) appropriate code from BlueMaemo into little program that turns our digitizer into touchpad?

/Estel

// Edit

Also, You actually tried it with N900 and N900 content into screen, yes? I'm asking, because there were (reportedly) nasty things related to X display forwarding *from* N900, which seems, were not affecting You.
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2012-01-16 at 00:26.
 
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#29
Originally Posted by Estel View Post
Watching videos isn't so much a problems - it's nice to have, yet main goal is to have working desktop with all productivity things (browser, libreoffice, etc). "In Principle" mean that it was working for both Maemo and Easy Debian, or only for ED?
I only tried it with two computers running real Debian installations. Unfortunately there is no Xpra package for Squeeze armel but I guess using the one from Wheezy or compiling it on our own shouldn't be a problem.
I doubt that Xpra could be used with Maemo directly because it requires X-forwarding which Maemo doesn't seem to support ($DISPLAY is always 0).

Originally Posted by Estel View Post
Well, honestly, when i connect N900 to external desktop, I don't have any problem with connecting my USB mini-keyboard and bluetooth mouse - the point is that I can use device, that I have always with me (N900) as full-fledged PC connected to big desktop, by just adding three components 9Raspberry Pi, BT mouse, and mini-keyboard), that I take with me when needed.
If you have a keyboard and a mouse with you, and the Rhaspberry runs Debian anyway you already have a fully working desktop. What's the N900 supposed to do in this scenario? Ok, you might use it to get an internet connection but that's simply connecting it in PC suite mode. Or you want to use the data stored on it? Simply connect it in mass storage mode. If you want both there should be a way in PC suite mode that allows mounting the N900 via network.

Originally Posted by Estel View Post
Also, You actually tried it with N900 and N900 content into screen, yes? I'm asking, because there were (reportedly) nasty things related to X display forwarding *from* N900, which seems, were not affecting You.
No, I didn't actually try it with the N900 because I stopped testing Xpra when I found out that playing videos won't work this way and that there is no ready-made package for armel. But I will retry this.
For x2x the Maemo weirdness shouldn't matter because you only need x2x on one of the devices and it doesn't matter which one it is. So it could be the Rhaspberry running a regular Debian.
 

The Following User Says Thank You to sulu For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#30
Originally Posted by sulu View Post
If you have a keyboard and a mouse with you, and the Rhaspberry runs Debian anyway you already have a fully working desktop. What's the N900 supposed to do in this scenario? Ok, you might use it to get an internet connection but that's simply connecting it in PC suite mode. Or you want to use the data stored on it? Simply connect it in mass storage mode. If you want both there should be a way in PC suite mode that allows mounting the N900 via network.
but this way you will have to manage two separate computers which is a lot of overhead. It would be a lot more efficient to manage just the N900 which all of us are using all the time and there are many more benefits to it.

I've seen your posts and i also think that video is not needed (at least for me) at all since HD videoview is not so practical anyway from the N900, however - viewing pictures with HD output for example would be awesome i think.
 

The Following User Says Thank You to impeham For This Useful Post:
Reply

Tags
dvi hdmi, external, monitor, raspberry pi, usb vga

Thread Tools

 
Forum Jump


All times are GMT. The time now is 17:29.