[FFserver-user] ffserver RTSP SEND Response port number for RTCP incorrect?

Joe Kreidler joek at optimaldesignco.com
Mon Jan 7 22:52:11 CET 2013


I am running ffserver on Ubuntu 12.04LTS and VLC on the same machine
and I have found a peculiar behaviour with the RTSP SETUP request and
response. This is causing streaming sessions to be stopped.

Analyzing the RTSP protocol units, I noticed that ffserver is returning an
RTP port number and RTCP port number that are not sequential.  Here is
the SETUP message and the response.

----------

SETUP rtsp://10.10.10.143:7654/4Di.sdp/streamid=0 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
Transport: RTP/AVP;unicast;client_port=56480-56481


RTSP/1.0 200 OK
CSeq: 4
Date: Mon, 07 Jan 2013 20:58:55 GMT
Session: 43c3ae8b56e81cd5
Transport:
RTP/AVP/UDP;unicast;client_port=56480-56481;server_port=41558-45069

----------

The VLC client uses sequential port numbers as I would expect but ffserver
does not (rtp port is 41558 and rtcp port is 45069). This is resulting
in an ICMP message since the VLC client is trying to use an unused port at
the server. Here is the wireshark trace:

===========

Frame 3841: 72 bytes on wire (576 bits), 72 bytes captured (576 bits)
Internet Protocol Version 4, Src: 10.10.10.143 (10.10.10.143), Dst:
10.10.10.143 (10.10.10.143)
User Datagram Protocol, Src Port: 45069 (45069), Dst Port: 56481 (56481)
Real-time Transport Control Protocol (Sender Report)

Frame 6803: 112 bytes on wire (896 bits), 112 bytes captured (896 bits)
Internet Protocol Version 4, Src: 10.10.10.143 (10.10.10.143), Dst:
10.10.10.143 (10.10.10.143)
User Datagram Protocol, Src Port: 56481 (56481), Dst Port: 41559 (41559)
Real-time Transport Control Protocol (Receiver Report)
Real-time Transport Control Protocol (Source description)

Frame 6804: 140 bytes on wire (1120 bits), 140 bytes captured (1120 bits)
Internet Control Message Protocol
    Type: 3 (Destination unreachable)
    Code: 3 (Port unreachable)
    Internet Protocol Version 4, Src: 10.10.10.143 (10.10.10.143), Dst:
10.10.10.143 (10.10.10.143)
    User Datagram Protocol, Src Port: 56481 (56481), Dst Port: 41559 (41559)
    Real-time Transport Control Protocol (Receiver Report)
    Real-time Transport Control Protocol (Source description)

===========

VLC is expecting the RTCP port to be 1 more than the RTP port and this
is not how ffserver is running.  Is there some ffserver configuration
or build option to correct this behavior or is this a bug?

FYI, I am using the latest and greatest ffmpeg/ffserver code (V1.1), which I
downloaded and built today (07Jan2013)

> ffserver -version
ffserver version N-47704-gc3bb333
built on Jan  7 2013 12:27:46 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --disable-stripping --enable-gpl --enable-libx264
--enable-nonfree --enable-version3
libavutil      52. 13.100 / 52. 13.100
libavcodec     54. 86.100 / 54. 86.100
libavformat    54. 59.106 / 54. 59.106
libavdevice    54.  3.102 / 54.  3.102
libavfilter     3. 32.100 /  3. 32.100
libswscale      2.  1.103 /  2.  1.103
libswresample   0. 17.102 /  0. 17.102
libpostproc    52.  2.100 / 52.  2.100


Any insights or ideas would be greatly appreciated.

Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/ffserver-user/attachments/20130107/2907e26b/attachment.html>


More information about the ffserver-user mailing list