alexeyvasilyev / rtsp-client-android

Lightweight low-latency RTSP client library for Android
Apache License 2.0
236 stars 63 forks source link

Unable to get demo app to work with RTSP stream #1

Closed jpage4500 closed 3 years ago

jpage4500 commented 3 years ago

Hi @alexeyvasilyev

First off - thanks for writing this library! I'm hoping it can solve the problem I've found which is VideoView doesn't support RTSP streams that require authentication.

However, the demo isn't working for me. I have an Amcrest AD110 video doorbell which supports an RTSP stream.

The format of the RTSP URL is: rtsp://user:password@192.168.0.208:554/cam/realmonitor?channel=1&subtype=1

I've verified this stream works in VLC. For the demo app, I removed the user:password part and entered them separately.

rtsp://192.168.0.208:554/cam/realmonitor?channel=1&subtype=1
user
password

But, when hitting the Start button I get this in the logs:

 Starting RTSP thread...
 Connecting to 192.168.0.208:554...
 onRtspClientStarted()
 java.net.SocketException: socket failed: EACCES (Permission denied)
    at java.net.Socket.createImpl(Socket.java:492)
    at java.net.Socket.connect(Socket.java:619)
    at com.alexvas.utils.NetUtils.createSocketAndConnect(NetUtils.java:98)
    at com.alexvas.rtsp.demo.ui.live.LiveFragment$RtspThread.run(LiveFragment.kt:171)
 onRtspClientStopped()

Any ideas?

alexeyvasilyev commented 3 years ago

Fixed in 1.2.7.

jpage4500 commented 3 years ago

worked perfectly! Thanks