[Live-devel] How to get testOnDemandRTSPServer (unicast) to take a live h.264 feed coming from a UDP port

Shyam Kaundinya shyam.kaundinya at digitalforcetech.com
Thu Oct 24 15:21:10 PDT 2019


My goal is to modify testOnDemandRTSPServer (unicast) to take a live h.264 feed coming from a UDP port.
As per : http://www.live555.com/liveMedia/faq.html#liveInput-unicast I sub-classed H264VideoFileServerMediaSubsession and replaced the ByteStreamFileSource with BasicUDPSource  as input source to H264VideoStreamFramer and set reuseFirstSource to True

When I run the testRTSPClient (with some mods - with debug prints enabled and #define REQUEST_STREAMING_OVER_TCP False and a DUMMY_SINK_RECEIVE_BUFFER_SIZE which is 2MB as my iframes are at times > 1M), to test the stream, it gets a few frames (I think Pframes based on their size) and then frames just stop, I see only RTCP messages from that point on. Log below.

If what is expected on the UDP port is in the format Start Code + SPS + Start Code + PPS + Start Code + I Frame + Start Code + PFrame, it seems to me that simply replacing ByteFileSource with BasicUDPSource should work the same way - no ?
What am I missing ?
How do I debug this ?


  *   testRTSPClientUdp.exe rtsp://192.168.1.238:8755/stream=5
Opening connection to 192.168.1.238, port 8755...
...remote connection opened
Sending request: DESCRIBE rtsp://192.168.1.238:8755/stream=5 RTSP/1.0
CSeq: 2
User-Agent: testRTSPClientUdp.exe (LIVE555 Streaming Media v2016.10.11)
Accept: application/sdp


Received 679 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 2
Date: Thu, Oct 24 2019 20:58:57 GMT
Content-Base: rtsp://192.168.1.238:8755/stream=5/
Content-Type: application/sdp
Content-Length: 511

v=0
o=- 1571950589502848 1 IN IP4 192.168.1.238
s=Session streamed by "testOnDemandRTSPServer"
i=stream=5
t=0 0
a=tool:LIVE555 Streaming Media v2018.09.18
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testOnDemandRTSPServer"
a=x-qt-text-inf:stream=5
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=420033;sprop-parameter-sets=Z0IAM5Y1QHgAh9gLcBAQFAAAD6QAA6mCEA==,aM48gA==
a=control:track1

[URL:"rtsp://192.168.1.238:8755/stream=5/"]: Got a SDP description:
v=0
o=- 1571950589502848 1 IN IP4 192.168.1.238
s=Session streamed by "testOnDemandRTSPServer"
i=stream=5
t=0 0
a=tool:LIVE555 Streaming Media v2018.09.18
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testOnDemandRTSPServer"
a=x-qt-text-inf:stream=5
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=420033;sprop-parameter-sets=Z0IAM5Y1QHgAh9gLcBAQFAAAD6QAA6mCEA==,aM48gA==
a=control:track1

RTCPInstance[0000024669211060]::RTCPInstance()
schedule(1.837851->1571950702.290059)
[URL:"rtsp://192.168.1.238:8755/stream=5/"]: Initiated the "video/H264" subsession (client ports 53242-53243)
Sending request: SETUP rtsp://192.168.1.238:8755/stream=5/track1 RTSP/1.0
CSeq: 3
User-Agent: testRTSPClientUdp.exe (LIVE555 Streaming Media v2016.10.11)
Transport: RTP/AVP;unicast;client_port=53242-53243


Received 216 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 3
Date: Thu, Oct 24 2019 20:58:57 GMT
Transport: RTP/AVP;unicast;destination=192.168.1.243;source=192.168.1.238;client_port=53242-53243;server_port=6972-6973
Session: 5ABA2EFC;timeout=65


[URL:"rtsp://192.168.1.238:8755/stream=5/"]: Set up the "video/H264" subsession (client ports 53242-53243)
[URL:"rtsp://192.168.1.238:8755/stream=5/"]: Created a data sink for the "video/H264" subsession
Sending request: PLAY rtsp://192.168.1.238:8755/stream=5/ RTSP/1.0
CSeq: 4
User-Agent: testRTSPClientUdp.exe (LIVE555 Streaming Media v2016.10.11)
Session: 5ABA2EFC
Range: npt=0.000-


[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f11 ecc09c3d a77e1689 00000000 00000000 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
Received 189 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 4
Date: Thu, Oct 24 2019 20:58:57 GMT
Range: npt=0.000-
Session: 5ABA2EFC
RTP-Info: url=rtsp://192.168.1.238:8755/stream=5/track1;seq=61478;rtptime=2810058399


[URL:"rtsp://192.168.1.238:8755/stream=5/"]: Started playing session...
Stream "rtsp://192.168.1.238:8755/stream=5/"; video/H264:       Received 14315 bytes.   Presentation time: 1571950737.925058
Stream "rtsp://192.168.1.238:8755/stream=5/"; video/H264:       Received 36023 bytes.   Presentation time: 1571950737.965058
Stream "rtsp://192.168.1.238:8755/stream=5/"; video/H264:       Received 42342 bytes.   Presentation time: 1571950738.005058
Stream "rtsp://192.168.1.238:8755/stream=5/"; video/H264:       Received 27893 bytes.   Presentation time: 1571950738.045058
Stream "rtsp://192.168.1.238:8755/stream=5/"; video/H264:       Received 28419 bytes.   Presentation time: 1571950738.085058
sending REPORT
sending RTCP packet
81c90007 c2d782d0 1bb0292b ffffffff 0001f08e 0000121e 8f11ecc0 0001c110 81ca0004 c2d782d0 01095753 2d444654 2d323400
schedule(1.664038->1571950703.971727)
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f14 e527c393 a7823c0b 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
schedule(3.343216->1571950707.319028)
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
schedule(6.008030->1571950713.338364)
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f19 98d9945b a788b111 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f1e a6435697 a78fa14d 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
schedule(2.516530->1571950715.869535)
schedule(1.196300->1571950717.074234)
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
reap: checking SSRC 0x1bb0292b: 3 (threshold 0)
schedule(4.590307->1571950721.682518)
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f22 a32fcac9 a7951b53 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
schedule(0.584686->1571950722.270358)
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
schedule(6.020660->1571950728.302468)
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f28 1e746cb9 a79ca26c 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f2c 22f5232d a7a226db 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
schedule(2.629275->1571950730.953275)
schedule(0.047086->1571950731.005591)
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
schedule(3.699081->1571950734.714302)
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f31 f96c3fc4 a7aa2b31 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
schedule(4.221706->1571950738.944316)
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f37 3e99e94b a7b16801 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
sending REPORT
sending RTCP packet
80c90001 c2d782d0 81ca0004 c2d782d0 01095753 2d444654 2d323400
reap: checking SSRC 0x1bb0292b: 9 (threshold 5)
schedule(3.925431->1571950742.889929)
schedule(0.466019->1571950743.362068)
schedule(0.204832->1571950743.570228)
[0000024669211060]saw incoming RTCP packet (from address 192.168.1.238, port 6973)
80c80006 1bb0292b e15c8f3c d7a35504 a7b917fb 00000069 000246cd 81ca000d 1bb0292b 012a766f 6c74726f 6e2d7275 2d746567 72612d74 7832692d 7562756e 74752d30 34323035 31383030 39333035 00000000
SR
RR
validated RTCP subpacket: rc:0, pt:200, bytes remaining:0, report sender SSRC:0x1bb0292b
SDES
        SSRC/CSRC: 0x1bb0292b
                CNAME:voltron-ru-tegra-tx2i-ubuntu-0420518009305
validated RTCP subpacket: rc:1, pt:202, bytes remaining:0, report sender SSRC:0x1bb0292b
validated entire RTCP packet
schedule(1.198522->1571950744.771500)

Thanks and Regards
Shyam Kaundinya

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20191024/99020e04/attachment-0001.htm>


More information about the live-devel mailing list