Forwarding RTSP / RTP over a one-way UDP interface

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
ooterness
New Cone
New Cone
Posts: 4
Joined: 02 Sep 2010 23:58

Forwarding RTSP / RTP over a one-way UDP interface

Postby ooterness » 03 Sep 2010 00:22

I have a rather unusual technical question relating to the RTSP and RTP protocols.

We're using an Ethernet-based video camera that supports the RTSP protocol. (Trendnet TV-IP522P) If I use VLC to initiate the RTSP connection, then everything works fine: I get audio and video, and everything looks great.

The problem is that this is going to be part of an wireless system, which will only be able to forward UDP packets over a one-way link. The original design called for a PC on the camera side to initiate the RTSP connection (TCP/IP), then forward the resulting RTP video stream (UDP) over the one-way link.

I used WireShark to sniff the RTSP packets that VLC sends out to negotiate the connection (I'll post them in a moment). If I send out the same packets using Telnet, then I can see that the camera starts sending out RTP/UDP packets at the expected data rate. The video and audio streams are on two separate UDP ports (it changes every time, but always N and N+2). However, when I try to open the stream in VLC, I can get audio to work but never video. Looking at the Messages window, it's like the video stream doesn't exist at all.

(Quick note: The camera is 192.168.10.30 and the PC running VLC is 192.168.10.31. They are alone on the subnet.)

I've tried a couple cases:
1) Open port N using rtp://@192.168.10.31:1846 --> Nothing
2) Open port N+2 using rtp://@192.168.10.31:1848 --> Audio works, no video
3) Open both MRLs using the "Play another media synchronously" option --> Audio works, no video

Symptoms are the same for VLC 1.1.0 and 1.1.4. In case it's relevant, I'm using WinXP32-SP2.

Any idea why it works with RTSP but not with RTP, given that I send out the same RTSP packets? I can see the UDP packets coming in, but just can't get VLC to display the video stream.

Rémi Denis-Courmont
Developer
Developer
Posts: 15326
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Forwarding RTSP / RTP over a one-way UDP interface

Postby Rémi Denis-Courmont » 03 Sep 2010 02:45

My best guess is, the video stream is using a dynamic RTP payload format, and therefore VLC cannot determine what the video codec. There are three ways out: make VLC open an SDP file with the proper codec information (you will need the live555 plugin); multiplex both audio and video over a single RTP/MPEG-TS stream; or use a MPEG-2 as the video codec.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ooterness
New Cone
New Cone
Posts: 4
Joined: 02 Sep 2010 23:58

Re: Forwarding RTSP / RTP over a one-way UDP interface

Postby ooterness » 03 Sep 2010 04:42

Thank you! I looked at the video-stream RTP packets, and they're all marked as payload type 99 (DynamicRTP), as you suspected.

I ran the sniffer again, picked out the RTSP DESCRIBE reply, and used that as a baseline .sdp file. I filled in the UDP port numbers for each stream to get the final file, included below.

Sadly, the message trace now includes the message "sap debug: Multiple media ports not supported -> live555". No video yet, but you've definitely got me on the right track. :)

I will look into finding some way to rig the MPEG-TS multiplexing. Or maybe fill in the codec type on the video packets.



My attempt at a .sdp file to specify the codec information:

v=0
o=CV-RTSPHandler 1123412 0 IN IP4 192.168.10.30
s=Trendnet TV-IP522P
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=now-
a=control:*
a=etag:1234567890
m=video 1846 RTP/AVP 96
b=AS:18
a=rtpmap:96 MP4V-ES/90000
a=control:trackID=1
a=fmtp:96 profile-level-id=1;config=000001b001000001b509000001000000012000c488800550a041e1463f; decode_buf=76800
a=sendonly
m=audio 1848 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=control:trackID=2
a=sendonly


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 75 guests