Thank you for using AVChat, as you will see below, AVChat is THE group video chat app to use!
We hope you will be able to find the answer to your problem here. All of the documentation for AVChat is on this page so hopefully a “Find…” operation in your web browser can take you to your answer quickly. You may also want to print out this page to PDF for offline access.
If you cannot find the answer you’re looking for here, we encourage you to try our FAQ or forums.
Specific documentation for the integration kits between AVChat and 3rd party CMS systems is also available:
- Joomla! 1.0, 1.5, 1.6 and 1.7 (JomSocial and CommunityBuilder)
- SocialEngine 4
- Drupal 5, 6 and 7
- phpFox 1.6, 2 and 3
- vBulletin 3.8 and 4
- WordPress 2.8 and 3
- vldPersonals
- osDate 2.x
- eMeeting 9
- IP. Board 3
1. Overview
- 1.1 AVChat has 2 groups of files
- 1.2 Configuration files
- 1.3 File Structure
- 1.4 How it works
2. Installation
- 2.1 AVChat Standalone installation instructions
- 2.2 Using the same media servr for 2 AVChat instalations
- 2.3 Switching between the PHP and ASPX configuration files in AVChat
- 2.4 How to change the license key
- 2.5 How to reset the license key (in case something goes wrong)
- 2.6 Hmm, I wonder what AVChat build I have installed?
- 2.7 What we need if you want us to perform the installation
- 2.8 What we need if you want us to perform the Media Server (Red5/FMIS/Wowza) installation.
3. Looks & design
- 3.1 Changing the background color of AVChat
- 3.2 Changing the background image of AVChat
- 3.3 Changing the sounds used in AVChat
- 3.4 Changing the size of the AVChat flash video chat software
- 3.5 Changing the looks of the windows inside the video chat (making the corners sharp)
- 3.6 Changing the fonts used inside the video chat
- 3.7 Changing the male female couple icons
4. Audio video quality
- 4.1 Audio/video quality profile files explained
- 4.2 Editing existing quality profile files
- 4.3 Making your own quality profile file
5. Security
- 5.1 How to turn on token based authentication in AVChat
- 5.2 Protection against video streams being rebroadcasted (watermarking)
- 5.3 Rtmps and rtmpe for encrypted communications
- 5.4 Enabling SWF Verification on FMIS
- 5.5 Limiting ip's from which admins can connect and execute admin functions
- 5.6 Allowing connections from AVChat files installed on localhost
- 5.7 Manually removing the banned ips file
6. Functionality
- 6.1 Blog Post: Bandwidth usage explained
- 6.2 Blog Post: Delay/Latency display for live video streams
- 6.3 Blog Post: How to hide the who-is-typing box
- 6.4 Blog Post: Changing emote icons in AVChat
- 6.5 Blog Post: How to close the pop up containing AVChat when clicking the [Leave] button
- 6.6 Blog Post: Recording the video streams
- 6.7 Blog Post: Dynamic bandwidth usage reduction explained
- 6.8 Blog Post: Ghost users and detection mechanism explained
- 6.9 Blog Post: External users list
- 6.10 Where are the text chat transcrips?
- 6.11 How to delete empty rooms automatically
7. Localization
8. Integration
- 8.1 Passing the user name and gender from your web site to AVChat (auto login)
- 8.2 Automatically dropping users in a certain room with AVChat
- 8.3 General integration guide
- 8.4 Placing ads around the video chat
9. Troubleshooting
- 9.1 Blog Post: Troubleshooting connection issues
- 9.2 Blog Post: Troubleshooting video quality issues
- 9.3 Blog post: Ensuring high connection success rate
1 Overview :
1.1 AVChat has 2 groups of files:
- client side files, that go on your web server (html, js, xml, swf files, etc.) and are loaded by your web site users in their browsers
- media server files that go on your media server (Red5,FMIS,Wowza) these handle all the logic of sending messages between users, banning ips, accepting connections, etc...
1.3 File StructureAVChat has 2 main configuration files:
- avc_settings.xxx which you will find in your AVChat installation folder on your web server (its's part of the client side files)
- media server configuration file which depending on the media server it's called:
- settings.asc on FMIS, you will find it in FMIS/applications/avchat30
- avchat3.properties on Red5, you will find it in Red5/webapps/avchat30
- avchat3.properties on Wowza , you will find it in Wowza/conf/avchat30
There are other less important config files (like the video quality .xml file or the logback_avchat30.xml file on Red5 that specifies where the log files should be created) but we will cover them as needed below!
AVChat ships in an archive that looks like this:
Files to upload to your website
audio_video_quality_profiles (folder containing audio video quality files in .xml format)
emoticons (folder containing sets of emote icons)
sounds (folder containing sounds used in the video chat in mp3 format)
translations (folder containing UI translations in .xml)
uploadedFiles (folder where files uploaded by users will go)- admin.html (html file that embeds admin.swf)
- admin.swf (admin interface)
- avc_settings.aspx.cs
- avc_settings.asp
- avc_settings.php
- badnicks.xml (xml file containing the bad usernames that are now allowed in the chat)
- badwords.xml (xml file containing the bad words that are banned in the chat)
- fonts.xml (list of fonts that can be used in the chat, not working)
- fullStar.png (default logo image that is shown over all video stream to prevent them from being rebroadcasted)
- index.html (html file that embeds index.swf)
- index.swf (user interface)
- pattern_061.gif (default background image)
- style.css (css file that controls the colors and fonts used throughout the video chat)
- token_request.aspx
- token_request.aspx.cs
- token_request.php
- token_verify.aspx
- token_verify.aspx.cs
- token_verify.php
- upload.aspx
- upload.aspx.cs
- upload.php
- writeuserslist.aspx
- writeuserslist.aspx.cs
- writeuserslist.php
Files to upload to your media server (FMS)
Files to upload to your media server (Red5 0.8)
Files to upload to your media server (Wowza)
Pretty simple actually:
- User goes to your web site and visits the page with the video chat (flash swf file) embedded on it
- The swf is downloaded to the users browser, it initializes and it loads avc_settings.xxx from your web server together with other config files: the language file, the emoticons files and some other config files
- Once everything is loaded the user is asked for a user name and gender (if it's not integrated)
- Once the user provides that info the swf attempts to connect to the media server
- Once connected to the media server the user can join rooms, send text message, view other user's streams and start their own audio video stream
- All data (audio, video, text) is sent from the user to the media server and from there it's routed as needed to all other users
2. Installation
2.1 AVChat Standalone Installation instructions
Before you can install AVChat on your web site you need to download the AVChat archive from the client/trial area on avchathq.com to your computer and extract its contents. There are 2 sets of files in that archive, one set goes on your media server (Part 2.1.1 below), and one set goes on your web server (Part 2.1.2 below).
2.1.1 Setting up the avchat30 application on the media server
| Red5
installed on a dedicated or VPS server |
Wowza installed on a dedicated or VPS server |
Upload the avchat30 folder from the Files to upload to your media server (Red5 0.8) folder to the webapps folder of your Red5 0.8 installation (C:\Program Files\Red5\webapps on Win, /opt/red5/webapps/ on Linux) Chmod the new avchat30 folder to 777. Restart the Red5 server You're done, move to Part 2 below |
Upload the applications, lib and conf folders from the Files to upload to your media server (Wowza) folder to the root folder of your Wowza Media Server installation: C:\Program Files\Wowza Media Systems\Wowza Media Server Pro 1.7.2\ on my computer. Restart the Wowza server You're done, move to Part 2 below |
| FMIS installed on a dedicated or VPS server |
FMIS hosting from http://influxis.com |
Upload the avchat30 folder (you will find it in your AVChat archive in the Files to upload to your media server (FMS) folder) to the applications folder of your FMIS installation (C:\Program Files\Macromedia\Flash Media Server\applications on Windows, /opt/macromedia/fms/applications/ on Linux) Chmod the new avchat30 folder to 777 You're done, move to Part 2 below |
While logged in your Influxis.com account: 1) Go to File Manager: Done. Your connection string used in Part 2 will look like: rtmp://123.rtmphost.com/avchat30/_definst_ where 123.rtmphost.com is shown at the top of your Influxis.com account. |
2.1.2 Installing AVChat Standalone in a folder on your web site
If your web site is hosted somewhere where there's Php support (most common):
- Using FTP, create a new folder in your web site and upload the contents of Files to upload to your web site (from the AVChat archive received) to it.
- Edit avc_settings.php with a text editor, and set the value of $avconfig['connectionstring'] like this:
$avconfig['connectionstring']='rtmp://myFMSserver.com/avchat30/_definst_';
where myFMSserver.com is the domain name or ip of the server where your media server is installed.- CHMOD the uploadedFiles folder to 777 (otherwise the upload function might not work)
- Create a folder tokens inside your new chat folder and chmod it to 777, (this will save us some trouble in case AVChat does not have the permissions to create it).
- Go to http://yoursite.com/your_new_video_chat_folder/, log in using a user name and enter your license key in the dialog box that shows up after you connect.
- To access the admin interface go to http://yoursite.com/your_new_video_chat_folder/admin.html. You might want to rename the admin.html and admin.swf files for security reasons!
If your web site does not support Php but it does support .NET/.aspx:
- Using FTP, create a new folder in your web site and upload the contents of Files to upload to your web site (from the AVChat archive received) to it.
- Edit avc_settings.aspx.cs with a text editor, and change this line:
configurationData.Add("connectionstring", "");
to
configurationData.Add("connectionstring", "rtmp://myFMSserver.com/avchat30/_definst_");
where myFMSserver.com is the domain name or ip of the server where your media server is installed.- Now, by default AVChat uses the php files (avc_settings.php, token_request.php, etc.), so we need to tell it to use the .aspx files. To do that we will use the sscode flash var. Open up index.html and admin.html in a text editor and:
- Find the following line:
<param name="movie" value="index.swf" />
and replace with:
<param name="movie" value="index.swf?sscode=aspx" />- Find the following portion of code:
<embed src="index.swf"
and replace with:
<embed src="index.swf?sscode=aspx"The sscode flash var pretty much tells the swf files what extensions to use. It defaults to php. You can use any extension you want (like jsp or asp) as long as the respective files are in the video chat folder.
- Go to http://yoursite.com/your_new_video_chat_folder/, log in using a user name and enter your license key in the dialog box that shows up after you connect.
- To access the admin interface go to http://yoursite.com/your_new_video_chat_folder/admin.html. You might want to rename the admin.html and admin.swf files for security reasons!
The first time you will enter the video chat you will be asked for the license key:
2.2 Using the same media server for 2 installations of AVChat
You might have 2 installations of AVChat, either on the same domain or on different domains that you want to connect to the same media server or to the same media server hosting account (for example from http://influxis.com). This article will show you how to do it!
Introduction
AVChat is made of 2 parts:
- the client side files that go on your web server (html, xml, swf files, etc.)
- the media server application (by default avchat30) that goes on your media server (Red5, FMIS, Wowza)
The connection string inside the avc_settings.xxx is made out of 4 parts and when combined it looks like this: rtmp://my-media-server.com/avchat30/_definst_ .
- rtmp is the protocol used to communicate between the AVChat client and the media server.
- my-media-server.com is the address where you host your Media Server (FMIS, RED5, Wowza), it can also be an ip.
- avchat30 this is the (default) name of the application on the media server to which your users will connect.
- _definst_ is the instance of the avchat30 app to which we connect (FMIS for example supports multiple instances).
To connect 2 installations of the AVChat client to the same media server, you will basically have to:
On Red5 and Wowza it's slightly more complicated so make sure you read the long versions below.
- duplicate the avchat30 app on the media server
- connect the second installation of AVChat to the new avchat30 app by changing the connection string.
Long version: Flash Media Interactive Server(FMIS)
On FMIS the process is pretty straight forward.
All the app files for AVChat are placed inside the FMIS/applications/avchat30 folder. To create a new avchat30 app:
- duplicate the avchat30 folder and
- rename the new one to avchat30_siteX (or to any other name that fits you).
You should now have 2 folders in your FMIS/applications folder:
- applications/avchat30
- applications/avchat30_siteX
That's all!
To connect AVChat to the new FMIS app use:
rtmp://my-media-server.com/avchat30_siteX/_definst_ in avc_settings.xxx .
Long version: Red5
All the app files for AVChat are placed inside the Red5/webapps/avchat30 folder. To create a new avchat30 app:
- duplicate the avchat30 folder and
- rename the new one to avchat30_siteX (or to any other name that fits you).
- edit avchat30_siteX/WEB_INF/red5-web.properties and change: webapp.contextPath=/avchat30
to
webapp.contextPath=/avchat30_siteX- edit avchat30_siteX/WEB_INF/web.xml and change
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>/avchat30</param-value>
</context-param>to
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>/avchat30_siteX</param-value>
</context-param>- rename this file:
webapps/avchat30_siteX/WEB-INF/classes/logback_avchat30.xml
to
webapps/avchat30_siteX/WEB-INF/classes/logback_avchat30_siteX.xml- edit
webapps/avchat30_siteX/WEB-INFclasses/logback_avchat30_siteX.xml
and change:
- <jmxConfigurator contextName="avchat30" />
to
<jmxConfigurator contextName="avchat30_siteX" />- <fileNamePattern>log/avchat30.%d{yyyy-MM-dd}.log</fileNamePattern>
to
<fileNamePattern>log/avchat30_siteX.%d{yyyy-MM-dd}.log</fileNamePattern>
Steps 5 and 6 will ensure we will get separate logs for each app.
That's all!
To connect AVChat to the new Red5 app use:
rtmp://my-media-server.com/avchat30_siteX/_definst_ in avc_settings.xxx .
Long version: Wowza
This one is very simple!
Just duplicate the Wowza/applications/avchat30 folder and rename it to avchat30_siteX. Do the same thing with the Wowza/conf/avchat30 folder: duplicate it and rename it to avchat30_siteX.
That's all!
To connect AVChat to the initial app/folder use:
rtmp://my-media-server.com/avchat30/_definst_ in avc_settings.xxx .To connect AVChat to the second app/folder use:
rtmp://my-media-server.com/avchat30_siteX/_definst_ in avc_settings.xxx .
2.3 Switching between the PHP and ASPX configuration files in AVChat
You have the possibility to switch the type of the configuration files used by AVChat to communicate with the web server (load the settings, request tokens, etc...). By default the configuration files used are the php ones because Php is the most common;ly used server side scripting language.
Switching to other types of config files (like the .aspx ones also provided with AVChat) can be done via the sscode flash var explained below.
So, to force AVChat to use the .aspx ones, open up index.html in a text editor (Notepad) and:
- Find the following line:
<param name="movie" value="index.swf" />
and replace with:
<param name="movie" value="index.swf?sscode=aspx" />- Find the following portion of code:
<embed src="index.swf"
and replace with:
<embed src="index.swf?sscode=aspx"Now repeat the 2 steps above for admin.html
The sscode flash var if not specified defaults to php.
Instead of aspx you can also use cf or other file extensions as long as the appropriate config files exist.
2.4 How to change the license key
Why would I change the license key?
- Insert a new trial key.
- Switch from trial to non-trial key.
- Switch the domain on which the software will be used.
- Upgrade from Lite (20 users) to Basic (40 users) for example.
What do I have to do?
- Log in the video chat using the admin interface (admin.swf)
- Click the [Settings] button at the top
- In the window that shows up, delete the old key from the text field and insert the new key
- Press the [Change Key] button
- If successful, you should now see the new limits/expiration date/domain above the license key text field!
2.5 Resetting the license key:
Why would I need to reset it?
If something goes awfully wrong and you find yourself locked out of the video chat (you’ve inserted a key for a domain to which you do not have yet access or has not yet been registered ) you can reset the license key.
What do I have to do?
- Delete this file
- on Red5: red5/webapps/avchat30/persistence/SharedObject/_definst_/licensekey.red5
- on FMIS: fms/applications/avchat30/sharedobjects/_definst_/licensekey.fso
- on Wowza: wowza/applications/avchat30/sharedobjects/_definst_/licensekey.rso
- Restart Red5, FMIS or Wowza
- Enter the video chat and you will be asked for the key again!
2.6 What AVChat build do I have installed?
To see what AVChat build you have installed you need to right click on the video chat software. The first item in the menu that shows up is the build number:
Why is the build number important?
The build number allows you to check if you have the latest version of our software. If your build number is 284 and on the blog we announce a new release with the build number 340, then it means you should consider upgrading your installation!
Each increment in the build number might represent any of the following things:
- code cleaning
- bug fix
- new feature
- new file
- new entry in the translation file
- new setting in the config files
- etc…
but you should check the release notes for the exact new features and bug fixes in each build.
Build numbers on our demo of AVChat
Our online demo of AVChat is frequently updated, so even tough the latest build available for download might be 284, the demo might be 310 for example. We update the demo more frequently to test new features and UI changes before we release these changes to the customers.
2.7 What we need if you want us to install AVChat for you
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 AVChat will be installed
- If you've purchased an integration kit we will need admin acess to the admin area of your CMS (Joomla!, Drupal, etc.).
- 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.
AVChat installations generally take 6-24 hours if all the data above is sent correct and complete.
2.8 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.
3. Looks & design
3.1 Changing AVChat's background color
The background color of AVChat is defined in the HMTL web page that embeds the AVChat swf file. By default AVChat ships with 2 HTML pages: index.html (for the user interface, embeds index.swf) and admin.html (for the admin/moderator interface, embeds admin.swf).
In order to change the color of the user interface you will need to open index.html in a text editor and change the value of the bgcolor property in 2 places. Here :
<param name="bgcolor" value="#1e4671" />and here:
bgcolor="#1e4671"Example for black background
Here is an example that will result in a black background:
<param name="bgcolor" value="#000000" />and
bgcolor="#000000"#000000 is the hexadecimal value for black.
Done
Now, do not forget to save and upload the modified index.html to your web site.
The same procedure applies to admin.html.
3.2 Changing AVChat's background image
AVChat can display an image as it's background. This image can be specified in the avc_settings.xxx file. by default it's using the pattern_061.gif image shipped with AVChat:
How to do it
Edit avc_settings.xxx and change the value of the backgroundImageUrl variable with the relative path to the new background image.
You can also change the transparency of this background image by changing the value of the backgroundImageAlpha variable. The background color will be seen trough a partially transparent background image!
The image will automatically tile to fit the size of the video chat software.
Done
3.3 Changing the sounds used in AVChat
You can change the sounds used throughout AVChat with your own sounds!
AVChat right now uses four mp3 sounds which you can find in the sounds folder:
- alert.mp3 (used when a text chat message kicks in)
- buzz.mp3 (used when someone gives you a buzz)
- online.mp3 (used when someone joins a room)
- offline.mp3 (used when someone leaves a room)
How to change them: Just replace the existing mp3's with your own mp3's. Try to keep their size as small as possible because these sounds are loaded at runtime.
To disable the sounds just delete the mp3's (in the future we will have an option in avc_settings.xxx for this).
3.4 Changing the size of the AVChat flash video chat software
You can change the size of the AVChat user/admin Interface to better fit with the design and size of your website.
The size of the AVChat user and admin interfaces is defined in the HMTL pages that embed these swf files. By default AVChat ships with 2 HTML pages: index.html (that embeds the user interface: index.swf) and admin.html ( that embeds the admin interface: admin.swf).
In order to change the size of the AVChat user interface for example, you will need to edit index.html with a text editor and change the code below:
width="970" height="580"The above code can be found in 2 places in the HTML file so make sure you change in both.
The above values are absolute values in pixels. You can also use relative values like in the example below:
width="100%" height="100%"Now, do not forget to save and upload the modified index.html to your web site, and refresh.
The same procedure applies to admin.html .
3.5 Changing the looks of the windows inside the video chat
The style.css file controls (among other things) the looks of the windows inside the video chat. By editing the style.css file you can change:
- the color of the windows (backgroundcolor:#123456;)
- if the windows have rounded corners or not (cornerradius:4 , set to 0 for straight corners)
- the space between the windows (margin:4)
- the space between the margin of the windows and its content (padding:4)
3.6 Changing the fonts used inside the video chat
The style.css file controls (among other things) the fonts used throughout the video chat. By editing the style.css file you can change for every group of fonts (like titles, side menu links, etc...):
- the font face (fontfamily:_sans)
- the size of the font (fontsize:16)
- the font weight (fontweight:bold)
- the color of the text (color:#ffffff)
3.7 Changing the male female couple icons
The default male, female & couple icons used in AVChat are mebedded in the swf files (index.swf and admin.swf) but you can change them.
In avc_settings.php there are 3 variables you can use to specify other images to use instad of the default ones: coupleImageUrl, maleImageUrl and femaleImageUrl (they're towards the bottom). You can specify any jpg, gif or png image.
4 Audio Video Quality
AVChat (trough Flash Player) captures raw audio and video data from your web cam and microphone, encodes/compresses it, and sends it to the media server from where it is sent to the other users.
For encoding the video data AVChat uses Sorenson Spark H.263. For encoding audio data AVChat uses by default the newer Speex codec (it also supports the older NellyMoser audio codec).
AVChat put no limits on the audio video quality experienced by your users and in that spirit it opens up all the available audio and video settings to you, the web site owner (our client), to play with. You can change the video resolution, picture quality, frame rate and sound quality.
Read below to learn how to play with all those settings and more!
4.1 Audio/video quality profile files explained
In the installation folder of AVChat you will find a folder named audio_video_quality_profiles. It contains several .xml files. We call these .xml files audio video quality profiles.
Each .xml file contains the settings (resolution, frames per second, picture and sound quality, etc.) used to encode the video/audio data that's coming from your computer's webcam and microphone. AVChat ships with several such profile files that you can use out of the box each configured to give you the best possible audio and video quality at a certain data rate from 96 to 768kbits/s.
The default audio/video profile used by AVChat is 512k_high_motion_medium_picture_quality_high_sound_quality.xml. This profile will consume (for one stream) maximum 469kbits/s for video and 42 Kbits/s for audio, total: 511kbits/s.
To make AVChat use another audio/video quality profile file for when users start broadcasting their web cam and microphone you need to change the value of the miccamsettingsurl variable inside avc_settings.php (or avc_settings.aspx.cs) to point to the .xml file of your choice.
You can also make your own quality profiles or edit the existing ones.
4.2 Editing existing quality profile files :
Each of the quality profile files has the exact same XML structure:
<item>
<nm>128 ISDN</nm>
<df>0</df>
<bytes>16000</bytes>
<q>0</q>
<fps>7</fps>
<kfps>28</kfps>
<w>200</w>
<h>150</h>
<snd>speex6</snd>
<sndSilencelevel>0</sndSilencelevel>
</item>Each node/value pair explained:
- Video settings
- <bytes> This is the maximum amount of bytes that the video (not audio) can consume per second. If it is set to 0, the video stream from the user to the media server will consume as much bandwidth as possible to maintain the picture quality. Multiply by 8 to get the value in bits.
- <q> This is the picture quality. If set to 0 it will use as much quality as possible, without exceeding the <bytes> value. Maximum is 100 but that will consume EXCESSIVE bandwidth. A value between 85-95 will produce really good picture quality!
- <fps> This defines the video frame rate. 10, 15, 30 fps, etc... . Some old web cams can only capture up to 15fps.
- <kfps> Key frames. This tells AVChat that every <kfps> frames a full frame will be sent to the media server . The rest of the frames contain just the changes from the previous frame. By default you should set this to <fps>*4
- <w> The desired width of the captured video in pixels
- <h> The desired height of the captured video in pixels
- Audio settings:
- <snd> The sound rate. The higher the better but it also consume more bandwidth.
- <sndSilencelevel> Takes values from 0 to 100. Flash Player will consider any sound that is lower than the value of this tag as "silence" and thus will not send any data to the media server. Use 100 if you want to never send audio to the FMS server. Use 0 if you always want to send to the FMS server whatever the mic captures (even noise). We recommend using 0 since if you use the default (10) Flash Player will stop broadcasting sound when you stop speaking. Even though this seems like a cool feature that cuts bandwidth in reality the listeners will frequently get the feeling that you've been cut off.
- Misc settings:
- <nm> This is the name of the connection type. The value of this tag is not used in AVChat.
- <df> If set to 1, this will be the connection type that will be used by default. The value of this tag is not used in AVChat.
To edit a quality profile file open it in Notepad or any other text editor, change the value that you want to change, save it back to the web server. Now reload AVChat in the browser and start your webcam, you should see the changes in effect.
4.3 Making your own quality profile file
To make your own audio video quality profile, duplicate one of the existing xml files, give it a unique name and edit it with a text editor. To use it, upload it to your web server and set the value of the miccamsettingsurl variable in the avc_settings.php/aspx.cs configuration file to it.
You can also use one quality profile file with higher quality video for "gold" users and one with lower quality video for "free" users.
There is an interesting article on the Macromedia web site regarding best practices for encoding live flash video. Click here to open it.
5. Security
5.1 How to turn on token based authentication in AVChat
Starting with build 900, AVChat 3 introduces a new security feature called “token based authentication”.
When enabled this prevents 3'rd party swf files (hosted on other web sites than your own or by malicious users) to connect to your media server. There are other security measures in place to prevent this however token based authentication is the most secure!
This feature is turned off by default because with it enabled:
- it takes slightly more time for users to connect to the media server,
- it might cause some connection attempts to the media server over slow Internet connections to fail
- we only had a few clients that really needed this feature!
- we can't really quite make it work automatically out of the box, it needs to be configured manually!
How o turn it on:
Once you have AVChat installed turning this feature on is simple:
- Edit the settings file on the media server:
- on Red5 its Red5/webapps/avchat30/avchat3.properties
- on Wowza its Wowza/conf/avchat30/avchat3.properties
- on FMIS its FMIS/applications/avchat30/settings.asc
- Set the value of the tokenUrlLocation variable to the absolute url/path to token_verify.php (token_verify.php is in the folder where you installed AVChat on your website). Good example: http://avchat.net/demos/av30/token_verify.php . If you use aspx on your web server put the path to token_verify.aspx instead.
- Restart the media server.
5.2 Protection against video streams being rebroadcasted (watermarking)
Some of our clients had issues with nasty users staying in their video chat and re-broadcasting streams from their video chat to other sites using screen sharing software.
So to protect against that we ended up putting the logo of our client (a watermark) over all the video streams.
By default AVChat uses a little star (fullStar.png). You can view it in our AVChat demo and on your (default) installation.
To change the star with your own logo edit avc_settings.xxx and change the value of the watermarkForOtherPeoplesStreams variable.
The watermark will be added to the top left of all the video streams.
5.3 Rtmps and rtmpe for encrypted communications
AVChat supports both rtmps and rtmpe for encrypted data transfer between the users and the media server but depending on your media server you can use one or both:
- Red5 supports only rtmps.
- FMIS and Wowza support both rtmps and rtmpe.
To enable rtmps or rtmpe check with your media server documentation. We can also enable it for you trough the AVChat Securitization service.
5.4 Enabling SWF Verification on FMIS
FMIS has this very cool security feature called SWF Verification where you can tell it to only accept connections from known swf files. How does he know the swf files? Well... you upload them to the FMIS server. Simple and brilliant!
This feature can protect you from custom made swf files attempting to connect to your media server. Together with token based authentication it would make the most secure setup someone can wish for.
To to turn it on you need to do two things:
- First, change the <SWFVerification enabled="false"> to "true" in your applications/avchat30/Application.xml file to turn on the feature.
- Create a new folder: applications/avchat30/SWFs and put the index.swf and admin.swf with which AVChat ships in there
- Having changed the server configuration, you are going to need to restart your FMS 3.5 server.
If you're passionate about this stuff there's a more detailed article explaining SWF Verification in more depth on the adobe.com web site: http://www.adobe.com/devnet/flashmediaserver/articles/beginner_security_fms3.html
Unfortunately SWF Verification is only available with FMS3 or later. Red5/Wowza do not have this feature.
5.5 Limiting ip's from which admins can connect and execute admin functions
Because we give free trials to just about anyone, our script gets into a lot of hands, some of them are not well intended.
One of the easiest ways to protect your AVChat from nasty surprises is to limit the ip's from which admins can connect trough the admin interface (admin.swf) and execute admin functions.
You just have to edit the settings file on the media server:
- on Red5 its Red5/webapps/avchat30/avchat3.properties
- on Wowza its Wowza/conf/avchat30/avchat3.properties
- on FMIS its FMIS/applications/avchat30/settings.asc
And search for the adminsAllowedFromTheseIps variable. Set its value to your ip or to the range of ip's from which admins will be allowed to connect.
Starting with build 1144 the verification is done every time a admin executes an admin function (kick, ban, change license key, etc.) not just on connection.
There are more comments in the above mentioned settings files that will explain exactly how to add individual ips and ip ranges. After editing those files don't forget to restart the media server.
5.6 Allowing connections from AVChat files installed on localhost
Because of security reasons you can not connect to the avchat30 application on the media server with AVChat client side files (html/swf) hosted on localhost. When you try to do that you will gen an error on connection.
To allow connections from AVChat installed on localhost you need to edit the settings file on the media server:
- on Red5 its Red5/webapps/avchat30/avchat3.properties
- on Wowza its Wowza/conf/avchat30/avchat3.properties
- on FMIS its FMIS/applications/avchat30/settings.asc
And search for the allowLocalhostConnections variable. Set it to true and restart the media server.
5.7 Manually removing the banned ips file
If you've banned yourself out of the video chat you will need to manually delete the ips file and restart the media server.
on Red5 you will need to delete the bannedips.red5 file from this folder: webapps\avchat30\persistence\SharedObject\_definst_ and restart Red5.
6. Functionality
- 6.1 Blog Post: Bandwidth usage explained
- 6.2 Blog Post: Delay/Latency display for live video streams
- 6.3 Blog Post: How to hide the who-is-typing box
- 6.4 Blog Post: Changing emote icons in AVChat
- 6.5 Blog Post: How to close the pop up containing AVChat when clicking the [Leave] button
- 6.6 Blog Post: Recording the video streams
- 6.7 Blog Post: Dynamic bandwidth usage reduction explained
- 6.8 Blog Post: Ghost users and detection mechanism explained
- 6.9 Blog Post: External users list
6.10 Where ae the text chat transcripts?
AVChat saves a history of all the text chat in all the rooms including private chats on the media server!
On FMS they will be saved in the FMS/applications/avchat30/logs/ folder and they will have this format: _definst__r0_2010_12_20.txt, where _definst_ is the application instance name, r0 is the room id, and 2010_12_20 is the date . To disable it edit FMS/applications/avchat30/settings.asc and set application.loggingEnabled=false
On Red5 they will be saved in Red5/webapps/avchat30/avchat3_transcripts/ folder and they will have this format: _definst__r0_2010_12_19_log.txt . To disable it edit Red5/webapps/avchat30/avchat3.properties and set loggingEnabled=false
On Wowza they will be saved in Wowza\applications\avchat30\avchat3_transcripts folder and they will have this format: _definst__r0_2010_12_19_log.txt . To disable it edit Wowza/conf/avchat30/avchat3.properties and set loggingEnabled=false
6.11 How to delete empty rooms automatically
AVChat can be set up to remove empty rooms automatically as soon as the last person leaves the room.
By default this feature is turned off. To turn it on you need to edit the config file on the media server (avchat3.properties on Red5/Wowza and settings.asc on FMS) and set
deleteRoomsWhenTheyBecomeEmpty=true
You can also use the
doNotDeleteTheseRoomsWhenTheyBecomeEmpty
option to protect some rooms (like the main Lobby) from being removed ike this:
Red5 & Wowza:
doNotDeleteTheseRoomsWhenTheyBecomeEmpty=r1,r2FMS: application.doNotDeleteTheseRoomsWhenTheyBecomeEmpty=["r1","r2"]
More details about each of the above config options and the exact syntax are in the config files. The location of the config files is detailed here.
7. Localization
7.1 Changing the welcome message
Quick painless way to change the welcome message that shows up in the first room you enter in AVChat:
- edit this .xml file on your web server: AVChat installation folder/translations/en.xml
- Go to line 416, you will see the welcome message on that line
- Change it to whatever you want
- Upload the en.xml file back to your web server/site
- Reload AVChat in the browser (if the old message still shows up refresh a few times or clear your browser cache)
7.2 Translating AVChat
AVChat loads the words and phrases used in the admin and user interface from external .xml files. You will find these .xml files in the translations folder. AVChat by default ships only with the English translation: translations/en.xml .
en.xml is a plain text file that can be edited with any text editor.
In order to change a word, to translate the entire interface in another language or to change the initial welcome message you just need to edit these files and change whatever you need!
The languagefile variable in avc_settings.xxx controls which language file will be loaded. You can have several language files (en.xml, es.xml, fr.xml, etc.) and load one or another based on the user's location, ip or language settings in the browser (this is not a feature built in AVChat but it's something that's theoretically possible).
IMPORTANT: After editing the en.xml file and uploading it back to your web server, make sure you clear your cache so that the browser picks up the new version.
Where to find and share translations?
There's a special area in our AVChat forum dedicated to exchanging language files: http://avchathq.com/forum/index.php?/forum/9-language-files/?s=daa1ebdc00b4ecbe532d8139cd8fe800 . You need to sign up as a user to access the existing uploaded language files.
7.3 Switching to RTL
Switching to RTL is very simple. Just edit avc_settings.xxx and change the value of the rightToLeft variable to 1. This will cause all text fields, including the text chat area to become right aligned and part of the UI to be arranged from right to left.
8 Integrating
8.1 Passing the user name and gender from your web site to AVChat (auto login)
The login screen in AVChat 3 shows up to ask the user for its username and gender. However if you provide these info’s via avc_settings.php (or avc_settings.aspx.cs) and block the user from modifying them the login screen is not needed anymore so it will be skipped!
So this is what you need to do in order to auto login users:
- set $config['username'] to the username of the person logged in the website (you can collect this info from cookies, sessions or from the database).
- set $config['gender'] to male, female or couple ( the gender of the person logged in the website, you can collect this info from cookies, sessions or from the database).
- set $config['changegender']=0 which means the user will not be given the chance to change its gender
- set $config['changeuser']=0 which means the user will not be given the chance to change its username
If all the 4 steps above are completed, the login screen will be skipped and users will be logged in directly in the video chat without them being asked for a user name or gender (confrmation).
You can also use $config['disableGenderSelection'] to disable the gender selection altogether (everyone will get the male icon) and $config['coupleGenderEnabled'] to disable the couple gender.
8.2 Automatically dropping users in a certain room with AVChat
By default, when a user joins AVChat 3 he is presented with a list of existing rooms. He can choose one and join it! You can however skip that and drop users directly into the room of your choice.
What you need to do is edit avc_settings.xxx and change the value of the dropInRoom variable with the id of the room you want users to be dropped in.
Every room in AVChat 3 has a unique id. When you log in the AVChat trough the admin interface (admin.swf) the leftmost column in the rooms list shows the id of each room:
8.3 General integration guide
This is not a step by step guide because user management systems are different from a web site to another and from a CMS to another.
By integrating AVChat with your users database we understand that the users of your web site will have to login only once (trought he normal login process on your wb site) and have the same user name on the web site and in the video chat. Furthermore if your web site allows for several user levels (like guests, free members & premium members) you can impose restrictions one some user levels in order to incentivise them to purchase a paid plan.
How AVChat loads username/gender/enabled features information:
When a user visits your web site and reaches the HMTL page with AVChat embedded in it, the HTML file and the the AVChat Flash .swf file are downloaded to the users computer and displayed in their browser.
Then, avc_settings.xxx is executed on the web server and returns a string containing many variable/value pairs that are used by the .swf file. There's one variable for the username, one for the background image, etc. .
You can see an example of what is returned by executing our avc_settings.php file (from our online demo) in the browser: http://avchat.net/demos/avchat30/avc_settings.php.
All the variables accepted and used by the .swf file are listed and explained in the avc_settings.php files.
If we were to talk about it in a timely manner, the integration will take place when the avc_settings.xxx file executes on the web server.
Deep in the problem
Once a person is logged in on your web site, the user management system will remember (using a cookie, or a session variable) the persons id, username, real name, email, gender and other details. Once the user logs out, the user management system "forgets" him (the cookie saved in the users browser is deleted, session variables are also deleted from the web server).
You need to look trough the existing code and annalize how the existing management system remembers the person logged in. Either COOKIES or SESSIONS are used. If you have never learned about these before, this is a good time to do it! :)
Cookies are little bits of information that are stored by your browser and sent with every call to the web site. Session variables are little bits of information that are stored by the web server individually for each visitor of your website.
Username and gender are automatically recognized
When the avc_settings.xxx file is executed, it should check for existing cookies (sent by the users browser) or session variables (saved on the web server for that specific user), and should populate the username and gender variables with the corrct values for that user.
The variable for the username inside the php configuration file is $config['username']. The variable for the gender inside the php configuration file is $config[gender].
Different settings for different user groups
If your web site allows for different levels of membership you can impose restrictions on some of them.
AVChat obeys to whatever values the avc_settings.xxx file returns so you can configure it to return a special set of variables/values when a gues user is executing it (detection based on COOKIES or SESSIONS) and another set of variables/values when a paying user executes it.
Every variable in the avc_settings.xxx file can be configured according to the level of the user.
Here are a few ideas of what you can do:
- allow "gold" users to send higher quality video and audio by pointing the value of miccamsettingsurl to a .xml file with better quality settings
- limit the amount of time "free" users can see video streams by specifying a value for the freeVideoTime variable
- allow "gold" users to see more web cams at a time by modifying the value of maxcams when the logged in user is detected as "gold"
- drop "gold" users in selected rooms, while "free" users gather only in the lobby by modifying the value of dropInRoom according to the level of the user
- prevent "free" users from creating rooms or initializing private chat or making their video streams private
Further notes
- You might want to block the user from changing the username and gender detected by the avc_settings.xxx file in the login screen of the AVChat user interface: to do this set the value of changeuser and changegender to 0 in avc_settings.xxx.
- When both changeuser andchangegender are set to 0 in the asp/php config file, AVChat will skip the login screen of the user/admin interfaces and jump directly to the chat area.
- You can test the integration by logging in, loading the avc_settings.xxx file directly in the browser, and checking the variable/value pairs it returns. This way you can also check for any syntax errors that might have slipped in while editing the file.
- We also provide integration services for a certain fee: http://avchat.net/buy-now#services
- If you are in need of a good text editor we recommend Notepad2
- A good introduction on PHP (including Sessions and Cookie variables) can be found here:
http://www.w3schools.com/php/default.asp- A good introduction on ASP (including Sessions and Cookie variables) can be found here:
http://www.w3schools.com/aspnet/aspnet_pages.asp
8.4 Placing ads around the video chat
Placing ads around the video chat is simple. The video chat itself is actually a Flash .swf file embedded in a HTML file. In that HTML file you can place anything: links, images, AdWords ads, banners, etc. .
The default HTML file embedding the index.swf file (main video chat file) is:
index.html so to add ads around your video chat:
- Connect to your web site using FTP
- Edit index.html with a text editor
- Place your ad code in it
- Save and upload back to web server
A little bit of HTML knowledge might be required tough to properly place the ads above, below or to the sides of the video chat.
9 Troubleshooting
- 9.1 Blog Post: Troubleshooting connection issues
- 9.2 Blog Post: Troubleshooting video quality issues
- 9.3 Blog post: Ensuring high connection success rate










