Quake3 Ingame videostream
Moderator: InsideQC Admins
11 posts
• Page 1 of 1
Quake3 Ingame videostream
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
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
A bit of something related got commented here:
viewtopic.php?t=2038&postdays=0&postorder=asc&highlight=flash+quake&start=15
viewtopic.php?t=2038&postdays=0&postorder=asc&highlight=flash+quake&start=15
- Teiman
- Posts: 309
- Joined: Sun Jun 03, 2007 9:39 am
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
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
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.
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
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!!!
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
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.
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
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
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
11 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest