Use Red5 and OBS to create your own live platform to challenge Bilibili (b station)

Source: Internet
Author: User
Tags goto tomcat

Using Red5 and OBS to develop their own live platform to challenge Bilibili (b station), why the article title called This, in fact, I study red5 and FMS aspect of things is a long time, plus I recently with the help of Flex, to develop a medical remote consultation system (Web-based video chat). So I use the convection media and environmental construction, as well as client development are already familiar. I was in B station for many years (I was probably the 2012 use of the beep, then only the bomb screen, no games and live-like things), I was going to interview B station to do video live this leader. Unfortunately, when I inquired about when people do not do live on the consideration. Later I went to develop a set of pictures of the site, image site after all, bandwidth is not very big do not make money situation I can bear. So today to write a blog is to teach you to build their own dedicated live platform, this is not afraid of the beep on your room What, premise you will be your own technology, server management. Will Java flash and so on AH. No, you can ask me, too.


First, the preparation work 1 installs the jdk1.8 on your computer. The Red5 I provide must use jdk1.8, otherwise it will not run

2 download red5-1.0.6, download address: http://download.csdn.net/detail/wk313753744/9374983

3 is to download OBS (open broadcast software),

4 you want to see the effect, you also need to prepare a flash player.



. Second, installation instructions

1 Installing the JDK

2 Install red5-server-1.0.6, first make sure you have downloaded Red5-server-1.0.6.zip, unzip

(1) Go to the red5-server-1.0.6 directory and look like this. Because the new version of Red5 is not using jetty as a built-in server, but using Tomcat (the TOMCAT8 container used by 1.0.6), it looks like the directory structure of Tomcat is similar, conf storage is some configuration file, our main modification is conf/ Red5.properties, according to their own needs to modify the port number, log directory, WebApps, is your own development of Red5 program, such as live, on-demand, chat, such as the case of shared objects.


(2) in the start Red5, we need to pay attention to a little. If the environment in your system is JDK8 by default, then you do not need to adjust and go directly to the next step, but if you install a different version of the JDK, such as a common jdk1.7.*. Then you have to modify your Red5 using the JDK is jdk1.8 above, find Red5.bat, open with text editing tools, find 32 lines.

: LaunchRed5
Echo starting Red5
"%java_home%\bin\java"%java_opts%-cp "%red5_classpath%"%red5_mainclass%% red5_opts%
Goto finally
Change the upper%java_home% variable to C:\Program Files\java\jdk1.8.0_05\bin\java use the absolute path of your jdk8. The following modified configuration file.

: LaunchRed5
Echo starting Red5
"C:\Program files\java\jdk1.8.0_05\bin\java"%java_opts%-cp "%red5_classpath % "%red5_mainclass%%red5_opts%
Goto finally

(3) Start Red5. In the window, double-click Red5.bat. Can be started. Double-click on Linux on Red5.sh, but in Linux in order not to run in interactive mode, you start the red5-highperf.sh. This parameter has been optimized. You can also run in the background.

The above server environment is ready, below begin to introduce how OBS sends the video stream to the Red5 server,


Second, the OBS release stream to the Red5 server,

(1) Open OBS Client, install what I will not talk about. There are mainly two local FMS URLs and play Path/stream codes (if present).

FMS url:rtmp://127.0.0.1/live

Playback path/Stream code (if present): Test

Note: The playback path/stream code (if present) in Obs means Playpath. In Red5 one understands for a stream name (Streamname). Just take one of them, and then in the place where you play the flow where you make this name now, I'm test.



(2) OBS settings Click OK, back to the OBS main interface, in the source area right click, add-"display access. This creates a capture source, and of course you can use the camera as the capture source.

(3) For the sake of insurance, if you are using OBS for the first time, then you should click Preview Stream. Look at the effect

(4) Click Start Streaming to publish your video stream to the Red5 server. Here, by the way, the start of streaming is the same as the publish () in Flash or flex in NetStream.


Third, the preview effect

is to use the RTMP protocol to play your published video stream. I used the case of Red5 to play the stream, which was the same as when I developed a flex program myself.



There are two main places need to be modified, is the location of the path to be with your OBS FMS URL has been, and you RED5 server to have live this program, I give you download Red5 compression package is there.

The second one is to change the name to test and then click Play to play it.


Finally, welcome to visit my picture website http://lockbur.com/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.