RTSP-Camera-for-Android icon indicating copy to clipboard operation
RTSP-Camera-for-Android copied to clipboard

Huge Delay

Open amitaymolko opened this issue 13 years ago • 20 comments

I am getting a delay of about 20 seconds. This is outrageous... I will look into it and comment if i find a solution.

amitaymolko avatar Jun 13 '12 13:06 amitaymolko

Welcome to RTSPCamera project. To clarify the context of the issue:

  • Which setup did you used?
  • Especially which viewer component?

20sec delay is for example normal if you used WebView RTSP capability. That is why we implemented the RTSPCamera as well.

spex66 avatar Jun 13 '12 13:06 spex66

I edited the project and added ANNOUCE and RECORD methods to the client. (with authentication) And copied some of the server code to send the RTP Packets. I got video working and am now working on audio. I am sending the camera stream to my Darwin server setup on a real server. I am recieving the stream using vlc on my Mac book. I get a 20 sec delay. When I broadcast from my Mac using QuickTime broadcaster and receive on android phone using rtspviewer app I found on google play I have a 1-2 sec delay. All network is tethered 3G from my iPhone 1mbps

amitaymolko avatar Jun 13 '12 15:06 amitaymolko

Thank you for details. I understand that you "started" with RTSPCamera code and extended it. I have no idea, which parts of RTSPCamera survived your surgery.

From my tests I can remember that VLC (on Win7) got the stream with max 2sec delay. This was independent of JNI based encoding or use of Java H263 packetizer within RTSPCamera.

The bottleneck was the viewer on Android, which lead (as I said) to implementation of RTSPViewer (not RTSPCamera). VLC delay was not the case in my tests.

Development of native encoding on RTSPCamera was started, to test H264 packetizer based on JNI for performance comparison against Java based version.

Summary: At the moment I'm not able to help you with your bottleneck. If you find the source for your delay, or if you have questions about coding, I'm happy to get your feedback here.

spex66 avatar Jun 13 '12 16:06 spex66

If anyone wants my code. I edited rtspclient to this --> http://pastebin.com/05DtFQ7U And edit rtspcontrol to this --> http://pastebin.com/EMVDH2ns then call this in main class. rtspControl = new RtspControl2("rtsp://url/stream.sdp", rtspVideoEncoder,"username","password"); while (rtspControl.getState() != RtspConstants.READY) { }

amitaymolko avatar Jun 18 '12 06:06 amitaymolko

Thank you for sharing your changes. Did you solved your issue with 20sec delay with that changes? Or is that issue still open? regards Peter (=PA=)

spex66 avatar Jun 18 '12 06:06 spex66

I did not solve... but i think its a network issue not program. I am also still trying to get audio to work..

amitaymolko avatar Jun 18 '12 06:06 amitaymolko

Hi, when you say: "then call this in main class. rtspControl = new RtspControl2("rtsp://url/stream.sdp", rtspVideoEncoder,"username","password"); while (rtspControl.getState() != RtspConstants.READY) { }"

What is the main class you are talking about? Im trying to make it stream to a wowza server but with no luck.

Regards

andresteves avatar Jul 17 '12 16:07 andresteves

Hi! I will upload the full project and send you a link when i get home...

amitaymolko avatar Jul 17 '12 16:07 amitaymolko

Thanks bro

Regards

andresteves avatar Jul 17 '12 16:07 andresteves

Try this --> http://www.4shared.com/rar/cm2e1ZML/RtspCamera.html you need to edit RtspNativeCodecsCamera2.java if you need anymore help, you know where to find me :)

amitaymolko avatar Jul 17 '12 18:07 amitaymolko

Thank you very much. Im now trying to get the audio to work with wowza :)

andresteves avatar Jul 19 '12 13:07 andresteves

Im happy i could help. Tell me one thing... How big is your delay?

amitaymolko avatar Jul 19 '12 13:07 amitaymolko

About 5sec. But im using Wifi connection and dont know how its going to work when connect by 3G.

andresteves avatar Jul 19 '12 16:07 andresteves

Thanks :) Update here if you get the audio working correctly.

amitaymolko avatar Jul 19 '12 16:07 amitaymolko

Dear amitaymolko, It still do not work for me. For example: Host: 192.168.1.170 Port: 88 User: admin Pass: tommy1234

You can tell me the way to edit? Many thanks,

gmavenis avatar Nov 22 '12 06:11 gmavenis

Make sure you are using digest authentication and not basic.

On Nov 22, 2012, at 8:31, Tommy [email protected] wrote:

Dear amitaymolko, It still do not work for me. For example: Host: 192.168.1.170 Port: 88 User: admin Pass: tommy1234

You can tell me the way to edit? Many thanks,

— Reply to this email directly or view it on GitHub.

amitaymolko avatar Nov 22 '12 08:11 amitaymolko

Yes, I can play this rtsp url on VLC but it can not run on mobile. Maybe I built this project uncorrect. I need it much. Please help me, so thanks very much.

gmavenis avatar Nov 22 '12 10:11 gmavenis

The project i built only supports digest authentication. VLC supports both basic and digest. I haven't worked on this project for quite a while but i think it might have something to do with the ports. You should try to post errors and not only say that it doesn't work for you.

amitaymolko avatar Nov 22 '12 11:11 amitaymolko

Dear amitaymolko, I am tying to send the camera stream to my Darwin server. I can't visit http://www.4shared.com/rar/cm2e1ZML/RtspCamera.html. Could you send me a copy? My email address is [email protected]. thanks!

liuyaoCS avatar Feb 26 '16 02:02 liuyaoCS

Dear amitaymolko, I am tying to send the camera stream to my Darwin server. I can't visit http://www.4shared.com/rar/cm2e1ZML/RtspCamera.html. Could you send me a copy? My email address is [email protected]. thanks!

The link seems to be working for me @liuyaoCS

andresteves avatar Feb 26 '16 10:02 andresteves