Install Red5 on Google Compute Engine


Hits: 6936  

Yesterday we have installed basic web server (apache, php, mysql) on Google Compute Engine. Today our target is to install Red5 on Ubuntu server for Google Compute Engine.

First we need to check Java version installed on Google Compute Engine

$ java -version
The program ‘javac’ can be found in the following packages:

* default-jdk
* ecj
* gcj-4.6-jdk
* openjdk-6-jdk
* gcj-4.5-jdk
* openjdk-7-jdk
Ask your administrator to install one of them

Now you have to install java using

$ sudo apt-get update
$ sudo apt-get install java-package
# sudo apt-get install openjdk-6-jdk
$ sudo apt-get install openjdk-6-jre

Install Ant

$ sudo apt-get install ant

Install Subversion

$ sudo apt-get install subversion

You can download latest Red5 from here http://www.red5.org/downloads/red5/

$ sudo wget http://www.red5.org/downloads/red5/1_0/red5-1.0.0.tar.gz
$ sudo tar xvfz red5-1.0.0.tar.gz
$ sudo mv red5-1.0.0 red5
$ sudo mv red5 /usr/share/

Now try to run Red5 Server

$ cd /usr/share/red5
$ sudo sh red5.sh

Yeah! Firewall always block you to access red5 port 5080 so please allow port 5080 & 1935 using below commands

$ gcutil addfirewall red5 –description=”Let open port 5080.” –allowed=”tcp:5080″

$ gcutil addfirewall rtmp –description=”Let open 1935 rtmp port.” –allowed=”tcp:1935″

$ sudo sh red5.sh

Check Red5 is running

$ sudo netstat -ant
Find port 5080 Listening

Now try http://your-server-address:5080 in a web-browser.

Red5 on Google Compute Engine
Red5 on Google Compute Engine

Install oflaDemo from installer http://your-server-address:5080/installer/ then check 😉

Red5 Demo on Google Compute Engine - Port Tester
Red5 Demo on Google Compute Engine – Port Tester

Install Webmin on Google Compute Engine

$ sudo wget http://prdownloads.sourceforge.net/webadmin/webmin-1.610.tar.gz
$ sudo gunzip webmin-1.610.tar.gz
$ sudo tar xf webmin-1.610.tar
$ sudo cd webmin-1.610
$ sudo ./setup.sh /usr/local/webmin

Open port 10000 using gcutil addfirewall

$ gcutil addfirewall webmin –description=”Let coordinator and snitches chatter.” –allowed=”tcp:10000″

Wowza Live Audio Video Mixing


Hits: 6938  

Wowza doesn’t do transcoding. So, we highly recommend to use FOSS solutions

Where we need Wowza Live Audio Video Mixing?

1) Live event is broadcasting through Wowza
2) We need a multi lingual setup somewhere and comment or transcode that live event with voice.
3) Flash client might receive the stream where
Output Video Stream = Video of live event + Audio transcoder (multi lingual human voice)

Modern IP cameras provide RTP/RTSP/RTMP with MPEG, MPEG4 or h.264 encoded stream for broadcasting through Wowza.

We might need a RTP/RTSP/RTMP client to decoder and manipulate streams then re-encode stream and serve it over standard protocol like RTP/RTSP/RTMP.

Best Solution should use Xuggler to serve streams to Flash. Media Server might be Wowza or Red5.

Xuggler is the easy way to uncompress, modify, and re-compress any media file (or stream) from Java.

Xuggler in Action: A free open-source library for Java developers to uncompress, manipulate, and compress recorded or live video in real time.

 

Mixing audio and video with ffmpeg

Mixing audio with video file without audio track
# ffmpeg -i audio-file.mp3 -i video-file.avi -acodec copy -vcodec copy output-file.avi

Mixing audio with video file with existing audio track.
# ffmpeg -i audio-file.mp3 -i video-with-audio.avi -acodec copy -vcodec copy output-file.avi -map 0.0 -map 1.0

-map -> the output file would contain two streams audio and video.

Contact us for Live Audio Video Mixing.

Email: svnlabs[at]gmail.com
Skype: svnlabs
MSN: svnlabs[at]hotmail.com

Wowza MediaSecurity AddOn Package


Hits: 6765  

The MediaSecurity AddOn Package includes options and procedures for securing Wowza Media Server and the media you plan to stream through Wowza Media Server. There are several Wowza Media Server features that are needed to properly secure your content.

1. SecureToken
2. RTMP authentication
3. RTSP authentication
4. StreamNameAlias
5. secure streaming (RTMPE, RTMPTE and RTMPS).

MediaSecurity AddOn Package for Wowza Media Server 2 or greater:
MediaSecurity_2.0.zip

Some basic steps to setup SecureToken for wowza:

1. Download the MediaSecurity Addon package “MediaSecurity_2.0.zip” and copy the wms-plugin-security.jar & wms-plugin-security-encryption.jar from the package/lib folder to the [wowza-install]/lib folder, then restart Wowza Server.

2. Edit the new Application.xml. Add the following Module to the bottom of the Modules list, but make sure it is above the closing tag.

<Module>
<Name>ModuleSecureToken</Name>
<Description>ModuleSecureToken</Description>
<Class>com.wowza.wms.plugin.security.ModuleSecureToken</Class>
</Module>

3. Add the following Property to the Properties list at the bottom of the Application.xml.

<Property>
<Name>secureTokenSharedSecret</Name>
<Value>#ed%h0#w@1</Value>
</Property>

4. Start Wowza Server

Contact us to add SecureToken protection to JWPlayer and FlowPlayer for Wowza, Red5, FMS media files.

Email: svnlabs[at]gmail.com
Mobile: +919928673578
Skype: svnlabs
MSN: svnlabs[at]hotmail.com

PHP API Skype4COM


Hits: 10948  

Skype4COM is an ActiveX component that represents the Skype API as objects, properties, commands, events and notifications. Skype4COM is used in ActiveX, Visual Studio, Delphi, PHP or JavaScript.

Download Skype4COM

You might read article on How can we use PHP to access shared library functions?

Useful Links:

Void.Bot is a proof of concept of a Skype bot that sits in Skype Group chats and does useful stuff.

PHP Skype API wrapper class is a PHP class library to access Skype (on Linux) via its API. With PHP DBus, this class library provides easy-to-use interfaces to manipulate Skype on Linux.

<?php
// Create a Skype4COM object:
$skype = new COM("Skype4COM.Skype");

// Create a sink object:
$sink =& new _ISkypeEvents ();
$sink->convert = $skype->convert();

// Connect to the sink:
com_event_sink($skype, $sink, "_ISkypeEvents");

// Create a conversion object:
$convert = $skype->convert;
$convert->language = "en";

// Start the Skype client, minimized and with no splash screen:
if (!$skype->client()->isRunning()) {
  $skype->client()->start(true, true);
}
?>

Skype Tracer is a Windows (.exe) console-based application that lets you issue text-based Skype Desktop API commands to a running Skype client.

COM is an acronym for Component Object Model; it is an object orientated layer defines a common calling convention that enables to call and interoperate with code written in any other language. Not only can the code be written in any language, but it need not even be part of the same executable; the code can be loaded from a DLL, be found in another process running on the same machine.

Skype Developer Forum
http://devforum.skype.com/
http://developer.skype.com/accessories/skype4com
http://community.skype.com/

BigBlueButton API in PHP


Hits: 12236  

BigBlueButton -- Open Source Web Conferencing

BigBlueButton supports sharing of slides (PDF and PPT), video, whiteboard, chat, voice (using Asterisk or FreeSWITCH), and desktops. It’s built using over many open source components, runs on Mac, Unix, and PC computers, and is supported by a community that cares about good design and a streamlined user experience.

BigBlueButton is built using the following open source components:

Ubuntu, Flex SDK, Ghostscript, Grails, ActiveMQ, Asterisk, Image Magick, MySQL, nginx, Red5, swf Tools, Tomcat, Asterisk Java, Xuggler, Open Office…

BBB is available on Google Code

BigBlueButton is an open source web conferencing system that enables universities and colleges to deliver a high-quality learning experience to remote students.

See examples of how you can integrate BigBlueButton into your applications.

Create Your Own Meeting


<?php

$IP ‘yy.yy.xx.xxx’;  // Server IP where BigBlueButton (BBB) Installed

$Port 81;  // Server port to BBB i.e. 81

// Method: create – To create meeting

$string “createname=Test+Meeting&meetingID=accounts123&attendeePW=accounts123&moderatorPW=accounts123”;

$salt “XYBGDRYUOPLJMAWDGNHYDFFGHGJJ435D”;  // security salt for BBB & API

$sha sha1($string.$salt);

$link “name=Test+Meeting&meetingID=accounts123&attendeePW=accounts123&moderatorPW=accounts123&checksum=”.$sha;

?>

<a href=”http://<?php echo $IP?>:<?php echo $Port?>/bigbluebutton/api/create?<?php echo $link?>“>Create Meeting</a><br><br>

<?php

// Method: join – To join meeting

$string “joinfullName=Joe+User&meetingID=accounts123&password=accounts123”;

$salt “XYBGDRYUOPLJMAWDGNHYDFFGHGJJ435D”;

$sha sha1($string.$salt);

$link “fullName=Joe+User&meetingID=accounts123&password=accounts123&checksum=”.$sha;

?>

<a href=”http://<?php echo $IP?>:<?php echo $Port?>/bigbluebutton/api/join?<?php echo $link?>“>Join Meeting</a><br><br>

<?php

// Method: join – To join meeting as username

$string “joinfullName=Sandeep&meetingID=accounts123&password=accounts123”;

$salt “XYBGDRYUOPLJMAWDGNHYDFFGHGJJ435D”;

$sha sha1($string.$salt);

$link “fullName=Sandeep&meetingID=accounts123&password=accounts123&checksum=”.$sha;

?>

<a href=”http://<?php echo $IP?>:<?php echo $Port?>/bigbluebutton/api/join?<?php echo $link?>“>Join Meeting as sandeep</a><br><br>

<?php

// Method: isMeetingRunning – To check meeting is active/running

$string “isMeetingRunningmeetingID=accounts123”;

$salt “XYBGDRYUOPLJMAWDGNHYDFFGHGJJ435D”;

$sha sha1($string.$salt);

$link “meetingID=accounts123&checksum=”.$sha;

?>

<a href=”http://<?php echo $IP?>:<?php echo $Port?>/bigbluebutton/api/isMeetingRunning?<?php echo $link?>“>Check Meeting Running</a><br><br>

Create Your Own Meeting Link

Checkout other article “BigBlueButton on CentOS”

Download BBB.zip

Install Union Development Platform


Hits: 2658  

Union is a development platform for creating multiuser applications which runs in a central location on the Internet or a LAN. Users need to connect to Union server then users are in constant real-time contact or session. Users can send messages to/from Union Server.

Application may be chat, game, shared document, widget on web page. Developers can user union for web-development skills to create collaborative content cost-effectively and quickly.

Union is a development platform for creating multiuser applications and games in Adobe Flash, JavaScript, .net, Java, and other languages. Union is free for up to 1000 simultaneous users. Union handles low-level networking and data-synchronization responsibilities, and provides a rich, intuitive communications layer that lets developers focus on application logic, not packets and protocols.

Union Quick Start The Union Platform, By USER1

Union is a development platform for creating connected applications. You can use Union to build:

Social interaction: chat, meeting applications, multiuser whiteboards, collaborative editing tools.

Realtime Multiplayer Games: online action games, head-to-head racing, social worlds, online chess, massively multiplayer trivia, turn-based card and word games.

Realtime Datafeeds: live scores, realtime inventory availability, live surveys, realtime charts, graphs, and analytics dashboards.

Publish/subscribe Channels: topic-based news feeds, project notifications, celebrity chat, sports spectation, live real-estate listings, product sales updates.

Union applications run in desktop and mobile web browsers (JavaScript/HTML5), Flash, Java, C#, and dozens of other languages.

Union Quick Start The Union Platform, By USER2

Install Union on Linux Server

To run the Union Server you will need Java 1.6.

# java -version

Union Server on run on port 9100, Make sure port is open on server 😉

Download from here: http://www.unionplatform.com/?page_id=1833

# wget http://unionplatform.com/releases/union/union_1.1.0.tar.gz

Decompress the Union Server distribution .tar.gz file

# tar -zxvf union_1.1.0.tar.gz

This will create a folder names /union

Add Java to your operating system’s path or edit the start-server script to point to your java binary.

# cd union
# chmod 775 *
# ./startserver.sh

Ouput may be like…

UNION_HOME set to [/Users/yourname/union/.]
Union Server 1.0.2 (build 498) Started….OK

Some JVM have memory issue, so limit the amount of memory used by Union Server, use the java command-line option “-Xmx”.

# java -Xmx512m -Dfile.encoding=UTF-8 -cp lib/union.jar:lib/stax-api-1.0.1.jar:lib/wstx-asl-3.2.6.jar net.user1.union.core.UnionMain start &

Customize Your Configuration

You can change Union Server’s administration password http://www.unionplatform.com/?page_id=416

SIP Web Phone


Hits: 20078  

SIP Phone service which lets you use your SIP account anywhere in the world via their web based SIP service. The good thing is they already have a few popular SIP services pre-configured, so you don’t even have to configure their SIP.

SIP (Session Initiation Protocol) is the most popular Voice over IP (VoIP) standard. SIP enables two or more people to make phone calls to each other using the Internet to carry the call.

A good quality sip provider will allow for pristine call quality and minimal drops.

Using Flex, Java and Red5 Server we can develop Web Sip Application. The main advantage of these phone is no need to install at client side. Simply we can browse application and we can register and make call.

Asterisk. Digium’s open source communications engine powers voice and video communication solutions worldwide. Discover the power of Asterisk, let us help you choose the right Asterisk solution.

Click2Call is a service that provides users of your websites to make calls from your website and leave voicemails for you by simply clicking a button.

Free Call - Free International Calls & Free VoIP Service. Internet phone calls - free VoIP, call PC to phone over Internet telephony

TringMe also provides a complete ecosystem wherein VoIP providers, Service providers, Enterprises, Developers and End-users can play. An ecosystem which can cater to developing innovative applications that integrate Voice and Telephony without worrying about the underlying details of call routing and signalling.

TringMe - Web based Telephony

Twilio Voice
Build applications that use the phone network to interact with people on landlines and cell phones all over the world. In just a few lines of code, you’ll have phones ringing.

Twilio - Build Scalable Voice, VoIP and SMS Applications in the Cloud

PHPVoice

Build voice enabled applications directly in PHP.

VoicePHP - PHP For Voice

Doddle Web Phone

Online SIP WebPhone-Click2Call Doddle - VoIP call from webpage public telephone

Make VoIP calls anywhere in the world via Doddle web based SIP phone directly from your webpage.
Public Internet Telephone: With the free, online, no registration Doddle phone service, VoIP is as easy as accessing a webpage: just start using!
It’s a Doddle.

Linphone is an internet phone or Voice Over IP phone (VoIP).

Linphone, open-source voip software - Linphone, an open-source video sip phone

* Linphone can be used for communicating freely with people over the internet, with voice, video, and text instant messaging.
* Linphone makes use of the SIP protocol , an open standard for internet telephony. You can use Linphone with any SIP VoIP operator, including our free SIP audio/video service.
* Linphone is free-software (or open-source), you can download and redistribute it freely.
* Linphone is available for desktop computers: Linux, Windows, MacOSX, and for mobile phones: Android, iPhone, Blackberry.

OpenSIPS (Open SIP Server) is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities. OpenSIPS, as a SIP server, is the core component of any SIP-based VoIP solution. With a very flexible and customizable routing engine, OpenSIPS ‘unifies voice, video, IM and presence services in a highly efficient way, thanks to its scalable (modular) design.

OpenSIPS feature:
* SIP registrar server
* SIP router / proxy (lcr, dynamic routing, dialplan features)
* SIP redirect server
* SIP presence agent
* SIP back-to-back User Agent
* SIP IM server (chat and end-2-end IM)
* SIP to SMS gateway (bidirectional)
* SIP to XMPP gateway for presence and IM (bidirectional)
* SIP load-balancer or dispatcher
* SIP front end for gateways/asterisk
* SIP NAT traversal unit
* SIP application server

Cipango is a SIP Servlets extension to the popular Jetty HTTP Servlet engine. Cipango/Jetty is then a convergent SIP/HTTP Application Server compliant with both SIP Servlets 1.1 and HTTP Servlets 2.5 standards. It also features a Diameter extension to develop IMS applications.

slider_1

OpenVBX allows developers to build voice and SMS applications for business, such as toll free phone numbers, call forwarding, voicemail, visual voicemail, voicemail transcriptions, and auto-attendants. It’s like Google Voice, but open source and for business.

OpenVBX- the Web-based, Open Source Phone System for Business

OpenVBX- the Web-based, Open Source Phone System for Business1

FreeSWITCH is a scalable open source cross-platform telephony platform designed to route and interconnect popular communication protocols using audio, video, text or any other form of media. FreeSWITCH also provides a stable telephony platform on which many telephony applications can be developed using a wide range of free tools.

Record Audio from Websites


Hits: 12257  

Flex is a platform for developing and deploying Applications that run on Flash player on Web using Red5 Server.

Flex / Red5 applications are compiled to SWF files and are executed at runtime by Adobe Flash Player.

Red5-Recorder

Open source Red5 video flex flash recorder and player project allows you to insert a red5 / flex module to do it directly from your website. Uses Flex and red5. Videos are stored as FLV streams and can be playable and reviewed from this project within flash player. 2 modes are visible: recorder mode and player mode. All other parameters can be defined through simple html script.

Record, Visualize & Save Microphone Input

Record, Visualize & Save Microphone Input - makemachine

MicrophoneCapture, MicrophoneInput, InputRenderer, WavEncoder are some basic classes to record audio from microphone.

Create a Useful Audio Recorder App in ActionScript

Create a Useful Audio Recorder App in ActionScript 3 - Activetuts+

The MicRecorder class is a great addition to ActionScript 3, be sure to bookmark this article. 😉

Barebones Audio Recorder

Client-side audio capture and conversion to MP3.

This recorder captures user audio, converts to MP3 format on the client side, then uploads to the server.

Barebones Audio Recorder

Flash-based interface
Barebones Audio Recorder1

Sample HTML-based interface
Barebones Audio Recorder2

Red5 record audio with the Flash plugin

Other Links:
http://www.sajithmr.me/jrecorder-jquery
http://flvar.com/documentation
http://labs.makemachine.net/2011/04/record-visualize-save-microphone-input/

Install Etherpad on SUSE Linux


Hits: 4829  

Collaborate on documents in really real-time on SUSE Linux

EtherPad is the first web-based word processor that allows people to work together in really real-time.

All editing of the document is instantly visible on the screens of all participating users, enabling new and productive ways to collaborate on text documents. Etherpad is useful for meeting notes, drafting sessions, education, team programming, and more…

1. Online word-processor with formatting options
2. Letter by letter collaboration
3. Color-coded edits
4. Infinite Undo
5. History Playback
6. Import HTML, Word, RTF
7. Export as HTML, Word, PDF
8. Change Zoom
9. Super simple to embed into your own website/CMS with jQuery and PHP examples
10. Support with PHP, jQuery, Elgg, Apple devices, JavaScript, Ruby, Python etc.

Instructions for compiling and running the EtherPad open source release

How we can install Etherpad on Open SUSE Linux?

I just want to help you out… If you want to pay me nothing that is fine too! 😉

Here are some simple steps to install Etherpad on Open SUSE Linux…..

SUSE Linux is different from RedHat, CentOS or Ubuntu. General Package Managers / Setup Tool won’t work on SUSE, It support Zypper or YaST.

First check your server architecture

# uname -a
http://www.cyberciti.biz/faq/linux-how-to-find-if-processor-is-64-bit-or-not/

# cd /usr/local

Requirements
Java 1.6 (tested with 1.6.0_20)
Scala 2.7 (tested with 2.7.7)
MySQL Server 5.1 (tested with 5.1.59)
mysql-connector-java (tested with 5.1.18)

Create username ‘etherpad’ with password ‘password’

# useradd -r -m etherpad
# passwd etherpad

Install Java

# uname -a
I am using 32-bit here…
# wget http://autosetup1.googlecode.com/files/jdk-6u20-linux-i586-rpm.bin
# sh jdk-6u20-linux-i586-rpm.bin

# java -version

Install fastjar

# zypper install fastjar
or
# yast –install fastjar
or
# yast2 –install fastjar

Download Scala

# wget http://www.scala-lang.org/sites/default/files/linuxsoft_archives/downloads/distrib/files/scala-2.7.7.final.tgz
# tar xvzf scala-2.7.7.final.tgz

Install MySQL

http://dev.mysql.com/downloads/mysql/5.1.html#downloads

# zypper install mysql-server
# service mysqld start
# chkconfig mysqld on

Download MySQL Java Connector

Try

# zypper install mysql-connector-java

Or

# wget http://mysql.llarian.net/Downloads/Connector-J/mysql-connector-java-5.1.18.tar.gz
# tar xvzf mysql-connector-java-5.1.18.tar.gz

Install MER­CU­R­IAL .. OR GIT

# zypper install mercurial

# zypper install git

Make sure port 9000 must be open on IPTABLES / Firewall

# /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -p tcp -m state –state NEW -m tcp –dport 9000 -j ACCEPT

Environment
Various scripts make assumptions about environment variables:

JAVA should be set to the java executable.
JAVA_HOME should be set to the main jdk directory.
SCALA should be set to the scala executable.
SCALA_HOME should be set to the main scala distribution directory.
PATH should contain $JAVA, $SCALA, and mysql
MYSQL_CONNECTOR_JAR should be set to the mysql-connector JAR file included in the mysql-connector download.
For example, this sets up the environment on my machine:

# touch myENV
# vi myENV

export JAVA_HOME=/usr/java/jdk1.6.0_20/
export JAVA=$JAVA_HOME/bin/java
export SCALA_HOME=/usr/local/scala/scala-2.7.7.final/
export SCALA=$SCALA_HOME/bin/scala
export PATH=$JAVA_HOME/bin:$SCALA_HOME/bin:$PATH
export MYSQL_CONNECTOR_JAR=/usr/local/mysqlconnector/mysql-connector-java-5.1.18-bin.jar

# cat myENV >> /etc/profile

Download EtherPad

# hg clone https://etherpad.googlecode.com/hg/ etherpad

Some Changes in etherpad source for your server…

./etc/etherpad.localdev-default.properties

# cd /usr/local
# cd etherpad/trunk/etherpad
# cp etc/etherpad.localdev-default.properties data/etherpad.local.properties

./bin/setup-mysql-db.sh

./src/main.js

./src/templates/pro/admin/admin-template.ejs

./src/templates/framed/framedheader-pro.ejs

./src/static/crossdomain.xml

./src/etherpad/pro/pro_utils.js

./src/etherpad/globals.js

./src/etherpad/control/pro/pro_main_control.js

./src/etherpad/control/pad/pad_control.js

./src/etherpad/control/global_pro_account_control.js

Database Setup
The scripts assume mysqld is running on localhost. Once mysqld is running, you can set up the etherpad database by running the following command inside ajcode/etherpad/.

# bin/setup-mysql-db.sh
This will create a database called “etherpad” with the password “password”, and grant privileges to the user “etherpad”.

All the tables will be set up the first time etherpad is run.

Compiling
EtherPad compiles all its Java and Scala libraries into a single JAR. To build this jar, you can run the following command inside ajcode/etherpad/.

# bin/rebuildjar.sh
If you modify anything in ajcode/infrastructure, you will most likely need to kill the server, rebuild the jar, and re-launch the server before your change takes effect.

Code inside ajcode/etherpad/src can be modified while the server is running, and the changes will automatically get picked up.

Running
To run the etherpad web server, execute the following command inside ajcode/etherpad/.

# bin/run-local.sh
The first time you run this, it should print out lots of messages about database migrations and finally print:

HTTP server listening on http://youdomain:9000/
At this point, you should be able to visit http://youdomain:9000/ in your web browser and create a new pad.

Thanks to Pauleira!

If you have error related to JVM

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Fix using

# export _JAVA_OPTIONS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’

Other Link:
http://code.google.com/p/etherpad/
http://etherpad.com/
https://github.com/ether/pad
http://etherpad.org/