Documentation

Installations

The first thing you need to do is to extract the contents of the Flv Audio Recorder.zip archive that you have downloaded.

In that archive you will find audiorecorder.swf which is the actual compiled Flash application and the audiorecorder-api.html, a HTML file that embeds the swf file. The audiorecorder-api.html file also includes some JavaScript functions (API) that are executed when certain events happen in the audio recorder. In the archive you will also find some server side files for the media server, there are specific files for FMIS, Red5 0.7, Red5 0.8 and Wowza.

Step 1: Setting up the Red5/FMIS/Wowza application

If you have Flash Media Interactive Server installed on a dedicated or vps server:

  1. Copy the audiorecorder folder ( server side files (FMS)/audiorecorder ) to your FMIS Installation Folder/applications folder.
  2. Edit the settings.asc file with a text editor and insert in it the license key (it's in your client/trial area o nusofthq.com).

 

If you have a Flash Media Interactive Server account from Influxis.com:

  1. log in to your account at influxis.com and create a new application (folder) named audiorecorder.
  2. In this new folder upload the main.ase and settings.asc files from the Files to upload to your media server (FMIS)/audiorecorder folder archive you recieved.
  3. Edit the settings.asc file with a text editor and insert in it the license key (it's in your client/trial area o nusofthq.com).

 

If you have Red5 installed on a dedicated or vps server:

  1. Put the audiorecorder folder (you will find it in your archive in Files to upload to your media server (Red5)/Red5 0.X/audiorecorder) in the webapps folder of your Red5 installation (C:\Program Files\Red5\webapps on Win, /opt/red5/webapps/ on Linux).
  2. Edit the audiorecorder.properties file with a text editor and insert in it the license key (it's in your client/trial area o nusofthq.com).
  3. Restart the Red5 server.
  4. Make sure your Red5 server is started and running properly by going to: http://myred5server.com:5080/.

 

If you have Wowza installed on a dedicated or vps server:

  1. Put the applications, conf and lib folders (you will find them in your archive in Files to upload to your media server (Wowza)/) in your Wowza installation folder.
  2. Edit the conf/audiorecorder/audiorecorder.properties file with a text editor and insert in it the license key (it's in your client/trial area o nusofthq.com).
  3. Restart the Wowza server.

Starting with Wowza Media Server version: Wowza Streaming Engine 4.0, a new GUI has been added that allows you to control the server and individual applications. This can be accessed via browser at the following link http://WOWZA_SERVER_ADDRESS:8088/enginemanager/.

By default this version of Wowza Media Server comes with the default stream prefix mp4. This needs to be changed to flv. Here's how:

  1. Go to http://WOWZA_SERVER_ADDRESS:8088/enginemanager/
  2. From the top menu click the [Server] page
  3. In Server Setup click Edit
  4. Change Default Stream Prefix from mp4 to flv
  5. Save

Step 2: Installing the Flv Audio Recorder in a folder

If you want to install the Flv Audio Recorder in a folder on your web site:

  1. Copy the contents of the Files to upload to your website folder from the archive you received to your website (using FTP or any other method to upload files to your website)
  2. Open avc_settings.php (or avc_settings.asp) in a text editor, and set the value of $connectionstring to your newly created FMIS/Red5 application. Some FMIS hosting providers will already generate this connectionstring for you. This is how it should look:
    • rtmp://localhost/audiorecorder/_definst_
    • rtmp://myfmsserver.com/audiorecorder/_definst_
    • rtmp://subdomain.myred5server.com/audiorecorder/_definst_
  3. Save the avc_settings.php file and upload it to the web server.
  4. Go to http://www.yoursite.com/audiorecorder/audiorecorder-api.html and if everything is set up properly you will end up seeing the audio recorder screen.

What we need if you want us to perform the installation

We offer a free installation with every purchase and an Additional Installation Service.

Here's what we need to install AVChat for you:

  1. FTP access to the web site (or folder) where FLVAR will be installed
  2. root ssh access to the vps/dedicated server where the media server (Red5/FMIS/Wowza) is installed (on Windows servers Remote Desktop access will do) OR (if you're using media server hosting) access to your media server hosting account (http://influxis.com and http://uvault.com provide shared FMIS hosting)

Please send the data to support@nusofthq.com.

FLVAR installations generally take 6-24 hours if all the data above is sent correct and complete.

1.4 What we need if you want us to install Red5/FMIS/Wowza for you

We offer a Media Sever installation service for $99/one time fee.

Here's what we need to install the Media Server for you:

  1. root ssh access to the vps/dedicated server where you want the media server (Red5/FMIS/Wowza) to be installed if have a Linux Server, or Remote Desktop if you have a Windows server.
  2. If you want FMIS or Wowza installed, we will also need the licence key you received after purchasing them.

Please send the data to support@nusofthq.com.

Media Server installations generally take 6-24 hours if all the data above is sent correct and complete.

Back to top

Where are the recorded .flv files?

When using FMIS:

When using FMIS hosting accounts:

When using Red5:

When using Wowza:

And keep in mind, the .flv files are containers. The .flv files created by FLVAR contain sound encoded with either the Speex audio codec (default) or with Nellymoser. To change th codec or quality edit avc_settings.xxx.

Back to top

Changing and resetting the license key

When using FMIS:

  1. Edit the FMIS/applications/audiorecorder/settings.asc file with a text editor and change the license key (it's in your client/trial area o nusofthq.com).
  2. Restart FMIS
    OR
    Reload the audiorecorder application using the FMS Management Consoles.

When using Red5:

  1. Edit the Red5/webapps/audiorecorder/audiorecorder.properties file with a text editor and change the license key (it's in your client/trial area o nusofthq.com).
  2. Restart Red5.

When using Wowza:

  1. Edit the Wowza/conf/audiorecorder/audiorecorder.properties file with a text editor and insert in it the license key (it's in your client/trial area o nusofthq.com).
  2. Restart Wowza.

Back to top

On audio quality

Flash applications (including FLVAR) can encode sound captured from the mic using 2 audio codecs: Nellymoser (older) and Speex (newer).

The Nellymoser Asao codec, was introduced in Flash Player 6 and was licensed by Adobe from Nellymoser Inc. . Because Nellymoser Inc. had the full rights to the audio codec this made it hard and expensive for developers to convert files encoded with Nellymoser to AAC or MP3. This was one of the main complains against Nellymoser Asao.

The Speex codec, introduced in Flash Player 10, is optimized for voice and provides better audio quality using less bandwdith. It is also open souce so you can decode it and convert it to mp3 or aac (ffmpeg already decodes Speex) without needing any licenses. It also provides more levels (11) of quality as opposed to Nellymoser Asao (only 5).

To specify the codec you need to edit avc_settings.xxx and change the value of the codec variable!
To specify the quality you need to edit avc_settings.xxx and change the value of the soundRate variable!

If we look in avc_settings.php we will see the default values:
$config['codec']= 1;
$config['soundRate']=10;

That means Speex (1 is for Speex 0 is for Nellymoser) with an audio quality of 10.

Attention, there are different quality values for each codec! The quality value affects the bitrate of the audio stream:

Nellymoser Asao:

Speex:

You can see that Speex at its highest setting needs half the bandwidth Nellymoser Asao uses at its highest setting.

Both Speex and Nellymoser ASAO are optimized for voice and in Flash Player they can only encode mono sound.

Flash apps can DECODE AAC and MP3 sounds. Flash apps can not ENCODE using those 2 codecs.

Regardless of the sound quality value you use, you will need a good microphone if you want good sound quality. From our experience 90% of the sound quality depends on the microphone or audio source used. If you're using a cheap mic for example it won't matter if you're using a sound quality of 3 or 10.

Back to top

Switching to .asp or .jsp

The Flv Audio Recorder uses by default the php files (avc_settings.php and save_audio_to_db.php). Here is how to force the Flv Audio Recorder to use the .asp files instead:

  1. edit audiorecorder-api.html with a text editor
  2. find these lines of code:
    var flashvars = {
    userId: "123",
    recorderId: "456"
    sscode:".php"

    };
  3. change ".php" to ".asp" like this:
    var flashvars = {
    userId: "123",
    recorderId: "456"
    sscode: ".asp",
    };

  4. Save the HTML file (and upload it to your website if necessary)

That's it! Now when loaded in the web browser the audiorecorder.swf file will execute avc_settings.asp and save_audio_to_db.asp.

The same applies for when you want to use the .jsp files (added in build 152) , set the above variable to ".jsp".

Back to top

JS READ API (Callbacks from FLVAR)

Every time the [Save] button is pressed inside the Flv Audio Recorder a java script function named btSavePressed() is called. Some variables are sent to it:

The btSavePressed() java script function is defined in the audiorecorder-api.html file and can be extended/edited by you to:

The user id that is passed to this JS function needs to be passed to audiorecorder.swf using flash vars or using the $config['userId'] variable in avc_settings.php. The latter has higher priority!

The recorder id that is passed to this JS function needs to be passed to audiorecorder.swf using flash vars. The recorder id allows you to have 2 or more audio recorders on the html page. When one of them makes a call to the JS function you can use the recorder id to track which one called the function!

Starting with build 114 new JS functions have been added, one for every button in FLVAR:

These JS functions are defined in audiorecorder-api.html (starting with build 114) and you can extend them.

The recorderId parameter sent to these functions has only been added in build 145.

Starting with build 118 the onMicAccesss() JS callback has been added:

	function onMicAccess(allowed,recorderId){
			//alert("onMicAccess("+allowed+","+recorderId+")");
			//the user clicked Allow or Deny in the Privacy panel dialog box in Flash Player
			//when the user clicks Deny this function is called with allowed=false
			//when the user clicks Allow this function is called with allowed=true
			//this function can be called anytime during the life of the FLVAR instance as the user has permanent access to the Privacy panel dialog box in Flash Player
		if (allowed){
			document.getElementById("recordbtn").disabled = false
		}else{
			document.getElementById("recordbtn").disabled = true
		}
	}

 

Starting with build 145 we've added the onFlashReady() JS callback and the recorderId flash var is now sent to all JS functions as a parameter and to avc_settings.xxx as a GET variable.

	function onFlashReady(recorderId){
		//alert("onFlashReady()");
		//as soon as this function is called you can communicate with FLVAR using the JS Control API
		//Example : document.FLVAR.record(); will make a call to flash in order to start recording
		//recorderId: the recorderId sent via flash vars, to be used when there are many recorders on the same web page
	}


Starting with build 152 we've added 2 new JS callback functions to audiorecorder-api.html:

	function recordingPlaybackStopped(recorderId){
 		//the recording has stopped playing
//alert('recordingPlaybackStopped('+recorderId+')')
}

function onNewSecond(second,recorderId){
//a full new second has been recorded, you can sue this to dispaly a HTML timer on the HTML page containing FLVAR //alert('onNewSecond('+second+','+recorderId+')')
document.getElementById("secondDisplay").innerHTML = second;
}

 

Back to top

JS Write API (Control FLVAR trough JS)

As of build 145 (February 2012) you can control FLVAR trough the following JS functions:

For an example of the impelmentation check out the audiorecorder-api.html file.

Back to top

Server side PHP/ASP/JSP API

Every time the [Save] button is pressed inside the Flv Audio Recorder the save_audio_to_db.php is executed on the web server. Some variables are sent to it via POST:

You can extend the save_audio_to_db.php script to:

The user id that is passed to this JS function needs to be passed to audiorecorder.swf using flash vars (look for this line userId: "123", in audiorecorder-api.html) or using the $config['userId'] variable in avc_settings.php. The value in avc_settings.php has higher priority.

The recorder id that is passed to this JS function needs to be passed to audiorecorder.swf using flash vars (look for these lines recorderId: "456", in audiorecorder-api.html) The recorder id allows you to have 2 or more audio recorders on the html page and track from which one of them the calls come.

To call avc_settings.asp or avc_settings.jsp instead of avc_settings.php read How to switch to JSP or ASP from PHP.

Back to top

Changing the background color

  1. edit audiorecorder-api.html with a text editor
  2. find params.bgcolor = "#ffffff"; and change ffffff to the hex value of the color you want
  3. refresh audiorecorder-api.html in the browser and check the changes

You will find a list of many colors and their hex color codes (used above) on http://www.computerhope.com/htmcolor.htm .

Back to top

How to change where the media server saves the audio .flv files:

Wowza:

  1. edit conf\audiorecorder\Application.xml
  2. change the value of the <StorageDir> tag:
    <StorageDir>${com.wowza.wms.AppHome}/content</StorageDir> (this is the default)
  3. save and restart Wowza

For example you could change the path to a folder inside your public Apache web server folder like this :

<StorageDir>/usr/sites/site.com/public_html/recorded_files/</StorageDir>

FMIS:

  1. copy Application.xml
    from
    Flash Media Server\conf\_defaultRoot_\_defaultVHost_\

    to
    Flash Media Server\applications\audiorecorder
    \
  2. edit audiorecorder\Application.xml and change the value of the <StorageDir> tag:
    <StorageDir></StorageDir> (by default it's empty)
  3. save and
    1. restart FMIS or
    2. reload the audiorecorder app using the FMS Management Console .

For example you could change the path to a folder inside your public Apache web server folder like this :

<StorageDir>/usr/sites/site.com/public_html/recorded_files/</StorageDir>

Red5:

There's no easy way right now!

Connecting multiple installations of FLVAR on different web sites to the same media server.

Let's say you've bought 2 copies of FLVAR one for a.com one for b.com. You will have 1 license key, if you don't, email us at support@nusofthq.com so we can generate you 1 license key for both domains.

Good, now while using this licensekey, to connect both installations of the FLVAR client, one on a.com and one on b.com to the same audiorecorder app on the same media server just change the last part (the application instance name) of the connectionstring variable value in avc_settings.xxx like this:

Each installation of the FLVAR client will now create it's recordings (.flv files) in different folders depending on the media server:

Red5, FMIS:

Wowza:

CSRF for Ruby on Rails

Starting with FLVAR Build 180 we've implemented the variable authenticity_token that can be sent only via flash vars. It is used only for Ruby on Rails implementations where it is needed to validate POST requests for the CSRF mechanism. This variable is sent back to the save_video_to_db file.

Back to top

Contact Us

Contact us


This audio recorder is developed by NuSoft, a small company from Romania. Here is how to contact us:

By email: contact@flvar.com

You can also follow us on twitter or read our blog.





FLVAR Demo

Demo


Launch Button


Some quotes from our gr8 customers:

Your audio program rocks! It's working well right now on Networked Recruiter.

Travis from networkedrecruiter.com


Absolutely top product! Shame Flash doesn't have this kind of functionality without a media server - we develop solutions for the radio industry and this is right up our street!

James from ignisio.co.uk




Tweetstwitter.com/nusofthq




Accepted Payments