-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No RTP data #14
Comments
I've inspected the packets with wireshark and I discovered that if I put the username and password before, like I did, no packet is sent to the IP. If I take it off, some packets are sent (TCP SYN/ACK I guess) but nothing more happens (I think the ack fails) and I get the same output as above |
Ok I figured out I was using common_example which opens a HTTP fowarder. I tried complete_example and it showed a bunch of RTSP information from the camera, but in the end it does:
However while it does this, I can see a lot of packets coming from the camera, which are certainly RTP packets |
Here's the entire thing:
|
Could you do me a favour by sending the packets captured by wireshark to [email protected]? |
Thanks, I've just sent you. I'm also trying to figure out where the problem comes from but I'm having to learn the interns of the library first |
I've sent you some weird open vpn captures, I don't know why it made this way. I've just sent you the correct one now, which shows the RTSP messages clearly |
Sorry, I think both the captures include Open VPN Just pick the last one I sent and add the filter ip.addr==192.168.1.72 which is the IP of my camera thank you and sorry for the confusion |
I've found something important.
gets called, not the TCP version. But I remember these cameras working in TCP only. I think the program is trying to listen for UDP RDP packets but the camera is sending TCP ones. I'm still strying to find where the program decides if the camera uses TCP or UDP |
I also noticed the line
but not coming from the camera to the ports 10330, 10331, 39110, 39111 (don't know which one it was supposed to be). Looks like the camera isn't sending RTP packets to these ports. The only port the camera communicates with is the one used to send the initial RTSP message. So I guess these are the 2 problems: one is that the session being open by the program is a UDP one, and the other is that the camera isn't sending RTP packets to the ports it said it would. Now I need to determine why, because this camera works with other RTSP libraries (at least it works with tinyCamMonitor on Android) |
“Transport of RTP over TCP can be done in two ways: over independent TCP connections using [RFC4571] or interleaved in the RTSP connection”(https://tools.ietf.org/html/rfc7826#page-279) Maybe it use RTSP-over-http (https://opensource.apple.com/source/QuickTimeStreamingServer/QuickTimeStreamingServer-412.42/Documentation/RTSP_Over_HTTP.pdf) which myRtspClient implemented. |
I just captured tinyCamMonitor traffic and it's very similar to the traffic seen by your program. It is simply sending the packets through TCP, but to the same port it used for RTSP. please filter it by doing
I'm sending the firefox send link through email (the archive is heavy now because it contains the video) |
After looking into the RTSP packets, I found it had nothing to do with TCP. Maybe it's the upper layer protocol(ONVIF) that determines TCP or UDP which I know little about. I'll implements the feature soon.
Replace line 1525 in myRtspClient/rtspClient.cpp with: |
I got this error:
Could you explain what you found to be the problem? Maybe I can help add this feature. I didn't understand what you meant by 'it had nothing to do with TCP' and then you suggest the problem is that ONVIF determines what is TCP. What feature you talking about implementing? |
I am so sorry that I made it unclear. You can change the function like this(start from line 1522 in rtspClient.cpp): Just like you found above, the library expects UDP packets but get TCP ones. The tinyCamMonitor works fine because when it sends RTSP "SETUP" it says "give me TCP"(Transport: RTP/AVP/TCP;unicast;interleaved=0-1): I don't know why tinyCamMonitor knows it has to use TCP, not UDP. Maybe ONVIF tells it. If you want it works in your situation, you could try the code above. |
With the modification you suggested, the camera traffic stops after the RTSP describe, when I try the http tunnel example. If the problem is that I'm getting UDP packets, why did you suggest to use an http tunnel? Also, I figured out before that the problem was that the program was creating a
to
which effectively created a I want to help in making Vstarcam cameras compatible because they're the top seller in aliexpress, so it'd be great for this library, and I'm also thinking in bulding something on top of this library (which will be open source of course) |
Http tunnelling is the only situation that MyRtspClient use TCP. But it creates two sockets for sending and receiving respectively, which is not compitable with the camera that only use one socket. I will try to add this feature soon. |
Ok, thank you for your help. If I understood right, it's all a matter of using when creating the object Then we need to create a rule for Am I right? I could kinda implement that, or at least help you. I'm very intersted in helping make this library compatible with lots of cameras because live555 is a giant mess and I really want to use this to make a cool NVR for my cameras |
Just now, I commit some code for trial. You can look into common_example.cpp for help. The key is DoSETUP. |
Thank you. I just sent you the wireshark capture of me using the http tunneling example but I've just read and you tell me to use common_example. I get
|
Well, I've exchanged the first lines of complete example with common example and it worked, I got an image. It is a little buggy in the end though: https://imgur.com/a/rKlTmXi (please ignore my last email with the wireshark capture) Do you know why the image is like that? |
Maybe you can try to enlarge the buffer, please refer to issue #6 |
I am also getting a "No RTP Data" on certain types of AXIS cameras running latest firmware, but the cause for this looks different than the one discussed above. Console output:
RTSP handshake captured by Wireshark:
An attempt to narrow it down:
|
Thanks. |
I'm trying to save a video from my vstarcam camera and I'm gettind this "no such media session" error. Could it be a bug in the camera's RTSP server?
The text was updated successfully, but these errors were encountered: