Git Product home page Git Product logo

rtsp-camera-for-android's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtsp-camera-for-android's Issues

is this compatible with wowza server?

hey, can you please update this lib to wowza server?
and i just dont know how to integrate it into my app, would you please give me example ? thanks in advance

the APP does not work

Hi
I have build and run RtspViewer.but it launch is black screen,and no menu,no tip,no anything.I try it at android5.1 and android4.3.So how to run correctly this APP?Please help me.

Streaming Video To Android Device

I've downloaded and installed the application as is. However, I can't get the stream to play. I tried using the hardcoded rtspConnect string "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov" in RtspViewerActivity.java and I've used the link to my own IP camera and neither of them worked even though I got both of the streams to play using VLC and Quicktime.

Streaming between two Android devices

Hello, I can not stream video between two Android devices. I have followed all the directions I founded here without any success. I have:

Hardware: 2 x Nexus 3
Software: Android 4.1.2 (both devices)

One device runs RtspCamera project (D1) and the another device (D2) the RtspViewer project.

D1 ip is 192.168.0.200
D2 ip is 192.168.0.199

Step 1

I have tried to use VLC at url rtsp://192.168.0.200:8080/video but I can not see anything. VLC does not show any error, neither the device log.

Step 2

Next I tried D2 with the same url:

   private String rtspConnect = "rtsp://192.168.0.200:8080/video";

Same results: no error logs neither video, just black screen.

I have been debugging and I found that the client waits for sdp file to be created (state READY), but that never happens and I don´t know why. The thing is the RtspViewer code get stucked in:

RtpVideoRenderer.java at line 155:

   while (rtspControl.getState() != RtspConstants.READY) {
        ; // blocking
    }

Do you know what could be the problem?

If you need more info just tell me.

Thanks

How can I set username and password?

Hi.
I want to play IP camera support RTSP protocal, but the camera has username and password.
How cam I set the username and password in the RtpVideoRenderer object?
Please help me.
Thanks.

Could not get RTSP Server work with VLC

UPDATED

Actually, I am kind of a newbie on android. As I am trying to find an rtsp server implementation for android, I figured out that your work is great! Thank you for sharing it. Now I am trying to adopt it for my project.

I compiled the rtspcamera and upload to samsung galaxy ace (Android 2.3.3). I am basically trying to stream live video from the phone camera. So I tried to run RtspNativeCodecsCamera. It starts good. Once I ask VLC player to connect and play (with URL of "rtsp://192.168.1.5/8080/") but I get nothing played. please help me on this as I probably dont know how to setup applications. logcat report is as follow:

08-12 15:38:11.329: D/RTSPNativeCamera(19306): onCreate
08-12 15:38:11.349: W/dalvikvm(19306): No implementation found for native Lcom/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h264/encoder/NativeH264Encoder;.InitEncoder (III)I
08-12 15:38:11.349: V/[RCS]RtspVideoRecorder: Player error: InitEncoder
08-12 15:38:11.349: D/RTSPNativeCamera(19306): onResume
08-12 15:38:11.349: D/RTSPNativeCamera(19306): RtspServer started
08-12 15:38:12.229: D/RTSPNativeCamera(19306): surfaceCreated
08-12 15:38:12.229: D/RTSPNativeCamera(19306): surfaceChanged
08-12 15:38:12.229: D/RTSPNativeCamera(19306): initializePreview
08-12 15:38:12.249: D/RTSPNativeCamera(19306): startPreview
08-12 15:38:12.249: D/RtspVideoRecorder(19306): start
08-12 15:38:14.429: I/RtspServer(19202): requestLine: OPTIONS rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:14.429: I/RtspServer(19202): CSeq: 2
08-12 15:38:14.429: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:14.429: I/RtspServer(19202):
08-12 15:38:14.449: I/RtspServer(19202): requestLine: DESCRIBE rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:14.449: I/RtspServer(19202): CSeq: 3
08-12 15:38:14.449: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:14.449: I/RtspServer(19202): Accept: application/sdp
08-12 15:38:14.449: I/RtspServer(19202):
08-12 15:38:14.519: I/RtspServer(19202): requestLine: SETUP rtsp://192.168.1.5:8080/trackID=1 RTSP/1.0
08-12 15:38:14.519: I/RtspServer(19202): CSeq: 4
08-12 15:38:14.519: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:14.519: I/RtspServer(19202): Transport: RTP/AVP;unicast;client_port=4000-4001
08-12 15:38:14.519: I/RtspServer(19202):
08-12 15:38:14.539: I/RtspServer(19202): requestLine: PLAY rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:14.539: I/RtspServer(19202): CSeq: 5
08-12 15:38:14.539: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:14.539: I/RtspServer(19202): Session: 1140424041
08-12 15:38:14.539: I/RtspServer(19202): Range: npt=0.000-
08-12 15:38:14.539: I/RtspServer(19202):
08-12 15:38:14.539: I/RtspServer(19202): request: PLAY
08-12 15:38:25.269: I/RtspServer(19202): requestLine: TEARDOWN rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:25.269: I/RtspServer(19202): CSeq: 6
08-12 15:38:25.269: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:25.269: I/RtspServer(19202): Session: 1140424041
08-12 15:38:25.269: I/RtspServer(19202):
08-12 15:38:25.299: I/RtspServer(19202): requestLine: OPTIONS rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:25.299: I/RtspServer(19202): CSeq: 2
08-12 15:38:25.299: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:25.299: I/RtspServer(19202):
08-12 15:38:25.339: I/RtspServer(19202): request: TEARDOWN
08-12 15:38:25.359: W/System.err(19202): java.net.SocketException: Socket closed
08-12 15:38:25.359: W/System.err(19202): at org.apache.harmony.luni.platform.OSNetworkSystem.read(Native Method)
08-12 15:38:25.359: W/System.err(19202): at dalvik.system.BlockGuard$WrappedNetworkSystem.read(BlockGuard.java:273)
08-12 15:38:25.359: W/System.err(19202): at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:458)
08-12 15:38:25.359: W/System.err(19202): at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:85)
08-12 15:38:25.359: W/System.err(19202): at java.io.InputStreamReader.read(InputStreamReader.java:255)
08-12 15:38:25.359: W/System.err(19202): at java.io.BufferedReader.fillBuf(BufferedReader.java:128)
08-12 15:38:25.359: W/System.err(19202): at java.io.BufferedReader.read(BufferedReader.java:236)
08-12 15:38:25.359: W/System.err(19202): at de.kp.net.rtsp.server.response.Parser.readRequest(Parser.java:31)
08-12 15:38:25.359: W/System.err(19202): at de.kp.net.rtsp.server.RtspServer$ServerThread.getRequestType(RtspServer.java:285)
08-12 15:38:25.359: W/System.err(19202): at de.kp.net.rtsp.server.RtspServer$ServerThread.run(RtspServer.java:221)
08-12 15:38:25.359: I/RtspServer(19202): requestLine:
08-12 15:38:25.359: W/System.err(19202): java.net.SocketException: Socket closed
08-12 15:38:25.409: I/RtspServer(19202): requestLine: DESCRIBE rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:25.409: I/RtspServer(19202): CSeq: 3
08-12 15:38:25.409: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:25.409: I/RtspServer(19202): Accept: application/sdp
08-12 15:38:25.409: I/RtspServer(19202):
08-12 15:38:25.409: W/System.err(19202): at org.apache.harmony.luni.platform.OSNetworkSystem.write(Native Method)
08-12 15:38:25.409: W/System.err(19202): at dalvik.system.BlockGuard$WrappedNetworkSystem.write(BlockGuard.java:284)
08-12 15:38:25.409: W/System.err(19202): at org.apache.harmony.luni.net.PlainSocketImpl.write(PlainSocketImpl.java:472)
08-12 15:38:25.409: W/System.err(19202): at org.apache.harmony.luni.net.SocketOutputStream.write(SocketOutputStream.java:57)
08-12 15:38:25.409: W/System.err(19202): at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:164)
08-12 15:38:25.409: W/System.err(19202): at java.io.BufferedWriter.flush(BufferedWriter.java:128)
08-12 15:38:25.409: W/System.err(19202): at de.kp.net.rtsp.server.RtspServer$ServerThread.run(RtspServer.java:227)
08-12 15:38:25.409: I/System.out(19202): Caught java.net.SocketException: Socket closed - closing thread
08-12 15:38:25.419: I/RtspServer(19202): requestLine: SETUP rtsp://192.168.1.5:8080/trackID=1 RTSP/1.0
08-12 15:38:25.419: I/RtspServer(19202): CSeq: 4
08-12 15:38:25.419: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:25.419: I/RtspServer(19202): Transport: RTP/AVP/TCP;unicast;interleaved=0-1
08-12 15:38:25.419: I/RtspServer(19202):
08-12 15:38:25.429: I/RtspServer(19202): requestLine: PLAY rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:25.429: I/RtspServer(19202): CSeq: 5
08-12 15:38:25.429: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:25.429: I/RtspServer(19202): Session: 1034375957
08-12 15:38:25.429: I/RtspServer(19202): Range: npt=0.000-
08-12 15:38:25.429: I/RtspServer(19202):
08-12 15:38:25.439: I/RtspServer(19202): request: PLAY
08-12 15:38:36.119: I/RtspServer(19202): requestLine: $�??�????�??�?????�??�?� msmainbox??$�??�????�??�?????�??�?� msmainbox??TEARDOWN rtsp://192.168.1.5:8080/ RTSP/1.0
08-12 15:38:36.119: I/RtspServer(19202): CSeq: 6
08-12 15:38:36.119: I/RtspServer(19202): User-Agent: LibVLC/2.0.2 (LIVE555 Streaming Media v2011.12.23)
08-12 15:38:36.119: I/RtspServer(19202): Session: 1034375957
08-12 15:38:36.119: I/RtspServer(19202):
08-12 15:38:36.149: I/RtspServer(19202): requestLine: $�??�????�??�?????�??�?
08-12 15:38:36.149: W/System.err(19202): java.lang.NullPointerException
08-12 15:38:36.149: W/System.err(19202): at de.kp.net.rtsp.server.response.Parser.getCseq(Parser.java:120)
08-12 15:38:36.149: W/System.err(19202): at de.kp.net.rtsp.server.RtspServer$ServerThread.getRequestType(RtspServer.java:302)
08-12 15:38:36.149: W/System.err(19202): at de.kp.net.rtsp.server.RtspServer$ServerThread.run(RtspServer.java:221)
08-12 15:38:36.149: I/System.out(19202): Caught java.lang.NullPointerException - closing thread
08-12 15:38:40.539: W/System.err(19202): java.net.SocketException: Socket closed
08-12 15:38:40.539: W/System.err(19202): at org.apache.harmony.luni.platform.OSNetworkSystem.accept(Native Method)
08-12 15:38:40.539: W/System.err(19202): at dalvik.system.BlockGuard$WrappedNetworkSystem.accept(BlockGuard.java:262)
08-12 15:38:40.539: W/System.err(19202): at org.apache.harmony.luni.net.PlainSocketImpl.accept(PlainSocketImpl.java:92)
08-12 15:38:40.539: W/System.err(19202): at java.net.ServerSocket.implAccept(ServerSocket.java:264)
08-12 15:38:40.539: W/System.err(19202): at java.net.ServerSocket.accept(ServerSocket.java:150)
08-12 15:38:40.539: W/System.err(19202): at de.kp.net.rtsp.server.RtspServer.run(RtspServer.java:76)
08-12 15:38:40.539: W/System.err(19202): at java.lang.Thread.run(Thread.java:1019)
08-12 15:38:40.549: D/RTSPNativeCamera(19202): surfaceDestroyed

RtspViewer freezes on Galaxy S4

I tried RtspViewer on S4 using this stream
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov

Application opens and then freezes with black screen

All I have in LogCat is
10-08 12:46:16.336: I/dalvikvm(24967): Turning on JNI app bug workarounds for target SDK version 10...
10-08 12:46:16.371: I/RtspViewer(24967): onCreate

rtsp stream is playable in VCL

I can't work it,help me

I just import the project and setup the rtsp camera but I can't recieve with vlc in pc . The error is java.net.SocketException: sendto failed: EPIPE (Broken pipe) can you help me

Does not work

Hi masters
I have succesfully build RtspCamera. But when i run RtspNativeCodecsCamera it shows camera. But if i connect to the server from browser(http://IP:8080/) i can not see camera capture.

Can't change frame width/height

I've tried to set RtspConstants.WIDTH and .HEIGHT but no luck. It shows picture if width=352 and height = 288 (default value), but shows red-green-blue corrupted image if set another values. The values i've tried are from camera parameters getSupportedPreviewSizes();

USB Camera support

Is this able to support USB camera devices? I have a USB camera app setup using this library and I would like stream video feed in RSTP for web browsers. Is this possible?

NetworkOnMainThreadException

I tested this app on my nexus 7 and i got NetworkOnMainThreadException. What do you think about it? Did you test app on android >3.0?

Viewer not playing any RTSP link.

I have run RTSP viewer demo and try to run two or three RTSP link but not playing any llink in viewer.
Please let me guidance how i can check this library.

Huge Delay

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.