0
votes

I need to have my application play a live video stream that has been published using rtmp in one Red5 application, but, I need to play it by using another installed Red5 app that is configured to use the RTMPTServlet (i.e. /live example servlet).

Is it possible to publish a live video stream through rtmp and then play the stream (knowing the the stream name) through another Red5 (i.e. /live) application?

Thanks!

1

1 Answers

0
votes

Not sure that I fully understand what you mean, but I'll take a crack at it. It seems that you are publishing to lets say "/app1" and you'd like to view the stream on "/live". This is not easily done as you would need to write some code to proxy the stream from app1 to live. If you simply want to use RTMPT to view your broadcasted stream, then publish to the live app. You will however need to configure the RTMPT servlet in the live application prior to starting the server. Add these entries to the webapps/live/WEB-INF/web.xml file and then start the server.

<servlet>
    <servlet-name>rtmpt</servlet-name>
    <servlet-class>org.red5.server.net.rtmpt.RTMPTServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>rtmpt</servlet-name>
    <url-pattern>/fcs/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>rtmpt</servlet-name>
    <url-pattern>/open/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>rtmpt</servlet-name>
    <url-pattern>/close/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>rtmpt</servlet-name>
    <url-pattern>/send/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>rtmpt</servlet-name>
    <url-pattern>/idle/*</url-pattern>
</servlet-mapping>

If you are using the default http port setting in conf/red5.properties, your stream will be available at rtmpt://youriporhost:5080/live

Old blog post about RTMPT here: http://gregoire.org/2009/01/28/rtmpt-and-red5/