Category Archives: red5 hosting

RTMP Servers

Real-Time Messaging Protocol or RTMP was developed originally by Macromedia, which then became Adobe. It was a system to implement streaming of video, text and audio over the internet between a flash player and a server with the RTMP setup.

Using fragments between the server and the user, it maintains a stable connection and because of that it has low latency, meaning that there is a very short delay, between the server and the user. The delay is perhaps 1 or 2 seconds.

The RTMP servers available are Adobe Media Server, Red5, Wowza Streaming Engine, Nginx RTMP server and a few more, but this 4 are the most common, although Adobe is very expensive and Red5 is difficult, personally I prefer Wowza RTMP, which has a number of advantages, we will talk about this on another post.

Going back to RTMP, it is a TCP-based protocol which maintains persistent stable connections and allows low-latency communication. To deliver streams smoothly and transmit as much information as possible, it splits streams into fragments, and their size is negotiated dynamically between the client and server.

RTMP servers are ideal for live streaming but also for Ondemand video streaming, it is also a necessary component for live video chats.

RTMP Server, how it works

The server must be setup with a media server, like Adobe or Red5, then the video stream connects to the RTMP installed on the server, the video stream could be a laptop with a software installed, this software is an encoder, there are a number of them, OBS Studio, but the most common is the Adobe, FMLE, which you can download free at http://hosting-marketers.com/flashmedialiveencoder_3.2_wwe_signed.msi (for windows computers, Mac computers you can download directly at Adobe site.)

On the encoder you enter the server RTMP, which would be something like this:

fmle encoder
click on the image to see larger size

rtmp://server_IP/live/stream_name

Then you connect and start the broadcast. this stream will go directly the RTMP server and you can now setup a player for your users, if you using a RTMP player you will need to use a flash player, but using Wowza Streaming Engine on the RTMP server it converts the stream to a HLS protocol which can be used on many other platforms as well, like smartphones and HTML5 Players. Although the HLS has the latency issue because of the flash players end of live it is nearly impossible not to use it. Nowadays, with a good configuration you can reduce the latency to 3 or 4 seconds.

So we have, YOU on your laptop with a camera and an encoder >>> your internet connection and the RTMP Server connection >>> and finally the player on your site broadcasting your live event. Or your video files.

what is the use of red5?

Well there are 2 red5’s, the open source red5 which is the one we use on our servers and red5pro, which is very expensive but still does not do what Wowza Streaming Engine does.

Red5 the open source can be used for ondemand streaming which is video streaming, you upload videos (in flv or mp4 format) to a red5 server and you stream the videos using red5, it is a better experience then using just a normal server, it starts faster because you don’t have to download the all file to the viewer computer and it is difficult for users to steal the video. But and this always applies, you can stream only to flash players, and most platforms are leaving flash, specially mobiles, so what I am saying is that red5 does not work well with smartphones, be Apple or Android devices.

You can also use red5 to stream live events, or video chats software’s.

testing a red5 live streaming rtmp, plus creating a player for the rtmp

We created an app for live streaming here.

Now we going to test it and create a player code so we can start streaming to our site.

Do you have fmle installed on your computer? You need to download it from adobe.

Lets test it first, go to

http://209.95.39.220/test/

enter the rtmp of your app. the rtmp is

rtmp://server IP/app

so:

rtmp://RED5_SERVER_IP/live221

Enter this URL on the long string and click connect, now click “Publish” your camera will start,  and now click “Play” if the 2 players show the same thing you are on. Everything is good.

OK, now we have to work on “stream name”. We talked about rtmp, and we tested it, the testing site if you go back to it

http://209.95.39.220/test/

it has a stream name, “testing” this must be on both the publishing and on the player.

so it must be on the FMLE and on the player code.

fmle

(click on the image to have a better view)

the FMLE on the left you have your settings, frame per second, bitrate, your camera, format.

on the red5 server your bitrate should be about 320kbps higher then that you need a lot of RAM and server resources.

lets configure the fmle as the image shows.

on the right on the FMS URL enter the rtmp and on the stream enter your chosen stream name, in this case I entered “live” see image.

click connect, and then below click “Start”

you now streaming to your server.

 

Now creating a player for this stream. Go to

http://www.hosting-marketers.com/generator/

at the bottom on the “Streamer” enter the rtmp:

rtmp://RED5_SERVER_IP/live221

and on “Stream / File Name” enter the stream name, which we used on the FMLE, “live”

Click  “Generate Code!”

Take the “Preview & Embed” code, paste on your site and that’s it.

You can also use an image on the player, it will show before the user click to play,  enter the image URL on “Overlay Poster”

creating a new app on Red5 for live streaming

We will call this app live221.

first of all download the folder live from red5, the path is /usr/local/red5/webapps

if you ftp to the server you will see these apps.

then rename the folder live to live221

open the folder and go inside \WEB-INF folder, there are 3 files there, you need to change 2.

1- file: red5-web.properties
2 – file: web.xml

open on a text editor red5-web.properties , you will see the 2 lines below:
webapp.contextPath=/live
webapp.virtualHosts=*

change it to:

webapp.contextPath=/live221
webapp.virtualHosts=*

now open the second file web.xml the code on top:

red5 live app

upload the new folder, restart the Red5

go to the Red5 admin area and you will see the new app.

Red5 托管

Red5是一个类似于Adobe的Flash媒体服务器或者Wowza媒体服务器的媒体服务器。媒体服务器用于实况转播,视频聊天,会议直播,视频流,也被称为按需流。

使用媒体流服务器的主要好处是:

终端使用者(客户)的好处:

该服务器能够检测客户的连接速度并自动提供最佳视频流。Red5 托管

播放开始较早,用户可以跳至视频的任何部分,而不必等待整个文件下载。

提供者(站长)的好处:

广播直播活动的能力。

提供高级互动内容的能力,如直播聊天,视频会议等。

视频播放更有效率,需要较少的服务器资源和数据传输。

视频文件不是被下载到客户电脑,所以减少内容被盗取的机会。

详细的统计数据,诊断等
red5 托管

自2008年以来,Hosting Marketers就开始提供red5托管和wowza托管,我们拥有长期的经验而且我们的客户支持团队随时待命帮助您设置您的视频聊天或您的直播活动。

如果您需要更多信息,
请通过https://hosting-marketers.com/customers/submitticket.php?step=2&deptid=2 联系我们

或者直接通过http://hosting-marketers.com/ 下订单