Archive for the ‘Hosting Marketers News’ Category

Red5 Tutorial and Red5 Hosting

Tuesday, September 22nd, 2009

Red 5 is a pretty amazing server software written in java. The Red 5 development team has put in tons of effort to make it a open source alternative to Adobe FMS – Flash Media Server.
Red 5 is a perfectly suitable technology for “Video On Demand” applications, streaming, publishing, mealtime collaboration, multi player gaming and more….
Red 5 is on all shared hosting plans of Hosting Marketers. By default the red5 server comes with some sample applications pre installed into it, like oflaDemo, fitcDemo, SoSample etc.

When installing and using red5 you have to keep in mind some configurations and security concerns. Red 5 was created to emulate the RTMP Protocol (realtime messaging).
Even today where many don’t know the capabilities of Red5 or are scared of the complications offered by java coding, i must tell you… once you get to use it you will love it :) .
There are many applications to be made with RTMP and many possibilities to be discussed. Here we will discuss a simple application that can stream from custom directory. This application will be server side and will help you set up your own basic application which does not require you to use the global oflaDemo.

Hosting Marketers offer you Red5 Hosting facility on their servers, which is needless to say … “amazing”.

You can host you own youtube or clipshare clones at a very nominal cost. However to avoid any problems, as you will be sharing resources on a shared server, its always better to create your own application, that accepts incoming outgoing requests.
This tutorial does not give you the scope to create the application from scratch, rather configure it to use a custom path on the server to stream from / record to . You can then safely use your own account path to handle streams. By default oflaDemo uses “streams” directory on the server to play/record streams.

Though this tutorial gives you a course on setting up the same, many have difficulties getting it done.
So here is the practical way of doing it.

I assume you already have basic Application class ready, which makes your application valid. We will simply use a custom filename generator to change the stream paths.

Setting up a custom Filename Generator: – CustomFilenameGenerator.java

package com.flashvisions;
import org.red5.server.api.IScope;
import org.red5.server.api.ScopeUtils;
import org.red5.server.api.stream.IStreamFilenameGenerator;
public class CustomFilenameGenerator implements IStreamFilenameGenerator {
/** Path that will store recorded videos. */
public static String recordPath;
/** Path that contains VOD streams. */
public static String playbackPath;
private String getStreamDirectory(IScope scope) {
final StringBuilder result = new StringBuilder();
final IScope app = ScopeUtils.findApplication(scope);
while (scope != null && scope != app) {
result.insert(0, “/” + scope.getName());
scope = scope.getParent();
}
return playbackPath + result.toString();
}
public String generateFilename(IScope scope, String name, GenerationType type) {
return generateFilename(scope, name, null, type);
}
public String generateFilename(IScope scope, String name, String extension, GenerationType type) {
String filename;
filename = getStreamDirectory(scope) + name;
if (extension != null)
// Add extension
filename += extension;
return filename;
}
public boolean resolvesToAbsolutePath() {
return true;
}
/* Setters for your path variables */
public void setPlaybackPath(String path) {
playbackPath = path;
}
public void setRecordPath(String path) {
recordPath = path;
}
}

Save this code in a file: CustomFilenameGenerator.java in the same package as your application class.
Now that we have setup the code , we need to make our application aware of the class so that it may
use the path values from this.
So we edit red5-web.xml. This one of the configuration files of red5. Generally the content or red5-
web.xml looks like this:

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN”
“http://www.springframework.org/dtd/spring-beans.dtd”>
<beans>
<bean id=”placeholderConfig”
class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>
<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”
class=”com.flashvisions.Application”
singleton=”true” />
</beans>

The last bean instructs Red5 about the main application class. So just before the </beans>
closing tag .. we will add the directive for our CustomFilenameGenerator class.
So our final red5-web.xml will look like this:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN”
“http://www.springframework.org/dtd/spring-beans.dtd”>
<beans>
<bean id=”placeholderConfig”
class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>
<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”
class=”com.flashvisions.Application”
singleton=”true” />
<bean id=”streamFilenameGenerator”>
<property name=”playbackPath”>
<value>C:\</value>
</property>
<property name=”recordPath”>
<value>C:\</value>
</property>
</bean> </beans>
As per the above example …all streams will be recorded to/played from my c: drive. You can set your
account path instead of c:/ to use your own folders for streaming.

This tutorial was writen by Rajdeep Rath from Flash Visions

Alojamento de Sites – Our New European FFmpeg Hosting

Thursday, July 2nd, 2009

Hoje em dia existem imensas empresas de alojamento de sites, no
entanto a percentagem de empresas que fornecem o serviço de alojamento
de páginas dinâmicas, ainda não fornecem alojamento com suporte
ffmpeg.

Um alojamento com suporte ffmpeg é hoje em dia a primeira escolha para
quem procura criar um site de partilha de vídeos, que permitirá ao
cliente converter os ficheiros multimédia em outros formatos
utilizando os seus scripts.

Goldenrod Server With a Major System Failure

Friday, May 8th, 2009

Last night while we were trying to fix system quotas (so it shows the correct disk spaced used for each account) the Goldenrod server apparently due to a high server load damaged some system files, this is very unusual and it never happened before, unfortunately at the moment this is what we think happened.

We are still trying to save the system, and replace only the broken files but if matters come to worse and we find that this cannot be done, we will have to reinstall the system.

Please be assured that your site is well protected as we have 2 different backups for each site.

At this moment we cannot yet estimate when the issue will be fixed, but we are working as fast as we can to solve this problem.

Please accept our apologies for the inconvenience.

Andrew

Customer Support

Update 8.18 am (PDT)

Our Datacenter is doing a full error scan on the hard disk it is going slowly but we hope that it will not be necessary to reinstall the system.

Chris

Update 10.09 am (PDT)

The sites should start to come back online, they will be a bit slow but in the next hour the situation will normalize.
Thank you for your patience.

Our Servers at fortressitx.com are down.

Thursday, April 16th, 2009

All times are GMT -4.

10.40 am White and Green server go down.

10.46 am. Not all, Blue, Purple and Template are still working, not sure if I have to change this line soon.

10.50 am The datacenter says it is something to do with the network and they are working like crazy to fix it ASAP.

10.51 am Green server is back!!!!!!!!

10.52 White is also back, this time it wasnt difficult. All the others will be following.

Thank you all for reading my post.

Signing up,

Chris

Goldenrod Server again?! Maintenance Friday.

Monday, December 1st, 2008

Friday 5th December maintenance for Goldenrod Server, this time for real.

First off all our apologies for the downtime we had this last 2 days it seemed that the server could not be stable for a full hour.

The cause of this apparently is that some of the system software needs to be reinstalled. The advice I’m getting from our technicians is that it is better to do it now at a time of our choice then to have a complete crash. Please be assured that all your sites have been backup to a different server, and we will continue to do daily backups, I guarantee, that we will never lose an account again. Please accept my word on that. I personally control the backups.

I’m thinking of doing the maintenance on Friday, the 5th December, starting late afternoon. I’m not sure exactly how many hours it will take, I know this is a great inconvenience, but we will try to make it as fast as possible.

If you have a site which needs to be on at all costs, please email me so I can arrange to transfer your site to another server.

I will keep you updated, and will try to find out exactly how many hours will be needed.

Please dont hesitate to contact me with your concerns.

Warm regards,
Chris Black
Customer support manager
Contact me here.