First of all, I consider myself a newbie all over again even though I've worked
with Flash and actionscript extensively more than 5 years ago. I haven't worked
with Flash technologies ever since, until now. I'm loving the new FLV and Flash
Media Server 2 capabilities.

I've managed to modify the "tutorial_record" application that comes with FMS2
application samples (samples are found here
[url]http://www.macromedia.com/devnet/flashmediaserver/sample_apps.html[/url] ) and
turned it into a simple video email creation application.

But the quality of video in playback isn't great. It's very pixelated and
grainy. Yes, Im using Flash Media Server 2.

Here is the relevant actionscript:

//#include "NetDebug.as"

// Attach the video device output from 'client_cam'
// to the 'Live_video' video clip. Also get the default microphone
client_cam=Camera.get();
client_mic=Microphone.get();
Live_video.attachVideo(client_cam);

function initStreams() {

// Make a connection to the application on the server
client_nc = new NetConnection();

// Handle status message
client_nc.onStatus = function(info) {
trace("Level: " + info.level + newline + "Code: " + info.code);
}

client_nc.connect();

// Create output stream
out_ns = new NetStream(client_nc);

// Create input stream
in_ns = new NetStream(client_nc);
Replay_video.attachVideo(in_ns);

}

// Connect to server and set up streams
initStreams();

function doRecord() {

if (Record_btn.getLabel() == "Record") {

// Start publishing the camera output as a recorded stream
out_ns.attachVideo(client_cam);
out_ns.attachAudio(client_mic);
trace("Video Name: " + videoname.text)
out_ns.publish(videoname.text, "record");

// Don?t allow the user to play when recording
Play_btn.setEnabled(false);

// Change the button label
Record_btn.setLabel("Stop");

} else if (Record_btn.getLabel() == "Stop") {

// Close output stream
out_ns.close();

// Now that you?re finished recording, allow the user to play
Play_btn.setEnabled(true);

// Change the button label
Record_btn.setLabel("Record");
}
}

function doPlay() {

trace("doPlay sees videoname as " + videoname.text);
in_ns.play(videoname.text);
}

Is there anything I can do here to improve the video quality?

Thanks in advance,
CFlannagan