A Flash Developer Resource Site

Results 1 to 19 of 19

Thread: FMS - record webcam stream and store

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    140

    FMS - capture webcam stream and store

    Hi,
    Does 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.

    Thanks,
    Dave
    Last edited by digitalpencil; 12-05-2006 at 06:58 PM.

  2. #2
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    basically its like this:
    Code:
    var nc:NetConnection = new NetConnection();
    nc.connect(fms_uri);
    var ns:NetStream = new NetStream(nc);
    var mic:Microphone = Microphone.get();
    var cam:Camera = Camera.get();
    ns.attachAudio(mic);
    ns.attachVideo(cam);
    ns.publish(filename, "record");

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Posts
    140
    Thanks, I will look into ns.publish and updating my sql backend with the filename.

  4. #4
    Junior Member
    Join Date
    Dec 2006
    Posts
    27
    Today I have been trying for several hours to record audio recording.

    I have a fms running. NetConnection is stablish ok.
    This is what i do:
    var audioStream:NetStream = null;
    fsConn = new NetConnection();
    fsConn.connect("rtmp://localhost/app/user1");
    fsConn.onStatus = function(){
    if(fsConn.isConnected == false) return;
    var mic:Microphone = Microphone.get();
    audioStream = new NetStream(fsConn);
    audioStream.attachAudio(mic);
    audioStream.publish("testAudio", "record");

  5. #5
    Junior Member
    Join Date
    Dec 2006
    Posts
    27
    Today I have been trying for several hours to record audio.

    I have a fms running. NetConnection is stablished ok.
    This is what i do:
    var audioStream:NetStream = null;
    fsConn = new NetConnection();
    fsConn.connect("rtmp://localhost/app/user1");
    fsConn.onStatus = function(){
    if(fsConn.isConnected == false) return;
    var mic:Microphone = Microphone.get();
    audioStream = new NetStream(fsConn);
    audioStream.attachAudio(mic);
    audioStream.publish("testAudio", "record");
    }

    In the server I have a folder called app in <fms folder>/applications folder. Nothing is saved in any folder.

    Can you help me?

    Thanks.

  6. #6
    flashcom addict
    Join Date
    Feb 2006
    Posts
    45

    recording

    Hi in various posts on the forums I have posted details on this take a look, The application records audio and video and save to the flash media server. A admin file is also available enabling you to delete entries
    i hope it will let you se just how to do this.
    FCS , FMS , Red5 and Wowza application demos online
    see our 18 streaming cameras (including 6 wireless IP cameras)
    8 networked computers some running Windows xp pro others running Linux Centos,The main website running on Sun Colbalt RaQ550 with 1.5 gig of ram using strongbolt software and the latest Centos OS

  7. #7
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    I've made a simple webcam record application for FMS .. u can check it out in my library
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  8. #8
    Senior Member
    Join Date
    Aug 2004
    Location
    plymouth-uk
    Posts
    313
    silentweed, thanks alot for that link been looking for a few weeks now on how to record live cam within flash. Thank you credit given where it is due :-)
    NOW! look whats happened! I told you to watch this space and now its gone.

  9. #9
    Junior Member
    Join Date
    Sep 2007
    Posts
    4
    Quote Originally Posted by silentweed
    I've made a simple webcam record application for FMS .. u can check it out in my library
    I've tried to use this, but either my FMS doesn't work well or I'm doing something wrong.

    I'm pushing the record button. I see movement in the window and the red recording... text, but I can't view the recording and it's not stored anywhere.

    Same with the mr-webcam thing, which I tried first.
    Can anyone help me setting this up. I'm really a flash nOOb. ASP, PHP and .NET is more my territory.

    thanks in advance!

  10. #10
    Junior Member
    Join Date
    Sep 2007
    Posts
    4
    hey...I've got it working

  11. #11
    Junior Member
    Join Date
    Sep 2007
    Posts
    4
    hey...I've got it working

  12. #12
    Interactive Developer
    Join Date
    Oct 2007
    Location
    Saint Louis
    Posts
    10

    Recording Video with AIR/Apollo

    If anyone is interested here's a way to record a webcam stream using AIR/Apollo sans FMS...

    http://tdotblog.info/?q=node/1

  13. #13
    Junior Member
    Join Date
    May 2007
    Posts
    6

    Having trouble with FMS

    I downloaded the Web Record thanks for the FLA. but its not working I uploaed it to my server, the FMS I guess is located here

    C:\Program Files\Macromedia\Flash Media Server 2\fms2_console.htm

    and the server is called karaoke, now I guess my question would be how would I write the actionscript for the RTMP, the default for webRecord is

    var RTMP:String = "rtmp:/karaoke";

    This is driving me crazy haha, thanks for any help.

  14. #14
    Junior Member
    Join Date
    Mar 2007
    Posts
    6
    Quote Originally Posted by therealcleany
    hey...I've got it working
    What was the solution? I have the same problem. Could provide it please.

    Thank you,

    Superman808

  15. #15
    Registered User
    Join Date
    Mar 2011
    Posts
    1

    Here is your Record Actionscript Code for Webcam Video & Audio Feeds

    SCRIPT 1:

    var sUser = fuser;
    var connection = connection;
    ncConnection = new NetConnection();
    ncConnection.connect((connection + sUser), sUser, nCpm, "record");
    ncConnection["onStatus"] = function (info){
    if(info.code == "NetConnection.Connect.Success"){
    txConnect.text = "Coonection established";
    gotoAndStop(2);
    } else if(info.code == "NetConnection.Connect.Closed"){
    gotoAndStop(1);
    txConnect.text += "\r>>The connection was closed successfully";
    } else if(info.code == "NetConnection.Call.Failed"){
    gotoAndStop(1);
    txConnect.text += "\r>>The NetConnection.call method was not able to invoke the server-side method or command.";
    txConnect.text += ("\r" + info.description);
    } else if(info.code == "NetConnection.Connect.Failed"){
    gotoAndStop(1);
    txConnect.text += "\r>>The connection attempt failed.";
    } else if(info.code == "NetConnection.Connect.InvalidApp"){
    gotoAndStop(1);
    txConnect.text += "\r>>The application name specified during the connection attempt was not found on the server.";
    } else if(info.code == "NetConnection.Connect.Rejected"){
    gotoAndStop(1);
    txConnect.text += "\r>>The client does not have permission to connect to the application, or the application expected different parameters from those that were passed.";
    } else if(info.code == "NetConnection.Connect.AppShutdown"){
    gotoAndStop(1);
    txConnect.text += "\r>>The application has been shut down (for example, if the application is out of memory resources and must shut down to prevent the server from crashing) or the server has shut down.";
    } else if(info.code = "NetConnection.call.BadVersion"){
    gotoAndStop(1);
    txConnect.text += "\r>>The URI specified in the NetConnection.connect method did not specify \'rtmp\' as the protocol. \'rtmp\' must be specified when connecting to Flash Communication Server.";
    }
    }
    stop();





    SCRIPT 2:

    nsVideo.publish((date_str + type), "record");




  16. #16
    Registered User
    Join Date
    May 2011
    Posts
    1

    Fms

    Quote Originally Posted by therealcleany View Post
    hey...I've got it working
    I am trying to record a video with my web cam via a web page using FMS. I noticed you had some luck with that. I was wondering if you can give me some demo files that you got working. I got my FMS setup all setup with Amazon, but having trouble getting the web cam recording to work. Any help would be appreciated very much.

    Thanks,
    Rick

  17. #17
    Junior Member
    Join Date
    Sep 2007
    Posts
    4
    Sorry for not replying...
    I think it was something in the action script. I'll get back to you all if I figured it out.
    Flash is not installed on my computer anymore.

  18. #18
    Registered User
    Join Date
    Jan 2012
    Posts
    3

    Its not working. please help me sort out the error.

    Quote Originally Posted by silentweed View Post
    I've made a simple webcam record application for FMS .. u can check it out in my library
    nothing gets recorded in it.. i am trying to make the same application but nothing is working for me.

  19. #19
    Junior Member
    Join Date
    Jul 2012
    Posts
    1
    I too tried Flash Media Server.it works nice.More information read the following post
    READ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center