Record Camera To FLV

 

How to use

Deploy RecordCameraToFLV in your web application

    See binary\RecordCameraToFLV_Client as an example

  • Add RecordCameraToFLV.swf file to your HTML web page

  • In your HTML page, add following Javascript to your HTML body

    <script language="JavaScript">
    function onRecordCompleted(eventObj)
    {
            alert("Camera has been recorded in to file " + eventObj.fileName + " on Red5 Server");
    }
    </script>

    When users press stop record button, onRecordCompleted function is called by RecordCameraToFLV with passing eventObj parameter which has 2 properties:

    • fileName: FLV filename which is stored on Red5

    • duration: FLV file duration in second. It is exactly recorded time.

    You can use 2 properties to process for other purpose. Example above only show alert box which tell when recording process has stopped by user and stored FLV filename.

  • In assets\config.xml file, you can set some properties

Properties Optional Value type Default value Meaning
RTMPServer No String @ IP or hostname of Red5 Server
filename Yes String CamToFLV-<UID string>.flv Name of created FLV file

If you don't declare this parameter, filename will be created as format

CamToFLV-<UID string>.flv

where UID is unique ID created each time record. For example

CamToFLV-99A20ECD-004C-2D6E-11FE-A67ABC8F6BBB.flv

maxDuration Yes Integer 200 Max record time in second.
  • Put all on your web host and test with Browser. Ensure that Red5 server has been started as guided in previous step

Now you have finished using RecordCameraToFLV in your web application. You can get recorded files on Red5 Server at directory <Red5>\webapps\RecordCameraToFLV\streams\records\

Back | Table of Contents | Next

 

Copyright © 2009 Best Flash Solutions, Inc. All rights reserved | Site map