Hi!
I was wondering if there is some application out there that streams your screen output over LAN.
Basically I want the functionality of the OnLive game console...you send control data over the internet and they return the rendered frame.
The control you can easily solve with apps like Input Director...
The video however...I have used applications like TightVNC for controlling my PCs over network but it sucks when it comes
to framerate.
If there is no such application...where do I start to make my own?
Does Ogre have screen capture abilities and if so...is it fast enough to maintain an effective 50FPS on the clients computer. (Assuming LAN network speed of 100-1000Mbit/s).
Thanks
Fast screen capture -> LAN stream
- oddrose
- Orc
- Posts: 470
- Joined: Thu Feb 15, 2007 2:08 pm
- Location: Gothenburg, Sweden
- Contact:
- subquantum
- Goblin
- Posts: 270
- Joined: Tue Oct 02, 2007 10:23 pm
- Location: Rochester, NY
- Contact:
Re: Fast screen capture -> LAN stream
VNC does almost exactly what you're asking, and they have it built to be more efficient by not sending things that don't move, using delta compression... Streaming what amounts to a captured video over a network at 50fps isn't easy.
Let's assume that you have a 1280x1024 screen, and that you're compressing the normal 24 bit color down to 16. That's 16 bits per pixel, or 1280*1024*16 = 20,971,520 bits per frame. Even on a gigabit-per-second lan, the /maximum/ you could possibly achieve, assuming total network saturation and perfect efficiency (which you can't get, since the packet transport uses some of the bandwidth itself), is 50fps. And this is at 16 bit color. I'd imagine the practical speed would be more like 20fps, counting network overhead and the penalty of running a screen capture program while doing a 3d render.
What's usually done to "watch" games on a remote machine is to use a custom network protocol and simply send information about the 3d scene, and then render it right on the target computer. It's not pixel-perfect, but it at least makes the problem feasible.
Let's assume that you have a 1280x1024 screen, and that you're compressing the normal 24 bit color down to 16. That's 16 bits per pixel, or 1280*1024*16 = 20,971,520 bits per frame. Even on a gigabit-per-second lan, the /maximum/ you could possibly achieve, assuming total network saturation and perfect efficiency (which you can't get, since the packet transport uses some of the bandwidth itself), is 50fps. And this is at 16 bit color. I'd imagine the practical speed would be more like 20fps, counting network overhead and the penalty of running a screen capture program while doing a 3d render.
What's usually done to "watch" games on a remote machine is to use a custom network protocol and simply send information about the 3d scene, and then render it right on the target computer. It's not pixel-perfect, but it at least makes the problem feasible.
- oddrose
- Orc
- Posts: 470
- Joined: Thu Feb 15, 2007 2:08 pm
- Location: Gothenburg, Sweden
- Contact:
Re: Fast screen capture -> LAN stream
my, mistake...and I guess image compression is to slow to do? I mean, to get down to HD-video-MPEG4-compression-bitrate of about 50Mbit/s?
edit: no that wouldn't work in real-time would it...
edit: no that wouldn't work in real-time would it...
- subquantum
- Goblin
- Posts: 270
- Joined: Tue Oct 02, 2007 10:23 pm
- Location: Rochester, NY
- Contact:
Re: Fast screen capture -> LAN stream
Without encoder hardware, at least, I doubt you'd be able to compress it fast enough to make the experience interactive. I recall there being a lot of concerns like this when the idea of "rendering in the cloud" first came along. Especially over the internet, there simply isn't enough bandwidth and there's too much latency to get anything playable. Basically all multiplayer games have to do some "clientside prediction" to make the games playable. If, when you fire a gun, say, you had to wait until the server replied before you see the result of the shot? It would be a painful experience. The rendering-on-the-cloud idea basically removes any possibility for prediction. It'll be a while before such a system is really feasible in the general sense.
That being said, in special circumstances I bet you can make something work. A gigabit/terabit LAN with custom servers and clients and hardware video encoders/decoders would probably be enough to get it done.
That being said, in special circumstances I bet you can make something work. A gigabit/terabit LAN with custom servers and clients and hardware video encoders/decoders would probably be enough to get it done.
- xavier
- OGRE Retired Moderator

- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Fast screen capture -> LAN stream
You go work for OnLive. They didn't whip it up over a weekend, you know.oddrose wrote:Basically I want the functionality of the OnLive game console...
...
If there is no such application...where do I start to make my own?
- oddrose
- Orc
- Posts: 470
- Joined: Thu Feb 15, 2007 2:08 pm
- Location: Gothenburg, Sweden
- Contact:
Re: Fast screen capture -> LAN stream
xavier wrote:You go work for OnLive. They didn't whip it up over a weekend, you know.oddrose wrote:Basically I want the functionality of the OnLive game console...
...
If there is no such application...where do I start to make my own?
hehe, yeah well I thought maybe it would be easier to make an application that just handled the image and just worked over LAN speed...
I guess not =)
-
badrra
- Gnoblar
- Posts: 1
- Joined: Tue Aug 04, 2009 5:24 am
Re: Fast screen capture -> LAN stream
Yes there is such an application. I was able to stream a DOTA and Battle of Wesnoth, not only to a PC, but guess what, also my sons PSP. It does not do screen scraping. It actually streams the game and play the game to any device that is connect to a LAN.
It is also capable of creating more than one session on the server so that one PC may be playing DOTA and on the other Battle of Wesnoth. All streamed by a server.
Let me share you my link were I implemented it. BTW it can only be done on a Linux Server.
http://badrra.wordpress.com/category/game-streaming/
I even have a video of Wesnoth running on PSP.
It is also capable of creating more than one session on the server so that one PC may be playing DOTA and on the other Battle of Wesnoth. All streamed by a server.
Let me share you my link were I implemented it. BTW it can only be done on a Linux Server.
http://badrra.wordpress.com/category/game-streaming/
I even have a video of Wesnoth running on PSP.
-
glennr
- Greenskin
- Posts: 126
- Joined: Thu Jun 05, 2008 3:26 am
- Location: Thames, New Zealand
- x 9
Re: Fast screen capture -> LAN stream
Not sure if this will help you but it's worth a mention.
For Windows there is a screen capture driver available from here: http://www.hmelyoff.com/index.php?section=1. This captures an area of your screen and essentially makes it look like a web cam. It can also be configured to capture a single window so you could use that feature to capture your Ogre app if you ran it windowed.
Once you have installed this, you can, for example, open the screen capture device in a Flash media app and stream it to a server. I have just been playing with this using Red5 http://osflash.org/Red5 and it works OK. The video size has to be adjusted for your bandwidth requirements and it is unlikely that you'd get fullscreen resolution, but it gives you an idea of what is possible.
What led me here was that I was wondering if there is a way to generate the video stream directly from Ogre, probably using a 3rd party encoding lib.
For Windows there is a screen capture driver available from here: http://www.hmelyoff.com/index.php?section=1. This captures an area of your screen and essentially makes it look like a web cam. It can also be configured to capture a single window so you could use that feature to capture your Ogre app if you ran it windowed.
Once you have installed this, you can, for example, open the screen capture device in a Flash media app and stream it to a server. I have just been playing with this using Red5 http://osflash.org/Red5 and it works OK. The video size has to be adjusted for your bandwidth requirements and it is unlikely that you'd get fullscreen resolution, but it gives you an idea of what is possible.
What led me here was that I was wondering if there is a way to generate the video stream directly from Ogre, probably using a 3rd party encoding lib.
