ActionScript 3.0 :: Saving A Webcam Video Stream?
Mar 24, 2010I'm pretty new to flash.how to add a webcam, but is there a way to save a video from the webcam feed onto the pc running the flash app?
View 3 RepliesI'm pretty new to flash.how to add a webcam, but is there a way to save a video from the webcam feed onto the pc running the flash app?
View 3 RepliesThis will create an flv video file on flash media server:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.publish("yourCamera", "record");
ns.attachVideo(Camera.get());
How can I generate an image for the current video frame every 2 seconds?
For fun I'd like to recreate [URL]. Basically i need to be able to stream webcam video from one computer to another using flash.
View 1 RepliesI'm trying to record video from the users webcam and play it back at a later date.
I call
[Code]...
However, when I look at the FMS Admin Console at the streams in app/_definst_, their types are either "NetStream" or "Live". If they were being saved wouldn't they say "Stored"? After I close the application doing the recording, the "NetStream" type stream disappears, and after a while all the "Live" typed streams are gone too. Nothing is saved.
I have no idea what is happening. I don't know if it's a problem with my AS3 code not closing the recording properly or if I'm doing something else wrong, or maybe somethgin isn't right in the FMS?
Server conf:
2 x Intel(R) Xeon(R) CPU L5410 @ 2.33GHz
16Gb RAM
2 Gbit ethernet channel
OS - Linux CentOS 5.5 x86_64
FMS4 Interactive
Live stream parameters:
320Ń…240 qua_=87 bw_=200000 kf_=5 fps_=18
So, after approximately 600 connections to one stream video becomes choppy (periodically freeze, slow motions). CPU-usage at this time is 100-120% (maximum is 800%, 100% per each core), network usage is 500 Mbit/sec.But second live stream(with few connections) at this server looks fine simultaneously with 600 connections at first stream.Experiments with recommendation in "Configuring performance features" documentation chapter(enabling/disabling aggregate messages and configure the size of stream chunks) do not help.
How does the url of FMS real time video stream look like?
View 1 RepliesI am capturing a webcam still and saving in a BitmapData variable. I want to then pass the BitmapData to a php script where I can save it to a folder.
View 2 RepliesHow can i save a webcam screenshot to a website?
I know you can save it to your hard drive using:
var browseFileReference = new FileReference();
browseFileReference.save(video);
But how would i go about it to save this image to a website, lets say flickr or facebook or something.
I have a swf that lets you take a picture with your webcam , I have changed the scaleX to -1 so that the picture on screen appears like a mirror. This works fine, when I take a screenshot I am getting a bitmapdata from the video stream, which I am also setting scaleX to -1 to preserve the image the same as from the video. But now I am trying to save that picture as a jpg file, I can't seem to save the pictures as it appears, I can only save it as the original data which is essentially the wrong way around (doesn't preserve the changes made to scaleX = -1)
Code:
bitmapData = new BitmapData(this.video.width,this.video.height);
bitmapData.draw(this.video);
// at this point the bitmapData is the webcam view, but not with the scaleX I applied before
[...]
var jpgStream:ByteArray = jpgEncoder.encode(bitmapData);
// so now this jpg data is of the picture which isn't horizontally flipped
How can I get a bitmapData from the video and preserve the scaling I applied to the video?
I have made a flash webcam application to allow the user to take a photo of themselves using a webcam. I have successfully saved the photo in my localhost. However, I would like to set the names of those photos. Currently, the photos names are generated by
$uniqueStamp = date('U');
I also have a textfield in my flash app that allows inputs from user for the photo name. For example if the user write 'MYPHOTONAME' in the textfield, the photo which will be saved in my localhost will be named 'MYPHOTONAME' too. How do I do it in Flash and in PHP? Currently I'm having some problems because I cannot send the textfield string to PHP.
Here is my flash code to send the snapshot to PHP and let the PHP save it in my localhost:
imgBA = jpgEncoder.encode(imgBD1);
sendReq.data = imgBA;
sendLoader.load(sendReq);
[Code]....
As you can see, I tried to pass in $photo = $_POST['photo']; from flash to PHP however I do not know the exact code, can anyone help me?
I'm new to AS3 and attempting to learn it by doing a small task, I am trying to get a live local video feed from USB webcam and want to be able to capture and save screenshots from it.I have the live feed working fine, but I am struggling to capture and save a screenshot.Someone from adobe forums suggested I should use BitmapData and JPGEncoder, which I have alongside as3corelib's.[code]I think I am doing something wrong when I am capturing the binary data, or when I am encoding it to JPG.Some assistance from somebody familiar with these methods will be a huge help as I am stuck now, and I am not getting any replies from adobe forums.Both the resolution of the videoInstance object and camera feed are 640x480, and the video is displayed fine.
View 7 RepliesIm sitting here with a project that i feel i have come a long way with (found some very usefull rescources). But i am stuck now and need some guideance in short terms what i am doing is a project where users can take a snapshot of them selves by using their webcams, and then save this picture.
This is all going ok, but when i save the picture its not the same size as the webcam picture. From what i can tell there is something going wrong with the bitmap creation process, and i cant seem to figure out how to add a field that i can toss the picture into like i have done with the video. (its using addchild(bitmap) now and that just adds a small picture at a given x & y, but i cant control size of it. And the saved pictures im getting are the size of the video area, but only 1/8th is filled with the picture, rest is just white..
[Code]...
I don't have my own Flash Media Server. I can however use the Highwinds CDN. They run FMS on their CDN. When you schedule a live event, Highwinds gives you two urls: the "server" and "stream name". Examples:
[Code]....
ok so I have the webcam in my flash movie,so you see your cam in the frame..but i was wondering if there was a code to pause the stream so you can a 'snapshot' without having to save anywhere or anything too complicated.. just literally pausing then un-pausing
View 3 Replieshow to stream a webcam using ActionScript 3
View 1 RepliesI have a webcam looking out the window, and I would like to be able to access it from time to time via website.
I have never touched flash, but I know some programming languages.
I know I want to use Flash, but I have no idea where to start, and I thought this might be a good place to ask.
I am looking to create a flash movie that lets users watch a webcam from my website, How is it done? any tuts they can get me started?
View 1 RepliesDoes anyone know anything about recording webcam streams and storing them using FMS? I'm looking into capturing the stream as an FLV that can then be stored on the server so it can be played back.If anyone has any ideas on hwo to go about this or knows of any good reading material, let me know.
View 17 RepliesI'm not sure if this is the right place to post but here goes. I'm looking to stream a live webcam on my website and have no idea where to start. I've been searching for a while and various things refer to Flash Media Server but this is costly and, as I will be streaming from University, it will probably be blocked on the network or take up too much bandwidth.
Does anyone know of a way to stream a webcam, without FMS or Quicktime Broadcaster etc.? Any free websites that provide this service could be possible, so long as the stream isn't available to anyone outside my website.
I wonder if i can do the following, send a stream to fms from a webcam and then serve it with apache on http x-flv format.
View 6 RepliesShould I buffer a live webcam stream?
View 1 RepliesI'm recording a stream from a webcam as an f4v file using FMS 3.5. The file is created in the live folder, and i can stream it back to the client no problem, however when I try to play the file in Adobe Media Player (or anything else) it won't play. I've used the f4v post processor which claims to run successfully, but with no joy.
View 5 Repliesgoal is to record a stream from a webcam with the best possible quality regardless the bandwith of the user.(it doesn't have to be live or broadcast, just stored on the server)
is it best to record from server side with asc script or directly from the flash player ?what are the parameters on the server that i can play with in order to cache locally the stream if the bandwith is not high enough ?
We have a Red5 Server that we use to host a video chat. We are looking for a way to overlay SWF files over the top of a live stream video.For example, we could overlay an SWF animation of snow falling in front of a live stream from a webcam.
View 1 RepliesI developed a video recording application using Flash with Red5 .
It records the stream and saves atha in webapps folder. But i want to save that in custom directry?
Is it possible to mention the path inside the flash code? I tried out this code ... but it throws error saying bad name....
ns.publish(videoName,"http://mysite/video/record");
steps to change recording path of the streams.
Capture the webcam, how do I put more quality into the video? The video comes out very bad! Does anyone know how to better quality in webcam video? And if I put larger(1280x1024), also is very bad! Is there any way that does not happen!
The Code:
Code: Select allvar cam:Camera = Camera.getCamera();
var video:Video = new Video(320, 240);
video.attachCamera(cam);
this.addChild(video);
I am trying to generate image of flash charts generated by Open Flash chart library using PHP Mysql database.
I have generated image but it's in some coding format in a div on my webpage. Something like below:
<div id="img_chart_1">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAk4AAAEsCAYAAAA1jTw5AAAli0lEQVR42u3dDdAkdX0n8Keu6s67..../ >
</div>
How can I save this image in any image extension like .png ?
I have to give a button on my page. So when user click on button I have to export this image in PGF file.
So I am trying to save this image with image extension and will give link of saved image in PDF file to show.
i know how to use a webcam in as3,i want to record webcam video and save to my Local disk
View 1 RepliesIn my application I want to display the webcam video. for that I use the as3 code
[cODE]....
but When i run the project there is no webcam video. I have trace the current Frame rate of the camera by trace(cam.currentFPS) ;and the output is 0; But I can watch the webcam video by yahoo messenger window and the software provide by the webcam driver.What is the problem of my code?
I recently was sent the source to a set of Actionscript classes and libraries which allows flash devs to track faces in Flash by use of a computer's webcam. This is pre-written source that I am wanting to embed into a game I am designing so that when the person leans left or right, the character on screen will move left or right respectively.
Here's the problem, the face-tracking is working, but the video that is being pulled in from the webcam is reversed...it is not a true mirrored image. I'm assuming that there's a line of Actionscript in my code that needs to be modified so that the video is mirrored rather than be displayed reversed.I did some research and found a few solutions, but I haven't been able to successfully implement them...I don't know how. I've tried but I'm guessing I've inserted these lines of Actionscript into the wrong spot within my Main class. Here's the couple examples I've found:
ActionScript Code:
//Example 1
myVideo.scaleX = -1;[code]................