msgbartop
Various ramblings-on, mostly about Red5
msgbarbottom

18 Jan 09 Spring configs and Red5 applications

This is just a quick post to let you all know about a problem Carl and I ran into with one of his example applications for red5. The application seemed to start and there where no errors in the logs, even at TRACE level for com, net, and org; it seemed that Spring or Red5 were swallowing whatever error or misconfiguration was occurring. The final resolution was found by replacing config sections with those from the oflaDemo example, one-by-one; which is what we often tell readers of the mailing list. So here is the section that silently fails

<bean id="web.scope" class="org.red5.server.WebScope" init-method="register"
    p:server-ref="red5.server"
    p:parent-ref="global.scope"
    p:context-ref="web.context"
    p:handler-ref="global.handler"
    p:contextPath="${webapp.contextPath}"
    p:virtualHosts="${webapp.virtualHosts}"/>

and here is the version that works

<bean id="web.scope" class="org.red5.server.WebScope" 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>    

Tags: , ,

06 Oct 08 Red5 + h.264

I am so happy right now, Steven helped me with the MP4 branch and now it “works”!

After we worked out the time stamping and probable channel issues, it all came down to an SHA256 in the handshake routine. I still have a lot of clean up to do, but at least there is hope for 0.9.0 release :)

If you want alpha level code that only plays one clip, you can grab the branch from here: click

 

�

Tags: , , ,

18 Sep 08 Logging work-around

I have given up waiting for someone to claim the bounty or produce a fix for the web context logger issue. After much trouble tracking everything down, I have finally “fixed” the logging for web contexts, that is for those of you using the bootstrap method of server start up. The fixed revision is 3068 and its a little rough; meaning I still need to do bit of refactoring. I just wanted to let you all know.

Part 1

Here is what you have to put in your web.xml for each web application to get an individual logger context:

[listener]
[listener-class]org.red5.logging.ContextLoggingListener[/listener-class]
[/listener]

(more…)

Tags: , , , ,

12 Sep 08 Using custom objects in AMF3 with Red5

I created a post about this subject almost a year ago, but there were a couple minor issues with the examples. Here I will show what eight additional months of experience can provide. The example provided here uses a custom object in Flex to pass information to and from the server, which in this case will be Red5. If one of you has an example which uses FMS on the server-side, I would be glad to include it here.
(more…)

Tags: , , , , ,

30 Aug 08 IvyDE – Part 1

Some of you may know that there are at least two different versions of the IvyDE, the plugin which interfaces Eclipse with your Ivy files. To use the plugin with Red5 you will need the latest version, especially if you use Ganymede. I will record some screen casts to help you through the upgrade / fixes. I apologize now for my large screen size, I will record smaller versions in the future. So without further rambling here is the first video: IvyDE part 1

Tags: , , , ,

28 Aug 08 Support for onImageData and MP3 cover art

I have added support for onImageData and MP3 cover images to Red5. Check out the Jing! I have really big screens so its a large flash video, you may need to resize your browser to see it all.

The example project source is here: http://svn1.cvsdude.com/osflash/red5/flash/trunk/player4/
Also, dont make fun of my code, its just a quick example! :)

Tags: , , , , ,

21 Aug 08 Flash on Tap

Welcome fellow Red5, Flash, and Flex people! I want to let you all know that I will be conducting a workshop on Red5 with Dominick at the Flash on Tap conference in Boston during the second week of October 2008. For those of you that prefer face-to-face of one-on-one time with our core developers, this would be your opportunity – don’t miss out!

http://www.flashontap.com/fot/index.html

Plus I’m pretty sure this is the “first” flash conference + beer festival. It’s ok if you dont drink, just come for all the flash-ing  heh heh

Tags: , , , , ,

12 Jun 08 Bootstraping Red5

Even being part of the Red5 development team, I always found adding or changing libraries a pain. To alleviate this I created a Bootstrap class. Its purpose is to look in the red5/lib directory and grab urls for all the jars contained therein and add them to a classpath. I have also added logic to keep only the most recent versions of libraries, although this logic could use some work and is not perfect. The code will miss libraries with slight name changes such as: jcl104-over-slf4j-1.5.0.jar vs. jcl-over-slf4j-1.5.2.jar.

Red5 previously had two ways to start up: standalone and war. The standalone method uses the classpath embedded in the /META-INF/manifest.mf located in the red5.jar; if your library was not listed here your application would not work, unless you placed it within your applications classpath. Your application classpath would consist of any class residing in your /WEB-INF/classes directory or in a jar located in your /WEB-INF/lib directory.

The bootstrap method of start up should also allow you to share libraries amongst your applications, I have found problems with some libraries like Hibernate but most issues seem to be resolved by updating Spring to 2.5. If you have problems you can always move the jar to your applications lib directory. So without further ado, here is how you launch Red5 using the bootstrap class:

java -Djava.security.manager -Djava.security.policy=conf/red5.policy 
-cp red5.jar org.red5.server.Bootstrap

Note: The Bootstrap class is only available in version 0.7.1 and later

Tags:

27 May 08 Using JMX in Red5

The first step to perform when using JMX in Red5 is to get the MBeanServer. Once you have a server instance you may look up, create, register, and unregister mbeans. MBeans provide access to methods on classes which implement the associated MBean interface, most of the details about this are beyond the scope of this post. Today, we will cover the loading and unloading of a Red5 context.

    MBeanServer mbs = JMXFactory.getMBeanServer();
    ObjectName oName = JMXFactory.createObjectName("type", "ContextLoader");
    ContextLoaderMBean contextLoader = null;
    if (mbs.isRegistered(oName)) {
        contextLoader = (ContextLoaderMBean) MBeanServerInvocationHandler.newProxyInstance
(mbs, oName, ContextLoaderMBean.class, true);
        System.out.println("Context loader was found");
    } else {
        System.err.println("Context loader was not found");
    }

Once you have the context loader you can load the context. The context in this case is a Red5 default context consisting of a group of web applications that have been Red5 enabled. To be Red5 enabled means that they have the proper configurations and a class extending org.red5.server.adapter.ApplicationAdapter.

    if (contextLoader != null) {
	contextLoader.loadContext("localhost", "c:/red5/webapps/red5-default.xml");		
    }

To unload the context perform this step.

    if (contextLoader != null) {
	contextLoader.unloadContext("localhost");
    }

See how simple that is?

Please note that I do not condone the use of System.out as a substitute for proper logging

Tags: , ,

26 May 08 RTMPS in Red5

Red5 now supports RTMPS, many of you will be very happy about this new feature. Previously, users had to use stunnel or some other “hack” to implement this feature that FMS supports. RTMPS was easy to implement after I realized RTMPS is RTMPT over SSL; this is a big revelation, since I started out thinking it was RTMP via SSL/TLS. So without further rambling, here is how to setup RTMPS in Red5 at zero cost. I would rate the procedure below as Intermediate level.

Create a self-signed certificate

There are many articles on the web which describe how to complete this first task, but I will explain how to do this with the tool included with Java. Execute this command from your console:

keytool -genkey -alias red5 -keyalg RSA -keysize 512 -validity 3650 \
    -keystore keystore -keypass password -storepass password \
    -dname "CN=localhost,OU=Red5,O=Red5,L=Henderson,ST=NV,C=US"

You may change a few of these options if you prefer, but I suggest that you only change some of the DName fields: Location (L), State (ST), and Country (C). Otherwise the feature may not work. Also note that if you are going to use RTMPS on the Internet, you will probably want to get a CA signed certificate.

Upon completion of this task you will have a file named “keystore”, keep track of this since you will need it later on.

Get Red5

The RTMPS feature is not released as part of the current stable server (version 0.7.0) it is however available via SVN starting with revision 2819. This means you have to get an Subversion client, grab the source, build, and deploy; I will not be covering all these steps in this post. Go to http://osflash.org/red5 for links and information on Red5.

Configuration

Once you have Red5, copy the keystore file you created with step one into your conf directory (overwrite the current keystore file in the directory if prompted). The configuration file containing the parameter for RTMPS is in conf/red5-core.xml and you will need to update the RTMPS section if you changed the keystore password. The other configuration file to make note of is red5.properties, it contains the port assignments for the supported protocols. Make sure that you have your ports configured correctly; Adobe suggests that RTMPS be defaulted to port 443, normally this port is reserved for HTTPS. If you change this port to something other than 443 you will need to update your NetConnection urls with the correct port.

For Advanced users, there are a few other options you may specify on your RTMPS connection such as the supported ciphers. You can find additional information on this here. The connectioProperties section is where you would place these additional key / value pairs.

Engage

Start the server and test your applications. I personally tested with the oflaDemo that comes bundled in Red5. Go to http://localhost:5080/demos/oflaDemo.swf and change the rtmp url to rtmps://localhost/oflaDemo et voila! This of course assumes that you didnt change any ports.

Debugging

To see what is going on with SSL at a really low level you can enable this option in your startup:

 -Djavax.net.debug=ssl

It will cause additional information to be displayed on the console.

Tags: ,


Fatal error: Call to undefined function akismet_counter() in C:\xampp\htdocs\paulgregoireblog\wp-content\themes\googlechrome\footer.php on line 9