Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-15-2005, 01:51 PM   #1
Egglar
Registered User
 
Join Date: Mar 2005
Posts: 2
Default Two quality streams from same webcam

Hi,

Ive built a very simple flash app to publish a live webcam stream onto FCS. I then have a viewer program to show the feed on a website. Im trying to give the viewer the option of chosing the quality of the stream (for high and low speed connections).

I am trying to do this by publishing two streams on the server - the viewer then choese the stream based on the choice of the user.

My code:

//High quality stream
office_cam = camera.get();

office_cam.setMode(320, 240, 15);
office_cam.setQuality(144000, 90);
office_cam.setKeyFrameInterval(60);

live_video.attachVideo(office_cam);
office_cam.setLoopback(true);

//low quality stream
office_camlow = camera.get();

office_camlow.setMode(320, 240, 7);
office_camlow.setQuality(67200, 50);
office_camlow.setKeyFrameInterval(32);

live_videolow.attachVideo(office_camlow);
office_camlow.setLoopback(true);


function doConnect() {
nc = new NetConnection();
nc.connect("rtmp://server/office_cam/cam1");
}
function publishMe() {
out_ns = new NetStream(nc);
out_ns.publish("officestream");
out_ns.attachVideo(office_cam);

outlow_ns = new NetStream(nc);
outlow_ns.publish("officestreamlow");
outlow_ns.attachVideo(office_camlow);

}
doConnect();
publishMe();


Problem i have is both streams revert to the low quality settings - im i correct in thinking that i cant publish two different quality streams from the same camera?

Any advice or help on this would be greatly appriceated.

Many thanks,

Elliot.
Egglar is offline   Reply With Quote
Old 03-26-2005, 07:48 PM   #2
dsdsdsdsd
Senior Member
 
Join Date: Oct 2003
Location: north carolina
Posts: 472
Default

Egglar, I believe that you cannot have multiple streams of different qualities from the same camera; WHY - because the settings are camera settings, not stream settings;

2 POSSIBILITIES:
1 - if you are streaming live video (as in video conference) the other user (the viewer) could have a set of 'camera publish controls' - essentially a set of variables and a button that when pressed send the variables to the publishing camera and thus the viewer controls the settings for the publishing camera;

2- if you are recording a video then just make multiple records with the different settings; though this is clearly not a good way of going about it it seems to be the only way unless you have an audio mixing board;

Shannon Burnett
Asheville NC USA
dsdsdsdsd is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:20 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.