Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Streaming a real-time rendered application as a video?  (Read 1008 times)
0 Members and 1 Guest are viewing this topic.
Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Posted 2007-01-20 10:09:45 »

Hi

I'm wondering if it's possible to, let's say, if you have a game that is using LWJGL, is it possible to "capture" the screen/window and stream it as a video on the internet? (Allowing the user to send input to the server to change the video).

It would then work as a server-side-rendered game instead of what is normal, client-side rendered game.

I cannot explain exactly why I need to do this, as this involves a research project at my company.

In short:

OpenGL application -> MPEG2 stream to internet


Any insight is helpful! Smiley

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline DarkMortar

Junior Member




Java Padawan


« Reply #1 - Posted 2007-01-21 00:51:54 »

Fraps?

Offline woogley
« Reply #2 - Posted 2007-01-21 01:00:46 »

no.. he means the server runs the app, takes a snapshot, and streams it to the client. thus the client is just watching a video thats being recorded on the server in realtime (so each client would have about the same performance regardless of hardware)

i havent seen anything like it, but good luck..
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline noblemaster

JGO Ninja


Medals: 19
Projects: 9


Age of Conquest makes your day!


« Reply #3 - Posted 2007-01-21 01:02:44 »

It's possible if you can deal with the following problems:
-probably 1 server per client (1000 clients => need 1000 servers)
-very fast connection to obtain the movie stream with decent quality
-latency: 1. sending data to server, 2. rendering on server, 3. encoding to movie stream, 4. sending stream over the network, 5. decoding and display of stream on client ...

Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Reply #4 - Posted 2007-01-21 09:39:01 »

It's possible if you can deal with the following problems:
-probably 1 server per client (1000 clients => need 1000 servers)
-very fast connection to obtain the movie stream with decent quality
-latency: 1. sending data to server, 2. rendering on server, 3. encoding to movie stream, 4. sending stream over the network, 5. decoding and display of stream on client ...

Yes, that is probably true. I know about the problems Smiley But I'm interested in experimenting with this.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline noblemaster

JGO Ninja


Medals: 19
Projects: 9


Age of Conquest makes your day!


« Reply #5 - Posted 2007-01-21 10:34:09 »

One of the projects I am working on consists of a surgical simulation framework that allows to stream video from a server to connected clients to facilitate distributed surgical training with haptics interaction. The project is written in C/C++. The server can be run in parallel mode on a super-computer with through Internet2.

From what I have seen, we got 1-2 frames a second tops. Note: I was told it can run faster ...

Offline moogie

JGO Knight


Medals: 11
Projects: 5
Exp: 10 years


Java games rock!


« Reply #6 - Posted 2007-01-22 02:16:14 »

How about sending the captured image in a gzip stream? I would imagine that compression/decompression via gzip will be fast enough for such a system.

This is what i would try firstly to see if it is feasible:

-make a simple animation program e.g. a ball bouncing around the screen.
-change it so it is now rendering to a BufferedImage
-in the render loop, grab the image data e.g. byte[] data=((DataBufferByte)img.getRaster().getDataBuffer()).getData();
-write this data to the GZipOutputStream

on the client side I would simply

(assumption that we know the size of the image data buffer)
-block until the data is fully read.
-create a BufferedImage from this databuffer.
-display the image and then repeat.

of course this is very dumb and does not allow frame skipping etc, but as a starting point it may prove useful

Note you will have to make sure you have created a BufferedImage of one of the folowing type:

TYPE_3BYTE_BGR
TYPE_4BYTE_ABGR
TYPE_4BYTE_ABGR_PRE
TYPE_BYTE_BINARY
TYPE_BYTE_GRAY
TYPE_BYTE_INDEXED
Offline woogley
« Reply #7 - Posted 2007-01-22 02:33:50 »

what you could do is just send the pixels that have changed since the last frame. this would work well for most 2D applications (I believe this is how VNC/VPN is done). check out RealVNC (java program) or logmein pro or whatever those things are called
Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Reply #8 - Posted 2007-01-22 13:02:33 »

Good tips. I'll look into them Smiley thanks.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (10 views)
2014-04-15 03:46:01

UprightPath (23 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (107 views)
2014-04-08 23:06:04

tom_mai78101 (207 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!