I am running ffserver on Ubuntu 12.04LTS and VLC on the same machine<br>and I have found a peculiar behaviour with the RTSP SETUP request and<br>response. This is causing streaming sessions to be stopped.<br><br>Analyzing the RTSP protocol units, I noticed that ffserver is returning an<br>

RTP port number and RTCP port number that are not sequential.  Here is<br>the SETUP message and the response.<br><br>----------<br><br>SETUP rtsp://<a href="http://10.10.10.143:7654/4Di.sdp/streamid=0">10.10.10.143:7654/4Di.sdp/streamid=0</a> RTSP/1.0<br>

CSeq: 4<br>User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)<br>Transport: RTP/AVP;unicast;client_port=56480-56481<br><br><br>RTSP/1.0 200 OK<br>CSeq: 4<br>Date: Mon, 07 Jan 2013 20:58:55 GMT<br>Session: 43c3ae8b56e81cd5<br>

Transport: RTP/AVP/UDP;unicast;client_port=56480-56481;server_port=41558-45069<br><br>----------<br><br>The VLC client uses sequential port numbers as I would expect but ffserver<br>does not (rtp port is 41558 and rtcp port is 45069). This is resulting<br>

in an ICMP message since the VLC client is trying to use an unused port at<br>the server. Here is the wireshark trace:<br><br>===========<br><br>Frame 3841: 72 bytes on wire (576 bits), 72 bytes captured (576 bits)<br>Internet Protocol Version 4, Src: 10.10.10.143 (10.10.10.143), Dst: 10.10.10.143 (10.10.10.143)<br>

User Datagram Protocol, Src Port: 45069 (45069), Dst Port: 56481 (56481)<br>Real-time Transport Control Protocol (Sender Report)<br><br>Frame 6803: 112 bytes on wire (896 bits), 112 bytes captured (896 bits)<br>Internet Protocol Version 4, Src: 10.10.10.143 (10.10.10.143), Dst: 10.10.10.143 (10.10.10.143)<br>

User Datagram Protocol, Src Port: 56481 (56481), Dst Port: 41559 (41559)<br>Real-time Transport Control Protocol (Receiver Report)<br>Real-time Transport Control Protocol (Source description)<br><br>Frame 6804: 140 bytes on wire (1120 bits), 140 bytes captured (1120 bits)<br>

Internet Control Message Protocol<br>    Type: 3 (Destination unreachable)<br>    Code: 3 (Port unreachable)<br>    Internet Protocol Version 4, Src: 10.10.10.143 (10.10.10.143), Dst: 10.10.10.143 (10.10.10.143)<br>    User Datagram Protocol, Src Port: 56481 (56481), Dst Port: 41559 (41559)<br>

    Real-time Transport Control Protocol (Receiver Report)<br>    Real-time Transport Control Protocol (Source description)<br><br>===========<br><br>VLC is expecting the RTCP port to be 1 more than the RTP port and this<br>

is not how ffserver is running.  Is there some ffserver configuration<br>or build option to correct this behavior or is this a bug?<br><br>FYI, I am using the latest and greatest ffmpeg/ffserver code (V1.1), which I<br>downloaded and built today (07Jan2013)<br>

<br>> ffserver -version<br>ffserver version N-47704-gc3bb333<br>built on Jan  7 2013 12:27:46 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)<br>configuration: --disable-stripping --enable-gpl --enable-libx264 --enable-nonfree --enable-version3<br>

libavutil      52. 13.100 / 52. 13.100<br>libavcodec     54. 86.100 / 54. 86.100<br>libavformat    54. 59.106 / 54. 59.106<br>libavdevice    54.  3.102 / 54.  3.102<br>libavfilter     3. 32.100 /  3. 32.100<br>libswscale      2.  1.103 /  2.  1.103<br>

libswresample   0. 17.102 /  0. 17.102<br>libpostproc    52.  2.100 / 52.  2.100<br><br><br>Any insights or ideas would be greatly appreciated.<br><br>Joe<br><br>