Documentation
- Installation:
- Where are the recordings?
- Changing and resetting the license key
- On audio quality
- Switching to ASP (.NET)
- JS API
- PHP and ASP API
- How to change the background color
- Changing the folder where the recorded .flv files are created on FMIS, Wowza and Red5
- Connecting multiple FLVAR installations to the same media server
Installation
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:
- Copy the audiorecorder folder ( server side files (FMS)/audiorecorder ) to your FMIS Installation Folder/applications folder.
- Edit the settings.asc file with a text editor and insert in it the license key (it's in your client/trial area o avchathq.com).
If you have a Flash Media Interactive Server account from Influxis.com:
- log in to your account at influxis.com and create a new application (folder) named audiorecorder.
- 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.
- Edit the settings.asc file with a text editor and insert in it the license key (it's in your client/trial area o avchathq.com).
If you have Red5 installed on a dedicated or vps server:
- 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).
- Edit the audiorecorder.properties file with a text editor and insert in it the license key (it's in your client/trial area o avchathq.com).
- Restart the Red5 server.
- 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:
- 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.
- 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 avchathq.com).
- Restart the Wowza server.
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:
- 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)
-
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_
- Save the avc_settings.php file and upload it to the web server.
- 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:
- FTP access to the web site (or folder) where FLVAR will be installed
- 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@avchathq.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:
- 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.
- 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@avchathq.com.
Media Server installations generally take 6-24 hours if all the data above is sent correct and complete.
Where are the recorded .flv files?
When using FMIS:
- FMIS Installation folder/applications/audiorecorder/streams/_definst_
When using FMIS hosting accounts:
- audiorecorder/streams/_definst_
When using Red5:
- Red5 installation folder/webapps/audiorecorder/streams/_definst_
When using Wowza:
- Wowza installation folder/content
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.
Changing and resetting the license key
When using FMIS:
- 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 avchathq.com).
- Restart FMIS
OR
Reload the audiorecorder application using the FMS Management Consoles.
When using Red5:
- 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 avchathq.com).
- Restart Red5.
When using Wowza:
- 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 avchathq.com).
- Restart Wowza.
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 FP10, 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 NellyMoserAsao (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:
- 44: highest quality for NellyMoser uses 88kbits/s
- 22: uses 44kbits/s
- 11: uses 22kbits/s
- 8: uses 16kbits/s
Speex:
- 10 : highest quality, uses 42.2kbits/s of bandwidth
- 9 : 34.2kbits/s
- 8 : 27.8kbits/s
- 7 : 23.8kbits/s
- 6 : uses 20.6kbits/s of bandwidth
- 5 : 16.8kbits/s
- 4 : 12.8kbits/s
- 3 :low quality, lowest usable quality, uses 9.80kbits/s
- 2 : 7.75kbits/s
- 1 : 5.75kbits/s
- 0 : lowest quality, not really usable, uses 3.95kbits/s
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 80% of the sound quality depends on the mcirophoe used 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.
Switching to .asp
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:
- edit audiorecorder-api.html with a text editor
- find these lines of code:
var flashvars = {
userId: "123",
recorderId: "456"
}; - add
sscode: "asp",like this:
var flashvars = {
userId: "123",
sscode: "asp",
recorderId: "456"
};
- 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.
JS READ API
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:
- streamName the file name of the new audio recording on the media server including the .flv extension
- streamDuration duration of the recorded audio file in seconds but accurate to the millisecond (like this: 4.322)
- userId the userId sent via flash vars or avc_settings.xxx
- recorderId the recorderId sent via flash vars
The btSavePressed java script function is defined in the audiorecorder-api.html file and can be extended/edited by you to:
- show a message in the html page,
- activate a form or button in the html page,
- redirect the user to another page,
- etc... .
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:
- btPlayPressed() called when the [PLAY] button is released
- btPausePressed() called when the [PAUSE] button is released
- btStopPressed() called when the [STOP] button is released
- btRecordPressed() called when the [RECORD] button is released
These JS functions are defined in audiorecorder-api.html (starting with build 114) and you can extend them. No variables are sent to these functions.
Php and Asp 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:
- streamName the file name of the new audio recording on the media server including the .flv extension
- streamDuration duration of the recorded audio file in seconds but accurate to the millisecond (like this: 4.322)
- userId the userId sent via flash vars or avc_settings.php
- recorderId the recorderId sent via flash vars
You can extend the save_audio_to_db.php script to:
- insert the info about thenew recording in the database,
- set session variables for later use,
- etc... .
The user id that is passed to this JS function needs to be passed to audiorecorder.swf using flash vars (look for these lines audiorecorder.swf?userId=123 in audiorecorder-api.html) or using the $config['userId'] variable in avc_settings.php. The latter has higher p[riority!
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 recordrs 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!
Changing the background color
- edit audiorecorder-api.html with a text editor
- find <param name="bgcolor" value="#1e4671" /> and change 1e4671 to the hex value of the color you want
- find bgcolor="#1e4671" and change 1e4671to the hex value of the color you want
- 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 .
Internet Explorer uses an Active X control to show Flash Player content. Firefox, Safari, Opera and the rest of the browsers use a plugin. This is the reason why you need to make the change in 2 places. One for IE, the other one for the other browsers.
How to change where the media server saves the audio .flv files:
Wowza:
- edit conf\audiorecorder\Application.xml
- change the value of the <StorageDir> tag:
<StorageDir>${com.wowza.wms.AppHome}/content</StorageDir> (this is the default) - 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:
- copy Application.xml
from
Flash Media Server\conf\_defaultRoot_\_defaultVHost_\
to
Flash Media Server\applications\audiorecorder\ - edit audiorecorder\Application.xml and change the value of the <StorageDir> tag:
<StorageDir></StorageDir> (by default it's empty) - save and
- restart FMIS or
- 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@avchathq.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:
- for a.com leave the default:
rtmp://mymediaserver.com/audiorecorder/_definst_ - for b.com change the last part to something else, for example:
rtmp://mymediaserver.com/audiorecorder/siteb
Each installation of the FLVAR client will now create it's recordings (.flv files) in different folders depending on the media server:
Red5, FMIS:
- the .flv files for a.com will be in streams/_definst_
- the .flv files for b.com will be in streams/siteb
Wowza:
- the .flv files for both web sites will be in Wowza/content

Contact us
This audio recorder is developed by AVChat Software, a small company from Romania. Here is how to contact us:
By email: contact@avchathq.com
Using Skype: avchathq 
By phone: +40721969501
You can also follow us on twitter or read our blog.
Your audio program rocks! It's working well right now on Networked Recruiter.
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!
twitter.com/avchathq






Latest posts from our blog: