Archive for February, 2010

Ensuring high connection success rate

Tuesday, February 23rd, 2010

Why a connection attempt to a working media server might fail:

Red5, FMIS and Wowza by default only accept  rtmp connections over port 1935. This will work fine for most home Internet connections however when you’re behind a corporate firewall/network you might hit 2 major restrictions:

  1. NO traffic/connections to non standard ports like 1935 (default port for rtmp). Traffic is only allowed to standard ports like 80 (http) and 443 (https) . The solution for this is to configure the media server to accept  rtmp connections over ports 443 and 80 .
  2. NO non-http traffic allowed (or a proxy server is used). The solution for this is to configure the media server to accept  rtmpt connections. Rtmpt is rtmp wrapped as http and its slower. It also adds some overhead/consumes more bandwidth because each rtmp packet needs to be wrapped as http. According to a 2004 Adobe article, only 4% of Internet users are behind such a network.

The automatic connection sequence in Flash Player:

By default, when a Flash Player app (AVChat 3 for example) tries to connect to a media server (Red5, FMIS or Wowza), it automatically tries to establish a connection by using the following sequence of ports and protocols:

  1. rtmp://myserver:1935/avchat30/_definst_
  2. rtmp://myserver:443/avchat30/_definst_
  3. rtmp://myserver:80/avchat30/_definst_
  4. rtmpt://myserver:80/avchat30/_definst_

This connection sequence can enable connections to succeed that otherwise would not. This automatic retry sequence occurs only if the initial connection specifies the RTMP protocol and does not specify a port - for example rtmp://myserver/avchat30/_definst_ . During this connection sequence, users may wait several seconds for multiple connection attempts to time out.

However for the above connection sequence to actually produce more sucessfull connection attempts the media server must also be properly configured to listen for rtmp connections over ports 1935, 443 and 80 and for rtmpt connections over port 80.

Configuring your media server for best connection success rate:

[Before making the below changes make sure there is no other program listening on port 80 or 443 on your media server. These ports are surely already used by Apache. Use the netstat -ant command on linux to see which ports are already used.  FMIS, Red5 and Wowza use port 1935 by default for a reason!].

If you’re using FMIS:

  • solution for restriction 1: move it to a separate server and configure it listen for rtmp connections over ports 1935, 443 and 80. You need to edit conf/fms.ini, set ADAPTOR.HOSTPORT = :1935,443,80 and restart FMIS. Make sure you don’t have other apps (like the Apache web server) started and listening on 80 or 443.
  • solution for restriction 2:  same as above, FMIS can listen for both rtmp and rtmpt connections over the same ports at the same time

Most FMIS hosting services (like influxis.com) are already configured like this  out of the box.

If you’re using  Wowza:

  • solution for restriction 1: move it to a separate server and make it listen for rtmp connections over ports 1935, 443 and 80. You need to edit conf/VHost.xml , set <Port>1935,443,80</Port> and restart Wowza. Make sure you don’t have other apps (like the Apache web server) started and listening on 80 or 443.
  • solution for restriction 2: same as above, Wowza can listen for both rtmp and rtmpt connections over the same ports at the same time

If you’re using Red5:

  • solution for restriction 1: move it to a separate dedicated/vps server and bind rtmp connections to port 443 instead of 1935 (Red5 0.9 can not listen for rtmp connections over several simultaneous ports like Wowza and FMIS can). You need to edit conf/red5.properties, set rtmp.port=443 and restart Red5. Make sure you don’t have other apps (like the Apache web server) started and listening on 443 . You can also use port 80 but we will use that for listening for rtmpt connections as explained below.
  • solution for restriction 2: bind rtmpt connections to port 80. You need to edit conf/red5.properties, set rtmpt.port=80 and restart Red5. Make sure you don’t have other apps (like the Apache web server) started and listening on 80.

How can you check your connection

Here you will find 2 port testers which will attempt to establish rtmp and rtmpt connections (using all ports) to a properly configured media server. Red5 ships with a similar tool and you can download another one from here.

More info

There is a great article (from 2005 I think) on the Adobe website that goes more in depth about these issues. I recommend you read it if you want to understand a little bit more about how the Internet works and why these steps are necessary and why such configurations are not the default: http://www.adobe.com/devnet/flashcom/articles/firewalls_proxy.html .

New AVChat 3 Video Chat Plugin for WordPress

Tuesday, February 16th, 2010

wordpress-logo-hoz-rgb

Just like the title says, we now provide a native AVChat 3 Plugin for WordPress that handles the integration between the user management system in WordPress and AVChat 3.

Some of the Features:

  • automatic username recoginition (AVChat 3 will automatically recognize the usernames of users logged in the WordPress web site )
  • allows different permissions and settings for each user role directly from admin area
  • it installs as any other WordPress plugin
  • is compatible with SEO friendly URL’s in WordPress
  • administrators can configure basic AVChat 3 settings (like the rtmp connectionstring) directly from the admin area

The price for the AVChat 3 Video Chat Plugin for WordPress is $49 and it’s available when you buy AVChat 3.

To buy it go to the purchase page and select one of the  AVChat 3 licenses + the WordPress plugin.

Visit the AVChat 3 Video Chat Plugin for WordPress page for more details and screenshots.

PS: We are also working on some other features for this plugin like a Who’s chatting module that will allow you to show on your WordPress website who is actively logged in the video chat. If you have other great ideas drop us a line at contact@avchat.net.

FLV Audio Recorder, now with Red5 0.9 support (kind of)

Tuesday, February 16th, 2010

Changes:

  • small changes to the source code
  • added Red5 0.9 server side files, however audio recording in Red5 0.9 seems to be broken. None of the resulted .flv files played back properly in Flash Player or in deskop flv players. Running the flvcheck tool (shipped with FMIS) on any .flv file recorded using Red5 0.9 brings out the following error: Error -11 Found backward timestamp. However the latest Red 5 trunk version (rev 4047 right now) works properly.
  • build 63

So, if you’re into audio recording with Red5, use Red5 0.8 or skip Red5 0.9 and use the trunk version.

How to get it:

  • just download the software again using the link you got in the email from contact@avchat.net when purchasing it!

http://flvar.com/

Major update to our AVChat 3 Module for Drupal 6

Wednesday, February 3rd, 2010

Based on our customers suggestions we decided to improve the Drupal 6 Module for AVChat 3 . We reorganized it, we changed the way it works, and most important we added some cool new features:

drupal-module-january-revision-small

  • User profiles can now be accessed directly from the chat.
  • The users list now shows the profile pictures (works only if “User Settings->Picture Support” is enabled from Administer)
  • Settings for each user role. If one user is assigned to more user roles, then the module will take the best value (Example: A user is assigned to two roles: authenticated and gold member. Free Video Time for “authenticated” role is 1 hour and for “gold members” role is 2 hours. The module will allow the user to have 2 hours of Free Video Time)
  • The possibility to choose in “Administer” between two modes of displaying the chat: Popup Window or Embedded in a web site page.
  • New permissions added for users who have access to “Flash Video Chat Admin Area”.
  • Clean Url friendly

What’s changed:

  • Less cookies (no more than 3)
  • It can be installed in /modules/ folder directly (it can still be installed in /sites/all/modules/)
  • No more paths incompatibility: the paths to the swfs are now relative to $base_url
  • Updated permissions page

All these goodies are available in the Drupal 6 Module from our latest build (603).

To get the new Drupal 6 module download it again from your client download page. The link should be in your delivery email.

New AVChat 3 Build (603) Available

Monday, February 1st, 2010

New features:

  • Wowza Media Server compatibility (more on that in a later post).
  • We switched to the AS3 You Tube API, which means you can now see more than 1 video in the chat. The You Tube controls had to change tough to something simpler! .
  • The color of the Top Status Bar is now the same with the color of the windows.
  • The user’s avatar is now shown in the Top Status Bar and avatars now have rounded corners. The radius is controlled via style.css (cornerradius property from the windows class):New Top Status Bar with avatar
  • Avatars now keep their aspect ratio.
  • Admins now have the ability to close rooms ( users can not join closed rooms ):
    closed-rooms
  • The Rooms List now shows separate column for # of users in the room, the description (when available) is shown in parenthesis.
  • Major modifications to the AVChat 3 Module for Drupal 6 (more on that in a later post).
  • Added a red glow around the tab containing the last received message.
  • Added check box to disable auto scrolling ( this will allow proper viewing of pictures and videos in crowded rooms):
    autoscroll
  • Revised upload system:
    • editable filetype filters for security,useful variables are now sent to upload.xxx via GET (file size, file name, etc…)
    • upload system is now independent of the default uploadedFiles folder
    • you can modify upload.php to put the files anywhere on your web server).
  • The admin interface (admin.swf) can now be fully limited to only the features of the user interface.
  • Changed the color for the following text to red: USER requests permission to view your Webcam
  • You can now control the width and height of the preview area for images (imagePreviewAreaWidthAndHeight in avc_settings.xxx)
  • You can now translate the Loading Settings… message via the lstext flash var.
  • Moved the Who Is Typing text box to the top so that it will not cover most recent messages
  • added DOS protection to writeuserlist.xxx
  • added functionality to make AVChat 3 work with a license key added to settings.asc

Bug fixes:

  • several issues regarding the Community Builder integration inside the Joomla 1.5 Component
  • added more missing texts to the language file
  • issue with maxStreams limitation not working properly when autoStartOthersWebcams was on
  • room names and text messages are now properly trimmed before they are created/sent.
  • issues with rounded corners not scaling properly
  • issue with the rooms-I-am-in counter not increasing when you were automatically dropped in a room

How to get the new AVChat 3 release

You can obtain the latest AVChat 3 build by downloading the software again ( using the download link from the delivery/trial email) and:

  • doing a clean install
    OR
  • overwrite all the old files including the FMIS/Red5 server side files and the translation files

Several intermediate builds were silently posted since the last major one so some of you already benefit from some of the above features.  We have some cool new features in development, hopefully we will get a new build out with some of them in the following weeks.