am3n / RTSP-Client-Android

Lightweight RTSP client library for Android
Apache License 2.0
16 stars 3 forks source link

I have two cameras for decoding the stream but one of them is not working #2

Closed pinalpandav closed 1 year ago

pinalpandav commented 1 year ago

I have two cameras for decoding the stream but one of them isn't working after changing the password. even when I set password of IP camera with '@' character then it gives error message.

Please help me

these are the logs of IP camera that is not streaming.

D/RtspClient: Sending keep-alive V/RtspClientUtils: sendGetParameterCommand(request="rtsp://username:password@ipaddress:port/video/h264", cSeq=287) I/RtspClient Out: GET_PARAMETER rtsp://username:password@ipaddress:port/video/h264 RTSP/1.0 I/RtspClient Out: Authorization: Digest username="admin", realm="IP Camera(J8266)", nonce="54db9867cc85efdfa92501047c0e7025", uri="rtsp://username:password@ipaddress:port/video/h264", response="4630b2007c0c45ff47df38ae06e91c8e" I/RtspClient Out: CSeq: 287 I/RtspClient Out: Session: 816448981 I/RtspClient Out: W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it..

am3n commented 1 year ago

Is your code like this:

rtsp.init(url = "rtsp://192.168.129.39:554/11", username = "user", password = "1234@678")

or this:

rtsp.init(url = "rtsp://user:1234@678@192.168.129.39:554/11")

or this:

rtsp.init(url = "rtsp://user:${URLEncoder.encode("1234@678", "UTF-8")}@192.168.129.39:554/11")
pinalpandav commented 1 year ago

This issue is resolve now '@' is accept by rtsp

pinalpandav commented 1 year ago

Now, When my IP camera has h265 encoding it's unable to decode and give me the error as shown below:

V/Rtsp: surfaceCreated() V/Rtsp: surfaceChanged(format=4, width=800, height=225) I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es D/VideoDecoder: Configuring surface 1920x1080 w/ 'video/hevc' D/VideoDecoder: Started surface decoder D/RtspClient: Sending keep-alive V/RtspClientUtils: sendGetParameterCommand(request="rtsp://ip:port/video/h264", cSeq=8) I/RtspClient Out: GET_PARAMETER rtsp://ip:port/video/h264 RTSP/1.0 I/RtspClient Out: Authorization: Digest username="admin", realm="IP Camera(J8266)", nonce="cf402e47e7dc7c13022cc99661e6ee44", uri="rtsp://ip:port/video/h264", response="8d33ff0c02b757566c3d96927cdbee83" I/RtspClient Out: CSeq: 8 I/RtspClient Out: Session: 1031399999 I/RtspClient Out: D/RtspClient: Sending keep-alive V/RtspClientUtils: sendGetParameterCommand(request="rtsp://ip:port/video/h264", cSeq=9) I/RtspClient Out: GET_PARAMETER rtsp://ip:port/video/h264 RTSP/1.0 I/RtspClient Out: Authorization: Digest username="admin", realm="IP Camera(J8266)", nonce="cf402e47e7dc7c13022cc99661e6ee44", uri="rtsp://ip:port/video/h264", response="8d33ff0c02b757566c3d96927cdbee83" I/RtspClient Out: CSeq: 9 I/RtspClient Out: Session: 1031399999 I/RtspClient Out:

W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it.. W/FrameQueue: Queue is full, clearing it..

The issue is with 'video/hevc' mime type. this type of encoding unable to support for decoding.

am3n commented 1 year ago

It's not support H265.

But with the help of this class & this class, you can add H265 support.

I currently do not have an H265 codec camera to implement and test and if I can find a camera with these specifications and either stream locally with VLC or online H265 stream, I will definitely follow up on this matter.

There is another way, and that is that you connect your camera to the Internet, have a global IP or port forward so that I can do testing and development with your camera.

pinalpandav commented 1 year ago

Okay thank you for the information.