NoCarrier
12-22-2007, 07:22 AM
Hi,
I built a web cam video recorder using AS 2.0 and flash media server. I'd like to know how to show the first frame / preview image for the video I just recorded from the web cam. I'm not sure if this happens on the recording (Publish) level or the player end.
Here is the code I use to record the camera stream:
// set up net connection and netstream
function initStreams() {
// Make a connection to the application on the server
client_nc = new NetConnection();
client_nc.connect("rtmp://localhost/profileVideoComments/"+toUserId);
// Create output stream
out_ns = new NetStream(client_nc);
}
// Connect to server and set up streams
initStreams();
//RECORD
btnRecord.onPress = function() {
status_text.text = "Recording...";
camMode = "Recording";
// reatach camera incase its in replay mode.
Live_video.attachVideo(client_cam);
// Start publishing the camera output as a recorded stream
out_ns.attachVideo(client_cam);
out_ns.attachAudio(client_mic);
out_ns.publish(fileName, "record");
trace("Recording File:" + fileName);
}
Thanks.
I built a web cam video recorder using AS 2.0 and flash media server. I'd like to know how to show the first frame / preview image for the video I just recorded from the web cam. I'm not sure if this happens on the recording (Publish) level or the player end.
Here is the code I use to record the camera stream:
// set up net connection and netstream
function initStreams() {
// Make a connection to the application on the server
client_nc = new NetConnection();
client_nc.connect("rtmp://localhost/profileVideoComments/"+toUserId);
// Create output stream
out_ns = new NetStream(client_nc);
}
// Connect to server and set up streams
initStreams();
//RECORD
btnRecord.onPress = function() {
status_text.text = "Recording...";
camMode = "Recording";
// reatach camera incase its in replay mode.
Live_video.attachVideo(client_cam);
// Start publishing the camera output as a recorded stream
out_ns.attachVideo(client_cam);
out_ns.attachAudio(client_mic);
out_ns.publish(fileName, "record");
trace("Recording File:" + fileName);
}
Thanks.