warren-bank / Android-RTSP-IPCam-Viewer

Android app to view RTSP and RTMP IP camera video streams.
GNU General Public License v2.0
77 stars 11 forks source link

no authentication support? #11

Closed Unixware closed 2 years ago

Unixware commented 2 years ago

App works with the provided URLs but when trying to see my own camera says "Unfortunately, RTSP IP-Cam Viewer has syopped" I bet this app does not support pass protected rtsp streams ? thx

the URL is like this : rtsp://user:pass@xxx.xxxx.xxxx.xxxx:554/live/ch0

warren-bank commented 2 years ago

This little app offloads all RTSP playback to the ExoPlayer library, which the docs say does support BASIC and DIGEST authentication by embedding user:pass into the URL as you have done. Any incompability issue is really a question for their dev team; I don't know anything about the internals. Apologies.

Having said that, the app shouldn't crash when it encounters a video URL that it can't play. Any chance of seeing a logcat error that shows a strack trace to help identify where the error originates (and could be caught)? If not.. no problem.. I could probably figure it out without a trace.. but I'm not going to get around to looking at it for at least a few days.

Unixware commented 2 years ago

no worries, it is an old phone (4.4.4) , I ve trimmed the logcat from when your app starts log.txt

warren-bank commented 2 years ago

Thanks for the log! Seems to be a NullPointerException that happens in the method prepareExoPlayer.. which is called from here.

warren-bank commented 2 years ago

thoughts..

Unixware commented 2 years ago

thanks again, but as I wrote above "no worries" - could be issue with the codecs of the android I m trying, an old Sony with unofficial ROM (4.4.4) - , many thanks for the help, take your time with this ...:-)

warren-bank commented 2 years ago

I never worry.. but that said, I am curious if my apps have a bug that should be fixed.

This recent issue appears to support that there is.. and that the underlying problem was with ExoPlayer's implementation.. which was fixed only a few days ago. Once they push a stable update, I'll publish updated releases for my apps (to use it). When that happens, I'd be curious to know if it fixes your issue.

warren-bank commented 2 years ago

regarding the demo RTSP stream they use in that issue to test..

This website lists both:

..but the server that the dynamic dns record resolves to is currently offline; I'll check again later.. maybe it'll be available at another time.

warren-bank commented 2 years ago

PS: I just found another bug that's completely unrelated to basic/digest auth..

I feel really dumb that I didn't originally test for this.. or maybe it was introduced later.. idk.

In any case.. when a low-res url is specified, but high-res is left blank.. then:

warren-bank commented 2 years ago

I added several commits today.. making all of the fixes/improvements mentioned here. v02.03.00 is the newest release. I'll update again when ExoPlayer releases its next stable version.. to incorporate their fix for Basic auth.

Unixware commented 2 years ago

cheers !