RTSP to RTMP streaming

rtmprtspvideo

I am trying to set up a server for converting a video stream, live. The input stream is in RTSP format, and the output should be RTMP (to use in a Flash application).

I've had a look at crtmp, which seems like a good solution; however, I can't figure out the right configuration by myself (the .lua file). Is there an easy way to set it up as to convert the stream from RTSP to RTMP?

Alternatively, is there an easier-to-use video server (either Linux or Windows) that is also free, and that would do the same thing?

Best Answer

Here is the long story short. I don't know yet the details about your particular camera, but I have a nice working example for you:

  1. Open the configuration file and replace the externalStreams node from flvplaybackapplication with this one:

        externalStreams =                                                   
        {                                                                   
            {                                                               
                uri="rtsp://fms20.mediadirect.ro/live2/realitatea/realitatea",
                localStreamName="test1",                                    
                forceTcp=true                                               
            },                                                              
            {                                                               
                uri="rtsp://fms20.mediadirect.ro/live/utv/utv",             
                localStreamName="test2",                                    
                forceTcp=false                                              
            }                                                               
        },
    

After that, use jwplayer, flow player, etc. to playback the stream. The full RTMP URIs are:

 rtmp://ip/live/test1

or

 rtmp://ip/live/test2

As you can see, those streams are 2 RTSP streams. One is RTP/RTCP over UDP (forceTcp=false) and one is RTP/RTCP over RTSP (forceTcp=true). Because RTSP is over TCP, you get that flag to true.

Needless to say, you MAY experience playback glitches and issues caused by the fact that those 2 streams are very far away from you (they are here in Romania).

Hope it helps

Related Topic