RTSP to RTMP streaming

12,159

Solution 1

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

Solution 2

I'd try VLC or Wowza myself.

Share:
12,159

Related videos on Youtube

Timothy
Author by

Timothy

Hello there

Updated on September 18, 2022

Comments

  • Timothy
    Timothy over 1 year

    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?

  • Timothy
    Timothy over 12 years
    Thank you! This is exactly what I was looking for. However, I still have a problem which is adressed in this Google Group
  • Andrew
    Andrew about 9 years
    VLC does not support RTMP.
  • Andrew
    Andrew almost 9 years
    Yes @David Cary, but last time I checked, VLC, although able to stream RTMP, it was unable to broadcast as RTMP. The link you posted shows how to read from an RTMP stream, which is not what was required by the OP.