[Live-devel] UDP packets appear to be empty, forcing switch to TCP in VLC

Dave McMordie mcmordie at viionsystems.com
Wed May 6 14:49:47 PDT 2015


Hi,

Great library; thanks for the years of hard work which have gone into it.

I have a live555 on-demand RTSP server running locally (this is an older
version from about 2013), streaming H.264 video (compressed by ffmpeg or a
hardware codec depending on where I run the code).  With VLC, when I start
the stream nothing happens for 10-15 seconds, then:

live555 warning: no data received in 10s. Switching to TCP

After that, the stream plays fine in TCP mode.

So I switched to openRTSP to get some more info:

openRTSP -d 30 -q -w 640 -h 480 -f 30 -Q -n -l rtsp://127.0.0.1:5640 >
test.mov

The results are below, but I don't see any issues or explanations of why I
get no data in UDP mode.  If I add the -t switch, I get a perfect video;
no issues (same as VLC).

Some things I have checked:

1. fPresentationTime is a UTC timestamp which corresponds to now (in UTC).
I get it from gettimeofday().
2. OutPacketBuffer::maxSize = 20000;
3. Wireshark shows a deluge of RTP packets mostly of full MTU size, with
correct timestamps (relative to 1900)
 (I have to run the same code on another machine to use Wireshark, but the
situation is identical on the other machine in terms of UDP RTP packets
not being received.)
4. Tracing into live555, I see that in MultiFramedRTPSource the condition
bPacket->dataSize() is always zero, so the packet is always being skipped.

I have dug through the mailing list and FAQ for related thoughts, but have
exhausted the leads I could find.  Any thoughts on what could cause my
stream to completely not work on UDP while working fine on TCP, given that
Wireshark tells me I'm getting the packets?

Thanks,

Dave McMordie
Viion Systems

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>

Opening connection to 127.0.0.1, port 5640...
...remote connection opened
Sending request: OPTIONS rtsp://127.0.0.1:5640/ RTSP/1.0
CSeq: 2
User-Agent: openRTSP (LIVE555 Streaming Media v2013.11.10)


Received 152 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, May 06 2015 21:33:04 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER,
SET_PARA
METER


Sending request: DESCRIBE rtsp://127.0.0.1:5640/ RTSP/1.0
CSeq: 3
User-Agent: openRTSP (LIVE555 Streaming Media v2013.11.10)
Accept: application/sdp


Received 701 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, May 06 2015 21:33:04 GMT
Content-Base: rtsp://127.0.0.1:5640//
Content-Type: application/sdp
Content-Length: 545

v=0
o=- 1430946702221281 1 IN IP4 169.254.222.174
s=Session streamed by the  camera
i=TrafficCam
t=0 0
a=tool:LIVE555 Streaming Media v2013.11.10
a=type:broadcast
a=control:*
a=source-filter: incl IN IP4 * 169.254.222.174
a=rtcp-unicast: reflection
a=range:npt=0-
a=x-qt-text-nam:Session streamed by the  camera
a=x-qt-text-inf:TrafficCam
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:20000
a=rtpmap:96 H264/90000
a=fmtp:96
packetization-mode=1;profile-level-id=4D401E;sprop-parameter-sets=Z01A
HvIBQHtC,AgAAAwA=
a=control:track1

Opened URL "rtsp://127.0.0.1:5640/", returning a SDP description:
v=0
o=- 1430946702221281 1 IN IP4 169.254.222.174
s=Session streamed by the  camera
i=TrafficCam
t=0 0
a=tool:LIVE555 Streaming Media v2013.11.10
a=type:broadcast
a=control:*
a=source-filter: incl IN IP4 * 169.254.222.174
a=rtcp-unicast: reflection
a=range:npt=0-
a=x-qt-text-nam:Session streamed by the  camera
a=x-qt-text-inf:TrafficCam
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:20000
a=rtpmap:96 H264/90000
a=fmtp:96
packetization-mode=1;profile-level-id=4D401E;sprop-parameter-sets=Z01A
HvIBQHtC,AgAAAwA=
a=control:track1

Created receiver for "video/H264" subsession (client ports 52098-52099)
Sending request: SETUP rtsp://127.0.0.1:5640//track1 RTSP/1.0
CSeq: 4
User-Agent: openRTSP (LIVE555 Streaming Media v2013.11.10)
Transport: RTP/AVP;unicast;client_port=52098-52099


Received 197 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 4
Date: Wed, May 06 2015 21:33:04 GMT
Transport:
RTP/AVP;unicast;destination=127.0.0.1;source=127.0.0.1;client_port=52
098-52099;server_port=6970-6971
Session: DCBED02C


Setup "video/H264" subsession (client ports 52098-52099)
Sending request: PLAY rtsp://127.0.0.1:5640// RTSP/1.0
CSeq: 5
User-Agent: openRTSP (LIVE555 Streaming Media v2013.11.10)
Session: DCBED02C
Range: npt=0.000-30.000


Received 176 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 5
Date: Wed, May 06 2015 21:33:04 GMT
Range: npt=0.000-
Session: DCBED02C
RTP-Info: url=rtsp://127.0.0.1:5640//track1;seq=12456;rtptime=167112322


Started playing session
Receiving streamed data (for up to 30.000000 seconds)...
begin_QOS_statistics
subsession      video/H264
num_packets_received    0
num_packets_lost        0
elapsed_measurement_time        30.000364
kBytes_received_total   0.000000
measurement_sampling_interval_ms        1000
kbits_per_second_min    unavailable
kbits_per_second_ave    unavailable
kbits_per_second_max    unavailable
packet_loss_percentage_min      100.000000
packet_loss_percentage_ave      100.000000
packet_loss_percentage_max      100.000000
end_QOS_statistics
Sending request: TEARDOWN rtsp://127.0.0.1:5640// RTSP/1.0
CSeq: 6
User-Agent: openRTSP (LIVE555 Streaming Media v2013.11.10)
Session: DCBED02C


Received 65 new bytes of response data.
Received a complete TEARDOWN response:
RTSP/1.0 200 OK
CSeq: 6
Date: Wed, May 06 2015 21:33:34 GMT

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

ffprobe 127.0.0.1 returns the following (in case that adds anything):

[h264 @ 0000000000344f20] Truncated VUI
[h264 @ 0000000000344f20] Ignoring NAL 2 in global header/extradata
[h264 @ 0000000000344f20] Truncated VUI
[h264 @ 0000000000344f20] Ignoring NAL 2 in global header/extradata
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
[h264 @ 0000000000344f20] non-existing PPS referenced
[h264 @ 0000000000344f20] non-existing PPS 0 referenced
[h264 @ 0000000000344f20] decode_slice_header error
[h264 @ 0000000000344f20] no frame!
Input #0, rtsp, from 'rtsp://127.0.0.1:5640':
  Metadata:
    title           : Session streamed by the  camera
    comment         : TrafficCam
  Duration: N/A, start: 0.060011, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p, 640x480, 30 fps, 49.67 tbr,
90k tb
n, 60 tbc
[h264 @ 00000000003da980] Truncated VUI
[h264 @ 00000000003da980] Ignoring NAL 2 in global header/extradata


More information about the live-devel mailing list