Skip to main content
Known Participant
January 14, 2007
Question

Help recording a webcam

  • January 14, 2007
  • 2 replies
  • 387 views
Hi,

I am planning on creating an application that will need webcam activity recorded and then uploaded to a database, I know that flash media server will be needed, but how do I go about recording a webcam in flash and linking it with flash media server?

Any help would be much appreciated

thanks

Gavin
    This topic has been closed for replies.

    2 replies

    Inspiring
    January 17, 2007
    The recording cannot be done directly by the client, if that is what you are trying to do. It must be streamed to FMS and saved to disk there.

    I won't include the code samples here but suffice it to say it is VERY easy. There are a million code samples on this website and elsewhere. Here is a recent thread with a few more details: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=578&threadid=1231882&enterthread=y

    I suggest you sit down with the trial version of FMS and some good documentation and you should be streaming and recording video in no time.


    Barry
    thahipAuthor
    Known Participant
    January 19, 2007
    Thanks!,

    have found this code in the documentation, but having a slight problem

    The following example shows how to publish and record a video, and then play it back.
    /* This script publishes and records video.
    The recorded file will be named "allAboutMe.flv". */
    var my_nc:NetConnection = new NetConnection();
    my_nc.connect("rtmp://localhost/allAboutMe/mySpeech");
    var publish_ns:NetStream = new NetStream(my_nc);
    publish_ns.publish("allAboutMe", "record");
    publish_ns.attachVideo(Camera.get());
    /* This script plays the recorded file.
    Note that no publishing stream is required to play a recorded file. */
    var my_nc:NetConnection = new NetConnection();
    my_nc.connect("rtmp://localhost/allAboutMe/mySpeech");
    var subscribe_ns:NetStream = new NetStream(my_nc);
    subscribe_ns.play("allAboutMe");
    my_video.attachVideo(subscribe_ns);// my_video is a Video object on the Stage.

    For this line my_nc.connect("rtmp://localhost/allAboutMe/mySpeech");
    I am having trouble with the location, what do I need to put in here?, When I entered admin details for fms2 I didn't enter a server address?, what needs to go in there? and is that meaning this code won't work at the moment?

    thanks

    Gavin
    thahipAuthor
    Known Participant
    January 20, 2007
    Have managed to sort it out, thanks for the help

    thanks

    Gavin
    Inspiring
    January 17, 2007
    The recording cannot be done directly by the client, if that is what you are trying to do. It must be streamed to FMS and saved to disk there.

    I won't include the code samples here but suffice it to say it is VERY easy.