Archive

Archive for July, 2010

Recording file in linux for IVR G711ulaw alaw

July 30, 2010 Leave a comment

Q. How to record a file which match IVR?

A. Follow the steps.

1. yum install audacity

2. run audacity and first select 8000 Project Rate (Hz)

3. Click Record and start talking, when its done Stop

4. In the audio graph on left you have a name called “Audio Track” > click there “Split stereo to mono”

5. Menu > File > Export Selection > name it and save it

IVR can now use those files.

Done.

Categories: Flash

Red5 – for my flex radio station

July 30, 2010 Leave a comment

Q. How can i use red5 to make my flex code work in FMS also in Red5.! ?

A. Follow the steps:

1. Download red5 start it stop it

2. Configure RTMP application, by making a folder called “test” in /webapps, and copy the sample echo program.

[root@example test]# tree
.
├── META-INF
│   └── MANIFEST.MF
├── streams
│   └── Flex_.flv
└── WEB-INF
├── classes
│   ├── logback-echo.xml
│   └── org
│       └── red5
│           ├── demos
│           │   └── echo
│           │       ├── Application.class
│           │       ├── ExternalizableClass.class
│           │       └── RemoteClass.class
│           └── server
│               ├── service
│               │   ├── EchoService.class
│               │   ├── EchoService$SampleObject.class
│               │   └── IEchoService.class
│               └── webapp
│                   └── echo
│                       ├── ExternalizableClass.class
│                       └── RemoteClass.class
├── lib
├── red5-web.properties
├── red5-web.xml
└── web.xml

13 directories, 14 files
[root@example test]#

3. Fix the web.xml/red5-web.xml and red5-web.properties, here is an example file contents:


@file: web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
 xmlns="http://java.sun.com/xml/ns/j2ee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
 version="2.4">

 <display-name>test</display-name>

 <context-param>
 <param-name>webAppRootKey</param-name>
 <param-value>/test</param-value>
 </context-param>

 <listener>
 <listener-class>org.red5.logging.ContextLoggingListener</listener-class>
 </listener>

 <filter>
 <filter-name>LoggerContextFilter</filter-name>
 <filter-class>org.red5.logging.LoggerContextFilter</filter-class>
 </filter>

 <filter-mapping>
 <filter-name>LoggerContextFilter</filter-name>
 <url-pattern>/*</url-pattern>
 </filter-mapping>

<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/streams/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>

</web-app>

@file red5-web.xml

<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:lang="http://www.springframework.org/schema/lang"
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd">

 <bean id="placeholderConfig">
 <property name="location" value="/WEB-INF/red5-web.properties" />
 </bean>

 <bean id="web.context"
 autowire="byType" />

 <bean id="web.scope"
 init-method="register">
 <property name="server" ref="red5.server" />
 <property name="parent" ref="global.scope" />
 <property name="context" ref="web.context" />
 <property name="handler" ref="web.handler" />
 <property name="contextPath" value="${webapp.contextPath}" />
 <property name="virtualHosts" value="${webapp.virtualHosts}" />
 </bean>

 <bean id="web.handler" />

 <!-- enable support for mx:RemoteObject requests -->
 <bean id="flexMessaging.service">
 <property name="serviceInvoker" ref="global.serviceInvoker" />
 <!-- add an entry for all possible "destination" attributes of your
 mx:RemoteObject sources -->
 <property name="endpoints">
 <map>
 <entry key="Red5Echo">
 <!-- object that handles requests sent to this endpoint -->
 <ref bean="web.handler" />
 </entry>
 </map>
 </property>
 </bean>

</beans>

@file red5-web.properties

webapp.contextPath=/test
webapp.virtualHosts=*

4. restart red5, from browser run your RTMP client

Done.

Categories: Flash

Adobe Air Flex Flash IDE for linux

July 28, 2010 Leave a comment

Q. How the hack in linux i can feel comfortable with Adobe? :O(

Note: For Flex/Air/Flash only in Linux is nightmare, without code completion (Aptana/Eclipse comedy made me lose my time nothing else), So i really prefer use this Editor for Adobe vs Linux uses

A. Here the greatest and latest KOMODO editor get it. It is the only one atleast allowing me Code completion:

1. Install Komodo Edit 6.0 ( i am using)

[root@example Downloads]# cd Komodo-Edit-6.0.0-beta2-5550-linux-libcpp6-x86
[root@example Komodo-Edit-6.0.0-beta2-5550-linux-libcpp6-x86]# ls
INSTALLDIR  install.html  install.sh  license.txt  relnotes.html  support
[root@example Komodo-Edit-6.0.0-beta2-5550-linux-libcpp6-x86]# ./install.sh
Enter directory in which to install Komodo. Leave blank and
press 'Enter' to use the default [~/Komodo-Edit-6].
Install directory: /opt/komodo

install: Installing ActiveState Komodo to '/opt/komodo'...
relocate this Python to '/opt/komodo/lib/python'
relocate '/opt/komodo/lib/python/lib/libpython2.6.so.1.0'
relocate '/opt/komodo/lib/python/lib/libpython2.6.so'
relocate '/opt/komodo/lib/python/lib/python2.6/site-packages/activestate.py'
relocate '/opt/komodo/lib/python/lib/python2.6/lib-dynload/_hashlib.so'
relocate '/opt/komodo/lib/python/lib/python2.6/lib-dynload/_ssl.so'
relocate '/opt/komodo/lib/python/lib/python2.6/config/Makefile'
relocate '/opt/komodo/lib/python/bin/smtpd.py'
relocate '/opt/komodo/lib/python/bin/2to3'
relocate '/opt/komodo/lib/python/bin/pydoc'
relocate '/opt/komodo/lib/python/bin/python'
relocate '/opt/komodo/lib/python/bin/python-config'
install: 'Komodo Edit-6.desktop' desktop shortcut created at '/usr/share/applications/komodo-edit-6.desktop'

==============================================================================
Komodo Edit-6.desktop has been successfully installed to:
/opt/komodo

You might want to add 'komodo' to your PATH by adding the
install dir to you PATH. Bash users can add the following
to their ~/.bashrc file:

export PATH="/opt/komodo/bin:$PATH"

Or you could create a symbolic link to 'komodo', e.g.:

ln -s "/opt/komodo/bin/komodo" /usr/local/bin/komodo

Documentation is available in Komodo or on the web here:
http://aspn.activestate.com/ASPN/docs/Komodo

Please send us any feedback you might have or log bugs here:
komodo-feedback@ActiveState.com
http://bugs.activestate.com/

Thank you for using Komodo.
==============================================================================

[root@example Komodo-Edit-6.0.0-beta2-5550-linux-libcpp6-x86]# ln -s "/opt/komodo/bin/komodo" /usr/local/bin/komodo
[root@example Komodo-Edit-6.0.0-beta2-5550-linux-libcpp6-x86]# komodo

2. Open the project and put a default compile command from tools > run command:

/home/sun/Downloads/flex3.5/bin/mxmlc -target-player=10 %D/%f

3. Running that will compile and thats it. (our code completion is available)

Done.

Many Thanks goes here: http://blog.rootkowski.com/get-started-with-flex-development-on-linux/comment-page-1/#comment-198

Categories: Flash

Flash Media Server – setup for live stream online radio station

July 28, 2010 Leave a comment

Q. How can i put my Linux as a Live Online Radio Station?

A. Using FMS and Flex we can solve it. Follow the white rabbit:

1. Get the FMS install it in Linux Fedora as basic

2. Configure FMS as Unsigned application, where “test” is the correct path to use in Flex


[root@example applications]# pwd
/opt/adobe/fms/applications
[root@example applications]# mkdir test
[root@example applications]# ls
live  <strong>test</strong> vod

[root@example conf]# vi /opt/adobe/fms/conf/fms.ini
# modify the new folder path
LIVE_DIR = /opt/adobe/fms/applications/test

[root@example conf]# service fms restart

3. Adobe Flex now programming to use nc.connect( “rtmp://localhost/test/” );
– the code is copywrite so i can’t put here, you can google FMS tutorial for Flex code’s
– following screen shot you can see, I am talking live and two browsers are listening live from different part of the world

Done.

Categories: Flash

Whois Flash server Red5 Server Flex Air server

July 28, 2010 Leave a comment

Q. What is Flash and its server? Why it matters? Why do i think of it?

A. There are commercial and Open source FMS (Flash media serveR) & alternatives, but all of those have features more or less, which is the case of choice or selection.

Media servers:
1. FMS itself (Flash Media Server) – https://www.adobe.com/cfusion/tdrc/index.cfm?loc=en_us&product=flashmediaserver
2. Red5 – http://www.red5server.org/
3. You can google it for

FMS: IS full featured server daemon, which also run in Linux, the following .swf is the admin FLEX GUI to monitor the status/activity.

[root@example tools]# ls
AC_RunActiveContent.js  far  flvcheck  fms_adminConsole.htm  fms_adminConsole.swf fmscheck
[root@example tools]#

Red5: IS a open source and free to use in linux, i used it, looks great but there is less features compared to Original FMS

[root@example Downloads]# cd red5
red5-0.9.RC2.tar.gz  red5-debug.sh        red5-highperf.sh     red5.jar             red5.sh red5-shutdown.sh
[root@example Downloads]# sh red5.sh

Categories: Flash

Flex – audio video stream air streaming recording

July 27, 2010 Leave a comment

Q. How do i capture video/audio and stream it, live watch it, whats going on?

# Side note:
# Flex SDK 3.5 and FMS server communicate and stream job processing

@file: 2 files same directory code: http://gist.github.com/492861

Thanks to this url: http://polygeek.com/pgtv/videos/501_FMS3_basics/srcview/index.html

Categories: Flash

Flex – stratus p2p example

July 27, 2010 Leave a comment

Q. How to make a simple p2p flex application using stratus.

#side notes: Flex SDK 3.5 and optionally FMS installed in Linux

@file 1: http://gist.github.com/492871

Categories: Flash