|
Author |
Topic: two video sources - choosing (Read 1958 times) |
|
st33d
|
two video sources - choosing
« on: Jan 31st, 2005, 4:06am » |
|
When I run beginVideo, it defaults to my TV card. Is there a way I can force it to look at the web cam. winVDIG can see the web-cam under one of its settings and capture fine and well. I just don't know how to force it to look at the other option.
|
I could murder a pint.
|
|
|
fjen
|
Re: two video sources - choosing
« Reply #2 on: Jan 31st, 2005, 2:37pm » |
|
can you run the following and post the output here? Code: try { quicktime.QTSession.open(); quicktime.std.sg.SequenceGrabber sg = new quicktime.std.sg.SequenceGrabber(); quicktime.std.sg.SGVideoChannel sc = new quicktime.std.sg.SGVideoChannel(sg); quicktime.std.sg.VideoDigitizer vd = sc.getDigitizerComponent(); println( "dv.getNumberOfInputs :" ); println( vd.getNumberOfInputs() ); println(); println( "dv.getInput :" ); println( vd.getInput() ); println(); quicktime.std.sg.DigitizerInfo di = vd.getDigitizerInfo(); println( "DigitizerInfo :" ); println( di.toString() ); println(); } catch (Exception e) {e.printStackTrace();} |
| if this gives you some information, not just raises an exception as with me (no cam), then we might be able to set the input via java ... (pretty sure it is.) /F
|
« Last Edit: Jan 31st, 2005, 5:12pm by fjen » |
|
|
|
|
st33d
|
Re: two video sources - choosing
« Reply #3 on: Feb 1st, 2005, 2:58pm » |
|
Had a word with the winVDIG guy and he agrees that it's the quicktime-for-java default. He says that he's been asked for a way to set the registry but that's in the works. No exception thrown. Here's the info: Code: dv.getNumberOfInputs : 6 dv.getInput : 1 DigitizerInfo : quicktime.std.sg.DigitizerInfo MinDestHeight: 240 MinDestWidth: 320 maxDestHeight: 240 MaxDestWidth: 320 blendLevels: 0 InputCapabilityFlags: 5383 OutputCapabilityFlags: 436232192 |
| I started mucking about with setInput() in a layman's way but I can't get it to work. I haven't a clue how to structure all of this. Whoops. Ho ho! Code: boolean newFrame = false; void setup() { size(320, 240); try{ quicktime.QTSession.open(); quicktime.std.sg.SequenceGrabber sg = new quicktime.std.sg.SequenceGrabber(); quicktime.std.sg.SGVideoChannel sc = new quicktime.std.sg.SGVideoChannel(sg); quicktime.std.sg.VideoDigitizer vd = sc.getDigitizerComponent(); println( "dv.getNumberOfInputs :" ); println( vd.getNumberOfInputs() ); println(); vd.setInput(2); //magic! println( "dv.getInput :" ); println( vd.getInput() ); println(); quicktime.std.sg.DigitizerInfo di = vd.getDigitizerInfo(); println( "DigitizerInfo :" ); println( di.toString() ); println(); } catch (Exception e) {e.printStackTrace();} beginVideo(width, height, 4); } void videoEvent() { newFrame = true; } void loop() { if(newFrame) { background(video); newFrame = false; } } |
| Okay. That seems to work. I now have a signal from the web-cam. The signal from the TV card seems to have been knocked off line some how. But winVDIG seems to be notoriously dodgy with the Creative-Cam-Live-Pro. Thankyou fjen.
|
I could murder a pint.
|
|
|
fjen
|
Re: two video sources - choosing
« Reply #4 on: Feb 1st, 2005, 7:13pm » |
|
ha, i knew it. as you figured yourself getNumberOfInputs() reports the number of video-inputs there are and setInput() will change the current one (while getInput() reports it) ... i've been diggin' deep into quicktime for java end of last year ... there's a lot of very nice things hidden in there (once apple recovers from it's last cleanup). can you say quicktime-vr or flash in processing i started to work on a video-lib "QTP or cutie-p" for processing that would include processing as a layer into/onto movies ... but no time to finish it. grr. i'll suggest to include the get - set - code into the current video-lib. best, /F
|
|
|
|
|