Forum

Quake3 Ingame videostream

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

Quake3 Ingame videostream

Postby Thys » Mon Mar 29, 2010 9:36 pm

Hello!

I'm a interaction student from belgium and currently working on a Quake3 project, I've setup a linux box that sends out messages to Max/MSP (or PureData) from ingame Quake, now I want to try to add a live webcam stream INGAME, so some kind of dynamic texture or just a swf or something, how do I do this?

Any help is greatly appreciated!! :)

Greetings, Thys
Thys
 
Posts: 5
Joined: Mon Mar 29, 2010 9:33 pm

Postby Teiman » Mon Mar 29, 2010 10:16 pm

Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Thys » Mon Mar 29, 2010 10:40 pm

Hi Teiman, thanks for the link!
The thread offers no real answer, is it done before or is there a 3D engine that supports webcams or any kind of streaming swf or something?

thanks! :)
Thys
 
Posts: 5
Joined: Mon Mar 29, 2010 9:33 pm

Postby Thys » Wed Mar 31, 2010 3:01 pm

anyone? i'm really getting desperate
Thys
 
Posts: 5
Joined: Mon Mar 29, 2010 9:33 pm

Postby Teiman » Wed Mar 31, 2010 4:19 pm

Try to join the ioquake3 mail list

http://ioquake3.org/

And ask there. There will be probably more minds that can solve problems in a Quake3 enviroment.

I hope you success.. I want you to success. I can't do much more than give you this advice, since I am mostly a webmaster and this things are beyond me.

Even if the ioquake3 mail list fails to you. Do more research. Theres always lots of info about creating things using quake, you already did the right thing chossing to develop under a quake engine :-)
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Spike » Wed Mar 31, 2010 4:36 pm

tbh, I've not looked in all that much detail at all the twiddles of q3, but hey...
qfusion (yes, q2, not q3) supports roq textures on shaders, and I imagine q3 does too, though I don't remember seeing any.
Point is, once you have one video stream being played that way, all that remains is to change the feed to something else.
There are two APIs that permit streaming a video, one is gstreamer which is cross-platform, but I've no personal experience of it, and DirectShow, which is windows only, buggy, and utterly vile, but I have played with it before.

Quick overview of directshow.
Initialise DirectShow and create your DirectShow 'graph' (aka: context).
Create a standard video source filter, in this case a camera capture device. Set up its property bag so it uses the right camera.
Write a video sink filter (use the relevent base classes). Make it accept ideally a BGR video format.
Use the graph functions to attempt to connect the capture device to the sink. DirectShow should automatically add colourspace conversion filters between as required.
Start up the graph.
Your video sink filter will now be called periodically with raw video data. Be warned that it'll be in a seperate thread. You need to upload that video data to OpenGL. The simplest way to do it is to memcpy the data over and glTexImage from your rendering thread. The better way perhaps is to share the GL context between both threads and do the upload from the filter directly - you won't have access to the data if you just save a pointer. I guess you could also use a semaphore and pause the sink until the rendering thread is able to use it.

I think.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Thys » Wed Mar 31, 2010 6:56 pm

thx so much for the repleys!


I've currently installed Graphstudio and I'm experimenting with the filters, it's not that easy for a first time user but I'm starting to get it, just how do I export to a file?

Also my friend is bashing his head against the wall with the RoQ file playback, we've managed to get a RoQ file playing IN the game but the ROQ is loaded from the /video directory in your .pk3, how do we make the RoQ video load from an external source?

again, thanks for all your help!!!
Thys
 
Posts: 5
Joined: Mon Mar 29, 2010 9:33 pm

Postby Spike » Wed Mar 31, 2010 7:29 pm

By getting a C compiler, the documentation for the API you wish to use to stream stuff, and a lot of patience, that's how you play videos from external sources.

I've never used graphstudio, nor microsoft's original version. Probably it won't help in any way other than to demonstrate the most basic concepts of DirectShow.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Spirit » Thu Apr 01, 2010 7:39 am

You can use links in any decent filesystem. http://en.wikipedia.org/wiki/Symbolic_link
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Postby Teiman » Thu Apr 01, 2010 11:26 am

Spirit wrote:You can use links in any decent filesystem. http://en.wikipedia.org/wiki/Symbolic_link


That include NTFS now. Even If the normal programs are not aware.
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Thys » Thu Apr 01, 2010 11:34 am

great idea! currently testing it on our server
Thys
 
Posts: 5
Joined: Mon Mar 29, 2010 9:33 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest