Closed krsvital closed 1 year ago
Since you're no longer active in PR https://github.com/AirenSoft/OvenMediaEngine/pull/1246, I've fixed it and committed. ad7a140333865c44c89107241f5fa2ba36a40003
This issue has been resolved and included in the 0.15.13 release.
i want to pull stream from api request /v1/vhosts/default/apps/app/streams
answer from logs: [2023-05-19 19:52:25.467] E [SPAPISvr-t8081:230] RtspcStream | rtspc_stream.cpp:444 | Rtsp server(rtsp://10.194.0.254/av0_1) rejected the setup request : 404(Stream Not Found) [2023-05-19 19:52:25.468] I [SPAPISvr-t8081:230] RtspcStream | rtspc_stream.cpp:243 | Request Describe : Request: DESCRIBE rtsp://10.194.0.254/av0_1 1.0 Accept: application/sdp CSeq: 2 User-Agent: OvenMediaEngine
[2023-05-19 19:52:25.499] I [SPAPISvr-t8081:230] RtspcStream | rtspc_stream.cpp:320 | Response Describe : Response: RTSP/1.0 200 OK Content-Base: rtsp://10.194.0.254/av0_1 Content-Length: 389 Content-Type: application/sdp CSeq: 2 Date: Fri, 19 May 2023 22:52:20 GMT Server: Beward/1.0.2
[2023-05-19 19:52:25.548] I [SPAPISvr-t8081:230] RtspcStream | rtspc_stream.cpp:358 | SDP : v=0 o=StreamingServer 3433055887 1684536740666125 IN IP4 10.194.0.254 s=av0_1 e=NONE c=IN IP4 0.0.0.0 t=0 0 m=video 0 RTP/AVP 96 b=AS:348 a=control:trackID=1 a=rtpmap:96 H264/90000 a=fmtp:96 profile-level-id=4d001f;packetization-mode=1;sprop-parameter-sets=Z00AH5WoPAQ5,aO48gA== a=x-dimensions:960,528 m=audio 0 RTP/AVP 8 b=AS:64 a=control:trackID=2 a=rtpmap:8 PCMA/8000/1
[2023-05-19 19:52:25.548] I [SPAPISvr-t8081:230] RtspcStream | rtspc_stream.cpp:432 | Request SETUP : Request: SETUP rtsp://10.194.0.254/av0_1trackID=1 1.0 Authorization: Digest username="admin", realm="BWD Streaming", nonce="d0135ae818a34aea12d2fc73abea746e", uri="rtsp://10.194.0.254/av0_1trackID=1", response="7d98349204b79428fc92be9e7fec1189" CSeq: 5 Transport: RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=B874B717 User-Agent: OvenMediaEngine
[2023-05-19 19:52:25.554] E [SPAPISvr-t8081:230] RtspcStream | rtspc_stream.cpp:444 | Rtsp server(rtsp://10.194.0.254/av0_1) rejected the setup request : 404(Stream Not Found)
But, if stream run by ffmpeg then from tcpdump i see
19:42:20.224356 IP (tos 0x0, ttl 64, id 17272, offset 0, flags [DF], proto TCP (6), length 350) 10.194.194.3.52924 > 10.194.0.254.rtsp: Flags [P.], cksum 0xd9d5 (incorrect -> 0x3048), seq 197:495, ack 318, win 245, options [nop,nop,TS val 334474988 ecr 891248], length 298: RTSP, length: 298 DESCRIBE rtsp://10.194.0.254:554/av0_1 RTSP/1.0 Accept: application/sdp CSeq: 3 User-Agent: Lavf60.4.100 Authorization: Digest username="admin", realm="BWD Streaming", nonce="f02e9a04758854f66997376c31d08037", uri="rtsp://10.194.0.254:554/av0_1", response="0d688c618c9dfd03874411a1e8272947"
19:42:20.251994 IP (tos 0x0, ttl 59, id 57236, offset 0, flags [DF], proto TCP (6), length 621) 10.194.0.254.rtsp > 10.194.194.3.52924: Flags [P.], cksum 0x0aea (correct), seq 318:887, ack 495, win 243, options [nop,nop,TS val 891251 ecr 334474988], length 569: RTSP, length: 569 RTSP/1.0 200 OK CSeq: 3 Server: Beward/1.0.2 Date: Fri, 19 May 2023 22:42:31 GMT Content-Type: application/sdp Content-Base: rtsp://10.194.0.254/av0_1 Content-Length: 389
19:42:20.252481 IP (tos 0x0, ttl 64, id 17273, offset 0, flags [DF], proto TCP (6), length 382) 10.194.194.3.52924 > 10.194.0.254.rtsp: Flags [P.], cksum 0xd9f5 (incorrect -> 0xcf8f), seq 495:825, ack 887, win 254, options [nop,nop,TS val 334475016 ecr 891251], length 330: RTSP, length: 330 SETUP rtsp://10.194.0.254/av0_1/trackID=1 RTSP/1.0 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 CSeq: 4 User-Agent: Lavf60.4.100 Authorization: Digest username="admin", realm="BWD Streaming", nonce="f02e9a04758854f66997376c31d08037", uri="rtsp://10.194.0.254/av0_1/trackID=1", response="498892d9954419de1e08674f223852fa"
19:42:20.257896 IP (tos 0x0, ttl 59, id 57237, offset 0, flags [DF], proto TCP (6), length 261) 10.194.0.254.rtsp > 10.194.194.3.52924: Flags [P.], cksum 0x5da7 (correct), seq 887:1096, ack 825, win 260, options [nop,nop,TS val 891252 ecr 334475016], length 209: RTSP, length: 209 RTSP/1.0 200 OK CSeq: 4 Server: Beward/1.0.2 Date: Fri, 19 May 2023 22:42:31 GMT Session: 779643900753265380;timeout=60 Transport: RTP/AVP/TCP;unicast;source=10.194.0.254;interleaved=0-1;ssrc=24e29882
19:42:20.258346 IP (tos 0x0, ttl 64, id 17274, offset 0, flags [DF], proto TCP (6), length 411) 10.194.194.3.52924 > 10.194.0.254.rtsp: Flags [P.], cksum 0xda12 (incorrect -> 0x7b43), seq 825:1184, ack 1096, win 263, options [nop,nop,TS val 334475022 ecr 891252], length 359: RTSP, length: 359 SETUP rtsp://10.194.0.254/av0_1/trackID=2 RTSP/1.0 Transport: RTP/AVP/TCP;unicast;interleaved=2-3 CSeq: 5 User-Agent: Lavf60.4.100 Session: 779643900753265380 Authorization: Digest username="admin", realm="BWD Streaming", nonce="f02e9a04758854f66997376c31d08037", uri="rtsp://10.194.0.254/av0_1/trackID=2", response="e69049dabf4b7a9ac4f8aa9c69464a61"
19:42:20.261742 IP (tos 0x0, ttl 59, id 57238, offset 0, flags [DF], proto TCP (6), length 261) 10.194.0.254.rtsp > 10.194.194.3.52924: Flags [P.], cksum 0x5128 (correct), seq 1096:1305, ack 1184, win 277, options [nop,nop,TS val 891252 ecr 334475022], length 209: RTSP, length: 209 RTSP/1.0 200 OK CSeq: 5 Server: Beward/1.0.2 Date: Fri, 19 May 2023 22:42:31 GMT Session: 779643900753265380;timeout=60 Transport: RTP/AVP/TCP;unicast;source=10.194.0.254;interleaved=2-3;ssrc=75f5e953
19:42:20.262220 IP (tos 0x0, ttl 64, id 17275, offset 0, flags [DF], proto TCP (6), length 361) 10.194.194.3.52924 > 10.194.0.254.rtsp: Flags [P.], cksum 0xd9e0 (incorrect -> 0xe2d7), seq 1184:1493, ack 1305, win 272, options [nop,nop,TS val 334475026 ecr 891252], length 309: RTSP, length: 309 PLAY rtsp://10.194.0.254/av0_1 RTSP/1.0 Range: npt=0.000- CSeq: 6 User-Agent: Lavf60.4.100 Session: 779643900753265380 Authorization: Digest username="admin", realm="BWD Streaming", nonce="f02e9a04758854f66997376c31d08037", uri="rtsp://10.194.0.254/av0_1", response="cd7ad2a35c7c62d9e7e6b5561df8825e"
19:42:20.279698 IP (tos 0x0, ttl 59, id 57239, offset 0, flags [DF], proto TCP (6), length 259) 10.194.0.254.rtsp > 10.194.194.3.52924: Flags [P.], cksum 0x2f00 (correct), seq 1305:1512, ack 1493, win 294, options [nop,nop,TS val 891254 ecr 334475026], length 207: RTSP, length: 207 RTSP/1.0 200 OK CSeq: 6 Server: Beward/1.0.2 Date: Fri, 19 May 2023 22:42:31 GMT Session: 779643900753265380 RTP-Info: url=rtsp://10.194.0.254/av0_1/trackID=1,url=rtsp://10.194.0.254/av0_1/trackID=2
requests differ, in case ovenmedia is SETUP rtsp://10.194.0.254/av0_1trackID=1 1.0
but ffmpeg doing like this SETUP rtsp://10.194.0.254/av0_1/trackID=2 RTSP/1.0
ffmpeg request works well fix it please
problem in function ov::String RtspcStream::GenerateControlUrl(ov::String control) probably its needed to check Content-Base, if this filed not ended on "/" then add "/" Content-Base: rtsp://10.194.0.254/av0_1