Which configuration in the config.lua do I use for pushing an RTSP stream to EvoStream?

Which configuration in the config.lua do I use for pushing an RTSP stream to EvoStream?

Support ForumCategory: About EvoStreamWhich configuration in the config.lua do I use for pushing an RTSP stream to EvoStream?
BillMalkin asked 2 years ago
Hi

Just a simple question hopefully. I’m attempting to push a stream from an Android app I’m developing to EMS where I want to convert it to RTMP and display the video on a website using FlowPlayer’s JavaScript API. I’m using an API on the Android phone called Libstreaming. This all worked through Wowza and now I’m keen to get it working through EMS. (Admittedly, the code I’m using on the Android phone was developed by a third party as an example of how the Libstreaming API is used and was written specifically to work with Wowza. However, they maintain it “should” also work with other streaming engines.) In config.lua it would appear that I should therefore connect to inboundRTSP, ie — RTSP
{
   ip=”0.0.0.0″,
   port=5544,
   protocol=”inboundRtsp”,
} However, when attempting to get this all working with crtmpserver, I read some documentation that said I should be using inboundLiveFlv, ie — LiveFLV ingest
{
   ip=”0.0.0.0″,
   port=6666,
   protocol=”inboundLiveFlv”,
   waitForMetadata=true,
} Could you confirm that I should indeed be using inboundRTSP before proceeding? (I ask because I get an error when trying to connect with either port.) Very much appreciated. Kind regards
Bill



6 Answers
erika Staff answered 2 years ago
Hi Bill, For your question:  “Which configuration in the config.lua do I use for pushing an RTSP stream to EvoStream?” If you want to ingest the stream from your Android to EMS, you can pull the stream using RTSP then you can use RTMP for stream playback. EMS will do the conversion for you. 🙂
  1. pullStream RTSP source: 
    pullStream uri=rtsp://<SOURCE_Address> localStreamName=Test
  2. playback RTMP: 
     rtmp://<EMS_IP>/live/Test
  Thank you.    
BillMalkin answered 2 years ago
Hi Erika I couldn’t actually understand your answer above. This is because (a) I’m using a push-in stream rather than a pull stream, and (b)  “pullStream uri=rtsp://<SOURCE_Address> localStreamName=Test" does not seem to fit the config.lua syntax.

In any case, I've now discovered that when adding a stream in EMS ONLINE, it adds the configuration to pushPullSetup.xml and I really don't need to change config.lua in order to set up an RTSP stream. Would that be correct?
So I’ve added a stream using EMS ONLINE and in the Config panel it shows a Config ID of 3, LocalStreamName of myStream2, and Source URI of rtsp://139.162.97.151:5544/live.

Does this look like the correct configuration for a push-in RTSP stream? (It seems odd that, even though the port default for RSTP in Config.lua is 5544, if I don’t specify 5544 in the Source URL it defaults to port 554.) When I use this configuration, I run “service evostreamms start_console” and it shows the output below repeated over and over until I stop EMS. This is occurring even though I am not even attempting to connect to EMS. It seems as if it is trying to both connect to an outside listener, as well as listen for my connection, and it keeps failing on connecting to an outside listener. Would that be correct? In any case, how do I address this apparent problem as , when I do attempt to connect to the EMS listener, there is no evidence that EMS accepts the connection at all?

(I’ve run sniffit on port 5544 and my app definitely does attempt to connect to the EMS listener on that port.) Thanks. (I’ve also emailed you the log file.) Cheers
Bill   /thelib/src/netio/epoll/iohandlermanager.cpp:119 Handlers count changed: 23->24 IOHT_TCP_CARRIER
/thelib/include/netio/epoll/tcpconnector.h:112 Outbound connection established: (Far: 139.162.97.151:5544; Near: 139.162.97.151:43276) CTCP(26) <-> TCP(75) <-> [RTSP(76)]
/thelib/src/netio/epoll/tcpacceptor.cpp:127 ACCEPTING CONNECION!
/thelib/src/netio/epoll/iohandlermanager.cpp:119 Handlers count changed: 24->25 IOHT_TCP_CARRIER
/thelib/src/netio/epoll/tcpacceptor.cpp:195 Inbound connection accepted: (Far: 139.162.97.151:43276; Near: 139.162.97.151:5544) CTCP(29) <-> TCP(77) <-> [RTSP(78)]
/thelib/src/netio/epoll/iohandlermanager.cpp:129 Handlers count changed: 25->24 IOHT_TCP_CONNECTOR
/thelib/src/protocols/rtp/basertspappprotocolhandler.cpp:2627 Stream named live not found
/thelib/src/protocols/rtp/basertspappprotocolhandler.cpp:657 URI analyzer failed
/thelib/src/protocols/rtp/rtspprotocol.cpp:397 Unable to handle content
/thelib/src/netio/epoll/tcpcarrier.cpp:91 Unable to read data from connection: (Far: 139.162.97.151:43276; Near: 139.162.97.151:5544) CTCP(29) <-> [TCP(77)] <-> RTSP(78). Signaling upper protocols failed
/thelib/src/netio/epoll/iohandlermanager.cpp:129 Handlers count changed: 24->23 IOHT_TCP_CARRIER
/thelib/src/application/baseclientapplication.cpp:398 Protocol [RTSP(78)] unregistered from application: evostreamms
/thelib/src/netio/epoll/tcpcarrier.cpp:84 Unable to read data from connection: (Far: 139.162.97.151:5544; Near: 139.162.97.151:43276) CTCP(26) <-> [TCP(75)] <-> RTSP(76). Error was (104): Connection reset by peer
/thelib/src/netio/epoll/iohandlermanager.cpp:129 Handlers count changed: 23->22 IOHT_TCP_CARRIER
/thelib/src/application/baseclientapplication.cpp:398 Protocol [RTSP(76)] unregistered from application: evostreamms      
erika Staff answered 2 years ago
Hi BillMalkin, May I know how you add a stream in EMS? You said you add a stream using EMS Online? Do you mean Web UI? May I know the steps you did?  The logs shows that “Stream named live not found”. The localstreamname you are calling is “live” and based on your config you used “myStream2”. “defaults to port 554” –> this is the default transport layer of RTSP, no problem if EMS connects to this port. 🙂 Please let me know the steps you did.  You can also use the UI in adding streams please click here.   Thank you.  
BillMalkin answered 2 years ago
Hi Erika Yes, it was Web UI. (It has EMS ONLINE at the top of each page so I thought that would be a bit more specific. Not the case, I guess.) Specifically, I clicked on Streams on the menu on the left, then clicked on “+ Add”, then I left the inbound stream type to Inbound Live Stream (pull), set the URI Stream Source to rtsp://139.162.97.151:5544/live and set the localStreamName to myStream2. In my Android app I’m using rtsp://139.162.97.151:5544/live/myStream2 as my streaming URL. For Wowza I used rtsp://139.162.97.151:1935/live/myStream2, but I believe for EvoStream this needed to be changed to either 554 or 5544. I changed it to 5544 as my port 554 is blocked. > The logs shows that “Stream named live not found”. The localstreamname you are calling is “live” and based on your config you used “myStream2”. Yes, this is confusing to me too. a) If I use URI Stream Source = rtsp://139.162.97.151:5544/live, then the logs say “Stream named live not found”. b) If I use URI Stream Source = rtsp://139.162.97.151:5544 then it says there is no stream name. c) The logs never seem to mention the localStreamName that I have configured. I am therefore guessing that, in my case, “live” is the external stream name and “myStream2” is the local stream name. Would that be correct? > You can also use the UI in adding streams please click here.

Yes, I read that. It didn’t help much. Thanks.

Cheers
Bill        
erika Staff answered 2 years ago
Hi Bill, So you add this source:  “rtsp://139.162.97.151:5544/live” and you gave “myStream2” as the localStreamName. You used “rtsp://139.162.97.151:5544/live/myStream2” for the playback. As said to my previous answer, if you want to do playback using RTMP, please use this format: “rtmp://<EMS_IP>/live/Test". Going back to your added stream,  If you want to play using RTSP, please use:  rtsp://139.162.97.151:5544/myStream2 If you want to play using RTMP, please use:  rtmp://139.162.97.151/live/myStream2 You can also test play your stream using the UI, please click here.   Here is the reference on how to play pulled streams. Note that Add in UI is also the same with pullStream command.    Hope this resolves the issue. 🙂 Thank you!

Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.