Log in Register

Login to your account

Username *
Password *
Remember Me

Create an account

Fields marked with an asterisk (*) are required.
Name *
Username *
Password *
Verify password *
Email *
Verify email *
Captcha *

Index

Downloading the package
Content of the package
Setting variables passed via php
Supported flashvars
Quality Presets
CMS integration

 


 

This document is meant to provide you with information to setup Discussions on your own site and help you with with general configuration details of the application.

 

Downloading the package

First and foremost you need to download the Discussions script package from our downloads section:

http://rtmpworld.com/downloads/commercial-product-downloads

 

Content of the package

After you download and extract the archive file you will have a folder structure similar to the following:

 

Top Level

  • captured/
  • flashservices/
    • core/
    • services/
      • com/
      • Discussions.php
      • encoderpresets.xml
    • gateway.php
    • globals.php
    • json.php
    • xmlrpc.php
  • images/
  • js/
  • css/
  • swf/
  • config.php
  • index.php
  • style.css

 

The folder "flashservices" is the amfphp installation which connects your swf to php via the service file  Discussions.php located at:

flashservices/

  • services/
    • com/
    • Discussions.php

 

All the settings are defined in this file which can be edited in any plain text editor. The next section explains all the configuration variables available for you to modify.

 


 

Configuration file (Config.php)

Variable Name Value Type Default Description
licencekey String NA Your product license
realtimeGateway String NA RTMP/RTMPT/RTMPS url
roomname String groupdiscussions Generate webcam snapshot or not
snapshot Boolean false Server Type (RED5/FMS/WOWZA)
forceQuality String BASIC Quality preset constant from BroadcastQuality.php
thumbs String capture Path to snapshot capture directory
       
       

 

Settings passed in via AMFPHP service file (Discussions.php)

Variable Name Value Type Default Description
licencekey String NA Your product license
itemWidth Number 176 Video item width
itemHeight Number 144 Video item height
username String NA (Required) Username parameter for user login
realtimeGateway String NA RTMP/RTMPT/RTMPS url
roomname String groupdiscussions A room name for meeting
snapshot Boolean false Generate webcam snapshot or not
forceQuality String BASIC Quality preset constant from BroadcastQuality.php
usertype String GUEST Selects login mode (GUEST / HOST)
userPresets XML NULL User defined presets configuration file
bwStrict Boolean false Selects whether to follow mentioned bandwidth limit or not
autoSnapInterval Number 0 Selects interval for creating webcam snapshots on server
broadcastTime Number 180 Selects duratin of broadcast permnitted. Set 0 to broadcast indefinitely.
encodingMode String Sorenson Selects the codec to use for video broadcasting.

 

Supported Flashvars

 

Variable Name Variable Value
   
serviceLocation Path to your amfphp installation (Not required if amfphp is installed at root by default foldername) **
scriptLocation Path to ordinary php/asp/jsp script from where settings can be loaded
themeColor Application color
chromeColor UI components color
contentBackgroundColor Content background color
textColor Application text color
themeAlpha Application transparency
itemTextColor User video item text color
contentBackgroundAlpha Users grid background transparency
rollOverColor User video roll over color
itemSelectionColor User video selected color

** By default the name for amfphp folder is "amfphp". If this is not the folder name you want to use, or if you want amfgphp installed inside a sub folder , then you need to use the serviceLocation flashvars as shown below:

 

{codecitation class="brush: javascript; gutter: true;"}

flashvars.serviceLocation = " flashservices"; // Where  flashservices is your amfphp folder installed at root of site

{/codecitation}

or

{codecitation class="brush: javascript; gutter: true;"}

flashvars.serviceLocation = " Discussions/flashservices"; // Where  flashservices is your amfphp folder installed inside a folder called recorder at your site root.

{/codecitation}

 


ForceQuality Presets (com/flashvisions/camcorder/BroadcastQuality.php)

 

Chart for SD Encoding

Resolution Label Resolution Width Resolution Height
     
LOW 120 90
AVERAGE 140 105
GOOD 160 120
HIGH 176 144
BEST 240 160
HQVGA 240 160
SDLOW_SIF 320 240
SDMEDIUM_SIF 320 240
SDMEDIUM_CIF_SIF 352 288
SDHIGH_SIF 320 240
SDHIGH_CIF_SIF 352 288

 

Chart for HD Encoding

Resolution Label Resolution Width Resolution Height
     
HD_BASIC 160 120
HD_AVERAGE 320 240
HD_GOOD 320 240
HD_HIGH 320 240
HD_TV_SIF_LOW
320 240
HD_TV_CIF_SIF_LOW
352 288
HD_TV_SIF_HIGH
320 240
HD_TV_CIF_SIF_HIGH
352 288
HD_TV_SIF_PAL
320 240
HD_TV_CIF_SIF_PAL
352 288
     
     
     
     
     

 

User Defined Presets

 

You can define your own set of presets, in case you are not happy with the built-in presets. A sample of user defines presets file is provided in the package as encoderpresets.xml located at flashservices/services/encoderpresets.xml.

 

Below is a sample of the xml structure used to contain user defined presets (SD and HD) :

{codecitation class="brush: xml; gutter: true;"}

<?xml version="1.0" encoding="utf-8"?>
<presets>
<sd>
<preset>
<label>SD AVERAGE</label>
<width>120</width>
<height>90</height>
<fps>10</fps>
<keyframeInterval>30</keyframeInterval>
<quality>90</quality>
<bandwidth>18000</bandwidth>
<videocodec>Sorenson</videocodec>
<audiocodec>Speex</audiocodec>
<samplerate>16</samplerate>
<speexquality>4</speexquality>
</preset>

<preset>
<label>SD GOOD</label>
<width>160</width>
<height>120</height>
<fps>10</fps>
<keyframeInterval>25</keyframeInterval>
<quality>90</quality>
<bandwidth>25000</bandwidth>
<videocodec>Sorenson</videocodec>
<audiocodec>Speex</audiocodec>
<samplerate>16</samplerate>
<speexquality>5</speexquality>
</preset>

</sd>

<hd>

<preset>
<label>HD SIF GOOD</label>
<width>320</width>
<height>240</height>
<fps>15</fps>
<keyframeInterval>90</keyframeInterval>
<quality>90</quality>
<bandwidth>43750</bandwidth>
<videocodec>H264Avc</videocodec>
<h264profile>baseline</h264profile>
<h264level>3.1</h264level>
<audiocodec>Speex</audiocodec>
<samplerate>16</samplerate>
<speexquality>6</speexquality>
</preset>

<preset>
<label>HD SIF LOW</label>
<width>320</width>
<height>240</height>
<fps>12</fps>
<keyframeInterval>105</keyframeInterval>
<quality>90</quality>
<bandwidth>37500</bandwidth>
<videocodec>H264Avc</videocodec>
<h264profile>baseline</h264profile>
<h264level>3.1</h264level>
<audiocodec>Speex</audiocodec>
<samplerate>16</samplerate>
<speexquality>6</speexquality>
</preset>

</hd>
</presets>

{/codecitation}

Possible values for videocodec : H264Avc or Sorenson

Possible values for audiocodec : Speex or Nellymoser

Note: When user defined presets are not provided, system defined presets take over automatically.


 

Integrating Discussions With CMS

 

  • Joomla Integration
1. For Integrating amfphp servicce with joomla your flash services folder must be renamed as "amfphp" and placed at the root of your site. (assuming that joomla is installed at the site root).
ie: /public_html/amfphp
2. Next you must edit the service file :

amfphp/

  • services/
    • com/
    • Discussions.php
And place the following code at the starting of the file, after any include statements that you may have. This will help amfphp load and initialize joomla core.

{codecitation class="brush: php; gutter: true;"}

define( '_JEXEC', 1 );

define('JPATH_BASE', "../..");

define( 'DS', DIRECTORY_SEPARATOR );

 

require_once (JPATH_BASE . DS . 'includes' . DS . 'defines.php');

require_once (JPATH_BASE . DS . 'includes' . DS . 'framework.php');

{/codecitation}

 

3. Once done you can then place the following code in  Discussions .php class constructor:

{codecitation class="brush: php; gutter: true;"}

function  Discussions (){

$mainframe =& JFactory::getApplication('site');

$mainframe->initialise();

}

{/codecitation}

 

This will initialize your website  access to amfphp. You can then start using the usual joomla apis in your service file   Discussions.php as you normally do.

 

  • Wordpress Integration

 

1. Below is the code for linking to your Wordpress install in a AMFPHP gateway file (Discussions.php). This is placed into the AMFPHP Globals.php file. This patches amfphp to be able to load wordpress and initialize it. Although optional, but best is to copy the flashservices folder to site root and rename it to amfphp as with our joomla integration.

 

{codecitation class="brush: php; gutter: true;"}

 

/***************************************

***

*** WORDPRESS CONFIGURATION

**

****************************************

 

/**

* Include the WordPress config files

*/

 

//this is required to bootstrap wordpress

$configFile ='../wp-blog-folder-name/wp-load.php';

 

 

//if you want write access you must define this variable here

//set this to false to disable write access to your wordpress install

define("WPWRITEABLE", "true");

 

//then you must link to admin file here

$wpAdminFile = '../wp-blog-folder-name/wp-admin/includes/admin.php';

 

if (!file_exists($configFile))

{

throw new Exception('WordPress wp-load.php file was not found!');

}

else

{

require_once ($configFile);

}

 

//check for existence of admin file and if the writeable constant is true

if (defined('WPWRITEABLE'))

{

if (constant('WPWRITEABLE') == 'true')

{

if(!file_exists($wpAdminFile))

{

throw new Exception('WordPress admin.php file was not found!');

}

else

{

require_once($wpAdminFile);

}

}

}

 

{/codecitation}

 

2. You can now open up your service file,  Discussions.php and start using wordpress api as you would normally do.