| Bill Hoover 2005-04-07, 5:45 pm |
| Here is the code from the sample they (TechSmith) provide
// Find the index of the TSVC OEM video capture device
for(i=0; i<camera.names.length; i++)
{
if( camera.names[i] == "TechSmith OEM Screen Video Capture Driver" )
{
break;
}
}
// Get a reference to the camera object
localCamera = camera.get(i);
localVidInstance.attachVideo(localCamera);
// Set the camera object width, height, and frame rate.
// Set the last parameter to true to maintain the requested capture size and
frame rate.
localCamera.setMode(640, 480, 5, true);
// Set the quality and/or bandwidth for video sent to the Flash
Communication Server
// This example ensures a minimum quality of 80, no matter how much
bandwidth it takes
localCamera.setQuality(0, 80);
// Set the keyframe interval to a keyframe every 10 seconds at 5 fps.
localCamera.setKeyFrameInterval(50);
// Set the camera to display a preview of the compressed video so that
// we do not need Flash Communication Server for this sample.
localCamera.setLoopback(true);
// Start capturing video and displaying it in the Video object on the stage
localVidInstance.attachVideo(localCamera);
This finds the camera and inputs it locally. What do I add to make it so it
streams to my FCS and what do I creeate so others ONLY see the stream and
not create one of their own? This is a test for desktop sharing.
Thanks
Bill
Date: Wed, 26 Jan 2005 09:06:16 -0700
From: "Jake Hilton" <jhilton-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [FlashComm] Sample code with instructions for steaming
video
To: <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Message-ID: <s1f75d97.001-8P+T1FnozcXjI0KkKMLNxmG1Kmeyz0DC@public.gmane.org>
Content-Type: text/plain; charset=US-ASCII
Bill,
To test whether the video driver works you could implement this code:
var my_video:Video; //my_video is a Video object on the Stage
var active_cam:Camera = Camera.get();
my_video.attachVideo(active_cam);
You have to make sure you have a video object on the stage with the
instance name of my_video. In order to do this if you don't know... In
the title bar of your library on the very right there is a menu button.
If you click that you can create a new video object in your library.
Once created drag that to your stage. Select it and in your properties
panel in the instance name input field put the name my_video. The above
code will find the first camera attached to your computer.. in this case
if the TechSmith Driver is the only video input device then it will
select that and display the output of that in the video object that you
placed on your stage. So test your movie and viola. It should work. To
hook this up to a flash com server you could do the following:
var my_video:Video; //my_video is a Video object on the Stage
var active_cam:Camera = Camera.get();
my_video.attachVideo(active_cam);
var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://myServer.myDomain.com/appName/appInstance");
var src_ns:NetStream = new NetStream(my_nc);
src_ns.publish("stephen", "record");
src_ns.attachVideo(active_cam);
// To stop publishing and recording
src_ns.publish(false);
// To play the recorded stream
src_ns.play("stephen");
Hope that helps.
Jake
[vbcol=seagreen]
Does anyone have some sample code with instructions for streaming
local
video through FCS? I am looking for something along the lines of
"Streaming
video through FCS for dummies" I am NO flash pogrammer and I do not
want
to pull one of my programmers off of current projeccts for a simple
test. I
have looked through the
http://www.flashcomguru.com/tutorials/camtasia.cfm
samle but it does not show me the FCS setup. Soimething with sample
code
where I can just change the FCS address wouyld be great!
I will be using the TechSmith OEM Screen Video Capture Driver v1.0.0
beta 1
for the local capture if it makes a difference.
Thank you
Bill Hoover
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|