Which configuration in the config.lua do I use for pushing an RTSP stream to EvoStream?
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
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
Great news! Rather trying to connect to EMS from my Android phone using RTSP, I installed FFMPEG on my server and (a) connected from my Android phone to FFMPEG using RTSP, and (b) connected FFMPEG to EMS using RTMP. It works! Thank God! 🙂
So the situation now is:
Android |—–RTMP—–> EMS |—–RTMP—–> Web page/videojs playback <works!>
Android |—–RTSP—–> EMS <won’t even connect>
Android |—–RTSP—–> FFMPEG |—–RTMP—–> EMS |—–RTMP—–> Web page/videojs playback <works!>
Hi again
Here’s my FFMPEG command that connects my Android phone through to EMS.
ffmpeg -rtsp_flags listen -i rtsp://139.162.97.151:5544/live/myStream2 -f flv rtmp://139.162.97.151/live/myStream
The difference between FFMPEG and EMS is that I can set up FFMPEG to listen for an RTSP connection coming in from the phone. EMS, on the other hand, assumes that the phone has a listener (like an IP Camera for instance) and keeps trying to connect to that.
Is there any way I can set up EMS to listen for an RTSP connection?
Thanks.
Cheers
Bill
Bill
Hi Bill,
Glad you were able to make it work! 🙂
Android |—–RTSP—–> EMS <won’t even connect> That should work, as said have you remove the /live in the uri? Try this: rtsp://139.162.97.151:5544/myStream2 I guess that is the reason why EMS cannot ingest the RTSP from Android and may answer the last issue you encountered. EMS listens to port 5544 but if you want to add more listener, you can check createService. Hope this helps.. Thank you.
Android |—–RTSP—–> EMS <won’t even connect> That should work, as said have you remove the /live in the uri? Try this: rtsp://139.162.97.151:5544/myStream2 I guess that is the reason why EMS cannot ingest the RTSP from Android and may answer the last issue you encountered. EMS listens to port 5544 but if you want to add more listener, you can check createService. Hope this helps.. Thank you.
Hi again
Wow, it must be around midnight where you are! Thanks for the quick response. It actually caught me out as I was just updating my last post. No hurry for a reply.
> Try this: rtsp://139.162.97.151:5544/myStream2
I’ve tried every combination and still no luck.
Anyway, please ignore that last question about setting up an RTSP listener. I just realised that listeners are set up in config.lua and connectors to listeners are set up in Web UI. So my Android app does connect but after a few seconds the connection still gets rejected by EMS. I’ll email you the EMS log file. My app’s debug output is below. Cheers
Bill
Anyway, please ignore that last question about setting up an RTSP listener. I just realised that listeners are set up in config.lua and connectors to listeners are set up in Web UI. So my Android app does connect but after a few seconds the connection still gets rejected by EMS. I’ll email you the EMS log file. My app’s debug output is below. Cheers
Bill
10-27 12:33:27.354 17913-19061/org.doggieriot.konekt D/RtspClient: startStream() mHandler.post run() started
10-27 12:33:27.354 17913-19061/org.doggieriot.konekt D/RtspClient: Connecting to RTSP server...
10-27 12:33:28.194 17913-19061/org.doggieriot.konekt D/RtspClient: tryConnection()
10-27 12:33:29.194 17913-19061/org.doggieriot.konekt D/RtspClient: sendRequestAnnounce() start
10-27 12:33:29.194 17913-19061/org.doggieriot.konekt D/RtspClient: ANNOUNCE rtsp://139.162.97.151:5544/myStream2 RTSP/1.0
10-27 12:33:29.194 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() start
10-27 12:33:42.124 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() response.status = 200
10-27 12:33:42.124 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = CSeq: 1
10-27 12:33:42.124 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Cache-Control: no-store
10-27 12:33:42.124 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Date: Fri, 27 Oct 2017 02:03:31 UTC
10-27 12:33:42.124 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Expires: Fri, 27 Oct 2017 02:03:31 UTC
10-27 12:33:42.134 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Pragma: no-cache
10-27 12:33:42.134 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Server: EvoStream Media Server (www.evostream.com)
10-27 12:33:42.134 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() =
10-27 12:33:42.134 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() Response status from server is 200
10-27 12:33:42.144 17913-19061/org.doggieriot.konekt D/RtspClient: sendRequestAnnounce() First try: response.status is 200
10-27 12:33:42.144 17913-19061/org.doggieriot.konekt D/RtspClient: sendRequestAnnounce() finished
10-27 12:33:42.144 17913-19061/org.doggieriot.konekt D/RtspClient: sendRequestSetup() start
10-27 12:33:42.144 17913-19061/org.doggieriot.konekt D/RtspClient: addHeaders()
10-27 12:33:42.144 17913-19061/org.doggieriot.konekt D/RtspClient: SETUP rtsp://139.162.97.151:5544/myStream2/trackID=1 RTSP/1.0
10-27 12:33:42.144 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() start
10-27 12:33:42.364 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() response.status = 200
10-27 12:33:42.364 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = CSeq: 2
10-27 12:33:42.364 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Cache-Control: no-store
10-27 12:33:42.364 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Date: Fri, 27 Oct 2017 02:03:43 UTC
10-27 12:33:42.364 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Expires: Fri, 27 Oct 2017 02:03:43 UTC
10-27 12:33:42.374 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Pragma: no-cache
10-27 12:33:42.374 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Server: EvoStream Media Server (www.evostream.com)
10-27 12:33:42.374 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Session: ksTEbwsJ
10-27 12:33:42.374 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() = Transport: RTP/AVP;unicast;client_port=5002-5003;server_port=35958-35959
10-27 12:33:42.374 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() input.readline() =
10-27 12:33:42.374 17913-19061/org.doggieriot.konekt D/RtspClient: Response: parseResponse() Response status from server is 200
10-27 12:33:42.384 17913-17913/org.doggieriot.konekt D/RtspClient: postError() mMainHandler.post() run() message is 1
10-27 12:33:42.384 17913-19061/org.doggieriot.konekt D/RtspClient: abort()
10-27 12:33:42.384 17913-19061/org.doggieriot.konekt D/RtspClient: addHeaders()
10-27 12:33:42.384 17913-19061/org.doggieriot.konekt D/RtspClient: sendRequestTeardown() request is TEARDOWN rtsp://139.162.97.151:5544/myStream2 RTSP/1.0
10-27 12:33:51.434 17913-17913/org.doggieriot.konekt D/RtspClient: release()
10-27 12:33:51.434 17913-17913/org.doggieriot.konekt D/RtspClient: stopStream()
10-27 12:33:51.434 17913-19061/org.doggieriot.konekt D/RtspClient: stopStream() mHper.post run()
Hi Bill,
Without looking at the SDP, just the EMS logs, we can only guess that the network address in the o= section of the session description cannot be resolved, or is invalid.
Xai
Xai