Recording from webcam in Flex

Hi!
I was wondering if I am able to record the images of a webcam in Flex. Is it possible, and if so, how can I make it?
I'm using MJPEG images (ByteArray stream), so can it be a possible way to paste/add images to a Movie (or sg like that) object, and then save it?
Jus a thought, but any solution interests.
Thanks a lot
Milo

Do they allow me to track the mouse easily across the whole
screen or is it just for pieces?
I probably should have explained better earlier but I am
looking to somehow record all their movements across the
application to get a better idea of how the user is interacting and
thinking about the experience. I am not really sure what I am
looking for here but it is my guess that these listeners just check
for moving x amount of pixels one way or another. Do these allow a
more robust method of capture?
Sorry I cannot go any more detailed than that since I am not
really sure what I am looking for yet - I'm just trying to see what
is out there and what others might be doing.
Thanks for your suggestions,
-Dan

Similar Messages

  • Record from webcam to f4v on FMS

    I'm trying to build / modify an application to record from webcam and microphone, in a web browser and save it to an FMS 5.4.2 server to stream via web and iOS
    recording as a flv file works fine and it plays back just fine in firefox / any browser
    I can steam f4v files over http as filename.f4v.m3u8 and that works fine with the samples that come with FMS from my record folder (/opt/adobe/fms/applications/record/streams/)
    My flash web application can record to the FMS server, the file it records has the .f4v file extension, has content (i see the file size), and has time in quicktime (4 or 5 seconds - just a test) but it doesn't play - the screen is black and never starts.
    I know i'm right on the edge of figuring this out, I just don't know what I'm missing or whats wrong (i'm a php programmer, not action script)
    any ideas ?
    here is the code i'm working with:
    package com
        import fl.controls.ProgressBar;
        import fl.controls.ProgressBarMode;
        import flash.display.MovieClip;
        import flash.events.Event;
        import com.NetConnector
        import flash.events.MouseEvent;
        import flash.events.TimerEvent;
        import flash.media.Camera;
        import flash.media.Microphone;
        import flash.media.Video;
        import flash.net.navigateToURL;
        import flash.net.NetConnection;
        import flash.net.NetStream;
        import flash.net.URLLoader;
        import flash.net.URLLoaderDataFormat;
        import flash.net.URLRequest;
        import flash.net.URLRequestMethod;
        import flash.net.URLVariables;
        import flash.text.TextField;
        import flash.utils.setTimeout;
        import flash.utils.Timer;
        import flash.media.H264Level;
        import flash.media.H264Profile;
        import flash.media.H264VideoStreamSettings;
        import flash.media.VideoCodec;
         * @author Alexander (flash2you) < >
        public class Recorder extends MovieClip
            private var dataHolder:DataHolder = DataHolder.getInstance()
            public var layer:MovieClip
            public var activityLevel_pb:ProgressBar
            public var aguja:MovieClip
            public var aguja2:MovieClip
            public var publishButton:MovieClip
            public var timer_txt:TextField
            public var recordStatus:MovieClip
            public var recordBtn:MovieClip
            private var netStream:NetStream
            private var microphone:Microphone = Microphone.getMicrophone()
            private var camera:Camera = Camera.getCamera()
            public var  video:Video
            private var timer:Timer = new Timer(100)
            private var clockTimer:Timer = new Timer(1000)
            public var published:Boolean = false
            private var isRecording:Boolean = false
            private var minutero = 0;
            private var crono = 0;
            private var records = 0;
            public var settings_mc:MovieClip
            public static var recorder:Recorder
            public var settings_icon:MovieClip
            private var limitTimer:Timer
            public function Recorder()
                Recorder.recorder = this;
                timer.addEventListener(TimerEvent.TIMER, on$timer)
                clockTimer.addEventListener(TimerEvent.TIMER, on$clockTimer)
                //visible = false
                recordBtn.buttonMode = true
                recordBtn.addEventListener(MouseEvent.CLICK , recordBtn$click)
                recordBtn.addEventListener(MouseEvent.MOUSE_OVER, recordBtn$over)
                recordBtn.addEventListener(MouseEvent.MOUSE_OUT, recordBtn$out)
                addEventListener(Event.ADDED_TO_STAGE, onAddedToStage)
                limitTimer = new Timer(dataHolder.timelimit * 1000);
                limitTimer.addEventListener(TimerEvent.TIMER, onLimitTimerHandler)
            private function onLimitTimerHandler(e:TimerEvent):void
                 stopPublish()
             *  when we comes to second frame
            private function onAddedToStage(e:Event):void
                removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
                init()
             *   function for set up camera from settings module
            public function setCamera(_camera:Camera) {
                camera = _camera
                addCameraSettings()
                video.width = 1280;
                video.height = 720;
                video.attachCamera(camera)
                if (netStream){
                    netStream.attachCamera(camera)
            public function setMicrophone(mic:Microphone) {
                microphone = mic;
                if (netStream){
                    netStream.attachAudio(microphone)
                addMicSettings()
            private function addMicSettings() {
                microphone.setUseEchoSuppression(true);
                microphone.setSilenceLevel(1)
            private function addCameraSettings():void
                camera.setMode(1280, 720, 25);
                   camera.setLoopback(true);
                   camera.setQuality(0, 100);
            public function init() {
                startConnect()
             *  main function for connection
            private function startConnect() {
                visible = true
                timer_txt.htmlText = "<b>00:00</b>";
                initCamera()
                initMicropone()
                var nc:NetConnection = new NetConnection()
                nc.connect(null)
                netStream = new NetStream(nc)
                netStream.attachAudio(microphone)
                video.attachCamera(camera)
                layer.visible = false
                publishButton.gotoAndStop(1);
                activityLevel_pb.mode = ProgressBarMode.MANUAL;
                recordStatus.gotoAndStop("noRecord")
                timer.start()
                connection.addEventListener(NetConnector.CONNECTED, connectionComplete)
                connection.startConnection()
            public function get connection():NetConnector {
                return dataHolder.connection
            private function on$timer(e:TimerEvent) {
                activityLevel_pb.setProgress(microphone.activityLevel, 100)
             *  when connection to your stream server done
            private function connectionComplete(e:Event = null) {
                netStream = new NetStream(connection)
                netStream.attachAudio(microphone)
                netStream.attachCamera(camera)
             *   add 0 if less then 10secs
            private function addLeading(nbr) {
                if (nbr<10) {
                    return ("0"+Math.floor(nbr));
                } else {
                    return (Math.floor(nbr).toString());
             *   update visible clock, rotate arrows
            private function updateTimer() {
                timer_txt.htmlText = "<b>"+addLeading(crono/60)+":"+addLeading(crono%60)+"</b>";
                aguja.rotation = aguja.rotation+6;
                if (addLeading(crono/60)>minutero) {
                    aguja2.rotation = aguja2.rotation+6;
                    ++minutero;
                // end if
                ++crono;
            private function on$clockTimer(e:TimerEvent):void
                updateTimer()
            private function startClockTimer() {
                clockTimer.start()
             *  update graphics and start recording
            private function recordBtn$click(e:MouseEvent):void
                if (!isRecording) {
                    startRecording()
                    recordStatus.gotoAndStop("record")
                    recordBtn.visible = false
            private function recordBtn$over(e:MouseEvent):void
                if (!isRecording) {
                    this.gotoAndPlay(65);
            private function recordBtn$out(e:MouseEvent):void
                if (!isRecording) {
                    this.gotoAndPlay(61);
            private function startRecording() {
                if (connection.connected){
                    netStream.publish("mp4:" + dataHolder.filename + ".f4v", "record");
                isRecording = true
                startClockTimer()
                publishButton.gotoAndPlay(2)
                publishButton.buttonMode = true
                publishButton.addEventListener(MouseEvent.CLICK, publishButton$click);
                limitTimer.start()
             *  redirect to finishURL that was passed via flashvars
            private function publishButton$click(e:MouseEvent):void
                stopPublish()
                var request:URLRequest = new URLRequest(dataHolder.finishURL)
                navigateToURL(request, "_self")
            private function stopPublish():void
                netStream.close();
                connection.close();
                limitTimer.stop();
                clockTimer.stop();
                isRecording = false
                recordStatus.gotoAndStop("recordEnd")
                updateTimer();
             *  init microphone
            private function initMicropone():void
                microphone = Microphone.getMicrophone()
                addMicSettings()
             *  init camera
            private function initCamera():void
                camera = Camera.getCamera()
                addCameraSettings()

    Hi,
    Thanks for the details
    First, the quality of the feed we get to the flash player and FMS is highly limited by the capabilities of the webcam that the users have beyond which we cannot improve the quality.
    Next, flash player can encode good quality and hence you should probably find more stuff related to how best you can ingest video from a webcam on to the flash player.
    - Does recording from server side with asc script will increase the quality ?
    No, FMS does not do any type of transcoding/re-encoding stuff. All it does is to 'transmit' and in your case, to flush bits to the disk. So, unless FMS recieves 'Quality', it cannot do much.
    - what configurations files on the server can i adjust to increase the recording quality ?
    From above, it flows that, there are no configurations on the server that can make your quality grow. The configurations are more to do with delivery. It can be tweaked to improve streaming, reduce latency, quick start and more.
    - is there a way to cache locally the stream if the bandwith is not high enough, and when the user stops recording, upload it to the server (it doesn't have to be live or broadcast).
    I don't think flash player can do this.
    Thank you !

  • Recording from webcam HD

    Hello:
    I need to show on the stage the video from my HD webcam in a local PC and save the video into a file.
    Do you know a way to record the video and save it to mpg or mov, flv, mp4 video file?
    any Xtras, ActiveX or other ways?
    Thank you very much

    I know you can control webcams in Director - via the flash asset
    have a play with valentins old script demos here:-
    http://valentin.dasdeck.com/lingo/flash_camera/

  • Recording from webcam into fcp

    Can you record video from a web cam directly into FCP?

    Final Cut doesn't capture from USB sources. If you're referring to a built-in iSight, then it's a USB camera. Quicktime Player can record video from it, though.

  • Problem : Recording video & audio from webcam

    Hi all
    I want to record myself to see the expression on my face on average through the USB webcam .
    I use mencoder for recording from USB webcam .
    mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -fps 16.2 -o test16.2.avi
    The problem is that the audio is not synchronized with the video
    what can i do ? help!
    Last edited by remstereo (2010-11-17 08:16:45)

    up

  • How to send the image bytes(which is taken from webcam) from flex(4.6 version) to dotnet

    In my project we are using adobe flash builder 4.6 as a client-side scripting,visual studio as a mediator(for connecting the oracle database).In this, in flex 4.6 we are capturing images from webcam that's working fine, after capturing the image we need to save this captured image in oracle database so in order to save we need to pass this image from flex to dot-net(visual studio) so i need a help on how to approach to done this(passing the image from flex to dot-net) if any one knows please help me i will be very thankful to them

    finally i got the solution fot this,i tried using yhis link it work's for me
    http://stackoverflow.com/questions/5702239/how-to-pass-image-from-a-flex-application-to-a- asp-net-c-sharp-web-service

  • OnLocation fails to record from Microsoft LifeCam Studio 1080p HD Webcam

    Hi,
    I finally installed and configured OnLocation on my laptop, and I was looking forward to shooting 1080p footage in my car. Imagine my disappointment when it turned out that OnLocation refuses to record from the camera! I know the camera works because other software can use it (alas, at 720p). Why is it I am not having any luck with this? All the other forums suggested that OnLocation is the ultimate tool for mobile recording to disk, and now I can't even get it to show me the live footage. What gives?
    -- MK

    VirtualDub works. But there are a few hoops to jump through. http://www.youtube.com/watch?v=QakF9eWBh7A. I realize that it has been a while since your question was posted so if you have found something better than this, do let me know.

  • Video stream recording (not webcam) help required

    I am making a media player / recorder type web application in flex 4.
    The application plays video streams streamed from my red5 server.
    I want to give users the ability to make / record clips of the video they are viewing.
    I know that netstream.publish is used to record/save video on the server.
    All the help i've found on google so far just give examples to save video from webcam.
    But i want to save video from a video being streamed from red5 server and being played
    on VideoPlayer control in flex.
    All help is greatly appreciated.
    Thanks.

    Thanks for the reply but i think u misunderstood my problem.
    I am not receiving any RTP Stream but RTMP stream.RTMP is a proprietary protocol of Adobe For Streaming Flash video from Flash Media Server (FMS).
    I again state the problem.
    I am getting an RTMP Stream now i want to convert it into an RTP Stream so that i can process or transmit it further.I want to convert this RTMP Stream to RTP format.
    Anyone plz help me out.I am stuck into this for past 2 days and it is very critical for my project. :-(

  • How to delete same name records from datagrid,while i am selecting one of the record and delete

    hi friends,
    i am working in flex 4 mxml web application with action script....i am using a data grid and one delete button outside the gird.
    i have two records in the same name in grid, when i click one record from the grid and click delete means that time ,both records will delete from that grid
    which record having the same name..
    how to do this?
    any useful suggesssion or snippets code for this..
    Thanks in advance,
    B.venkatesan.

    hello,
    first get the length of the datagrid.
    suppose your datagrid id is db and you want to delete the the row which have same name .....
    first get the selected row and from that name of the selcted row.
    supoose selected name is
    var index:int=db.selectedindex;
    var selname:string =bd.dataprovide.getItemAt(index).name;(name id datafield of the column).
    now you got the selected name search for the same rows in datagrid.
    var totallen:int=(db.dataprovider).length;
    for(var i:int=0;i<totallen;i++)
        var  checkduplicate:string=bd.dataprovide.getItemAt(i).name;
       if(checkduplicate==selname)
         db.dataProvider.removeItemAt(i);
    this will delete all the row which are with same name with selected row name...
    Gajanan Hiroji | [email protected] | www.isacglobal.com

  • How to record from the video in or S-video Ports on Qosmio G40?

    Can anyone tell me how to record from the video in or S-video ports, because i've tried the Ulead DVD factory program and the only capture device it could see was the webcam, and it did capture from it
    After that i've downloaded the update file that was provided by the support website
    The devices that the program could see are the TV tuner and the webcam (which it couldn't access anymore for some reason)
    After that i've downloaded a newer update which simply is the same as the last update and seems that someone in the support website directed the link of the new update which they don't have to the file of the previous update which doesn't really do anything.

    Hi
    There are 2 s-video ports; s-video out port is not designed to capture the signals from any external source. The name of this port says everything; its an OUT port!
    The s-video-in port must be placed at the right side of the notebook. Dont mix the both ports. But note; this port receives only the video signals. To hear the sounds, use a video cable to connect the sound terminals of the audio device and your computer.
    Red: sound right channel
    White: sound left channel
    The Ulead DVD Movie factory can be used to capture this signal.

  • How to add same name records from datagrid,while i am selecting one of the record and click add butt

    hi  friends,
    i  am doing flex 4 mxml web application with as3,i am struck up in the following  concept,shar your suggession about this.
    i am using datagrid with 3 columns NUMBER, NAME, AMOUNT. one text box and one add button and one delete button.
    i have two records in the same name in grid, when i click one record from the grid and click ADD button means that time ,both records  AMOUNT WILL ADDED   which record having the same name and give that value in a text box.
    how to do this?
    any useful suggesssion or modal sample
    Thanks in advance,
    B.venkatesan.

    hi gajanan hiroji,
    Thanks for the useful help.
    And one more think i want ask you, i am doing web application, i am using 5 modules in that,every module in a single page.
    In this application i am using datagrid in last 3 models. the operation is same for the models, select a record from grid then click post it should move to next page.
    In that i am writting init() function . this for showing the last module posted records here while i am entering this model.
    At the panel initializing time the records loading and showing in the gird,
    i written refresh function for this .
    But some times the function working properly and show the records in grid.
    some time it wont show the records.
    refresh function not working properly..
    looking for usful suggession,
    Thanks,
    B.venkatesan.

  • WSDL Error : Difficult in reading one record from server

    Hi,
    I have an issue with WSDL. i have imported the wsdl and getting the results in flex. Now when i am trying to import only one record from wsdl its throwing an error. Please any help is appreciable.
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at Components::References/ResultHandler()[E:\Project_Modified\05_10_2010\LawPadPDA\src\Compo nents\References.mxml:87]
        at Components::References/__lawPadServicesDAOPort_result()[E:\Project_Modified\05_10_2010\La wPadPDA\src\Components\References.mxml:19]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at com.adobe.fiber.services.wrapper::AbstractServiceWrapper/http://www.adobe.com/2008/flex/model/internal::propagateEvents()[C:\depot\DataServices\bra nches\lcds_modeler101\frameworks\projects\fiber-swc\src\com\adobe\fiber\services\wrapper\A bstractServiceWrapper.as:200]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.rpc::AbstractService/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\A bstractService.as:333]
        at mx.rpc.soap.mxml::WebService/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\ rpc\soap\mxml\WebService.as:267]
        at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.0.0\frameworks\pro jects\rpc\src\mx\rpc\AbstractOperation.as:254]
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.0.0\frameworks\projec ts\rpc\src\mx\rpc\AbstractInvoker.as:318]
        at mx.rpc::Responder/result()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:5 6]
        at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:84]
        at DirectHTTPMessageResponder/completeHandler()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\ messaging\channels\DirectHTTPChannel.as:446]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    Thanks and Regards,
    Pradeep

    The Flex forum is here:
    http://forums.adobe.com/community/flex
    This one is just for discussions on the forums themselves.

  • Can not delete record from the master block ,frm-40202 field must be entere

    hi ,
    i have built a form which contain master and details blocks
    the problem is
    when i try to delete a record from the master block it gives me new serial for the transaction and when i try to save it, it says
    >frm-40202 field must be entered
    where this field is required and i cant save it
    although in another form when i delete from the master it gives me the previous record and it works properly
    if any one has any ideas pls help me
    thank u
    ------- the master block has a trigger when-create-recoder
    Declare>v_dummy number;
    Begin
    Select nvl(max(ERNT_NO),0) + 1 >Into v_dummy
    From LM_RENT_EXPNMST >Where cmp_no = :LM_RENT_EXPNMST.cmp_no
    And brn_no = :LM_RENT_EXPNMST.brn_no>and fiscal_yr = :LM_RENT_EXPNMST.fiscal_yr;
    >:LM_RENT_EXPNMST.ERNT_NO := v_dummy;
    END;
    IF :PARAMETER.RNT_NO IS NOT NULL THEN
         :LM_RENT_EXPNMST.RNT_NO:=:PARAMETER.RNT_NO;
              :LM_RENT_EXPNMST.RNT_YR:=:PARAMETER.RNT_YR;
         :LM_RENT_EXPNMST.CUST_DESC:=:PARAMETER.RNT_ADESC;
    END IF;Edited by: ayadsufyan on May 8, 2013 2:03 PM

    If this is a FORMS question you should mark this one ANSWERED and repost your question in the FORMS forum
    Forms

  • Unable to capture video from webcam in JMF in xlet

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?
    Thanks
    Rajesh

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • Unable to capture video from webcam in JMF

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

Maybe you are looking for

  • BW report integration in Portal/PC-UI based on a BP at runtime

    Hello, we have created a BW report "Customer Overview" and want this report to be called from the Account BSP iView (within the context): The selected Business Partner should be automatically transferred to the report, the BW report should receive th

  • File attachment in mail missing

    I am using iphone to read my corporate emails. I received an email with attachment 8MB and was asked to download full message. Once I downloaded the full message, the attachment was missing and a text message (See attached file: filename.zip) was rep

  • Transform action, is it possible to change value directly files?

    Hi, We are investigation transform action on isetup and we notice that almost all the standard templates are not eligible for transormation. So if have the following questions: 1- Do you know where the generated outpout files are located on the serve

  • Why does the mouse move erratically in PSE 13?

    why does the mouse move erratically in PSE 13?

  • Sql timings, statistics

    hi, i want to test the difference between ANSI sql and oracle native sql using joins (inner, outer, left, right, full). how do i get the statistics? the timings? and where does this get displayed? into which table? plz help on this... thanx in advanc