Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTSP 4K to WebRTC Not Working #1391

Open
virtualbitzz opened this issue Oct 11, 2024 · 2 comments
Open

RTSP 4K to WebRTC Not Working #1391

virtualbitzz opened this issue Oct 11, 2024 · 2 comments

Comments

@virtualbitzz
Copy link

I have a bunch of Reolink cameras that are 1440p and a couple of new ones that are 4K.

The 1440p cameras I have no problem with. I use the addon in Home Assistant, and the WebRTC lovelace card. I'm able to define the sources in the .yaml config file and view the streams via the lovelace card in WebRTC.

The 4K cameras are where I have a problem. If I drop the resolution to 1440p, they come through in WebRTC no problem. However, when I bump the streams up to 4K the streams will only display in MSE, not WebRTC.

For one of the cameras the 1440p stream is fine, however with the RLC-843A if you drop the resolution instead of transcoding it just digitally crops the image! I need the FoV on this camera so cropping / dropping the resolution isn't going to work.

@virtualbitzz
Copy link
Author

virtualbitzz commented Oct 11, 2024

`15:36:24.325 TRC [webrtc] remote candidate="candidate:3624146751 1 udp 1685921535 1.2.3.4 59721 typ srflx raddr 192.168.15.121 rport 59721 generation 0 ufrag 4F0x network-id 2"
15:36:24.325 TRC [api.ws] msg type=webrtc/candidate
15:36:24.325 TRC [webrtc] remote candidate="candidate:4143941418 1 udp 1685987071 1.2.3.4 59720 typ srflx raddr 192.168.15.112 rport 59720 generation 0 ufrag 4F0x network-id 1"
15:36:24.361 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 2
Date: Fri, Oct 11 2024 22:36:25 GMT
Content-Base: rtsp://192.168.30.27/Preview_01_main/
Content-Type: application/sdp
Content-Length: 880

v=0
o=- 1728684720635403 1 IN IP4 192.168.30.27
s=Session streamed by "preview"
i=reolink rtsp stream
t=0 0
a=tool:BC Streaming Media v202210012022.10.01
a=type:broadcast
a=control:*
a=range:npt=now-
a=x-qt-text-nam:Session streamed by "preview"
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:96 H265/90000
a=fmtp:96 profile-space=0;profile-id=1;tier-flag=0;level-id=150;interop-constraints=000000000000;sprop-vps=QAEMAf//AWAAAAMAAAMAAAMAAAMAlqwJ;sprop-sps=QgEBAWAAAAMAAAMAAAMAAAMAlqAB4CACHH+KrTuiS7I=;sprop-pps=RAHAcvCUHjZI
a=recvonly
a=control:track1
m=audio 0 RTP/AVP 97
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:97 MPEG4-GENERIC/16000
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408
a=recvonly
a=control:track2
m=audio 0 RTP/AVP 0
a=control:track3
a=rtpmap:0 PCMU/8000
a=sendonly
15:36:24.362 TRC [streams] check prod=0 media=video, recvonly, H265
15:36:24.362 TRC [streams] match prod=0 => cons=0
15:36:24.362 TRC [rtsp] client request:
SETUP rtsp://192.168.30.27/Preview_01_main/track1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 3
Authorization: Digest username="admin", realm="BC Streaming Media", nonce="c78ae772ee70e0891c672cd27fdb8510", uri="rtsp://192.168.30.27/Preview_01_main/track1", response="3c296b5aa324f4052ddb5e31420ea685"

15:36:24.402 TRC [rtsp] client response:
RTSP/1.0 200 OK
Session: AC102710;timeout=65
Cseq: 3
Date: Fri, Oct 11 2024 22:36:25 GMT
Transport: RTP/AVP/TCP;unicast;destination=192.168.10.17;source=192.168.30.27;interleaved=0-1

15:36:24.402 TRC [streams] check prod=0 media=video, recvonly, H265
15:36:24.402 TRC [streams] check prod=0 media=audio, recvonly, MPEG4-GENERIC/16000
15:36:24.402 TRC [streams] check prod=0 media=audio, sendonly, PCMU/8000
15:36:24.402 TRC [streams] check cons=1 media=audio, sendonly, OPUS/48000/2, RED/48000/2, G722/8000, PCMU/8000, PCMA/8000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/8000, L16
15:36:24.402 TRC [streams] check prod=0 media=video, recvonly, H265
15:36:24.402 TRC [streams] check prod=0 media=audio, recvonly, MPEG4-GENERIC/16000
15:36:24.402 TRC [streams] check prod=0 media=audio, sendonly, PCMU/8000
15:36:24.402 DBG [webrtc] add consumer error=PCMU
15:36:24.402 TRC [streams] check cons=0 media=audio, sendonly, MPEG4-GENERIC, PCMA, PCMU, L16, OPUS
15:36:24.402 TRC [streams] check prod=0 media=video, recvonly, H265
15:36:24.402 TRC [streams] check prod=0 media=audio, recvonly, MPEG4-GENERIC/16000
15:36:24.402 TRC [streams] match prod=0 => cons=0
15:36:24.402 TRC [rtsp] client request:
SETUP rtsp://192.168.30.27/Preview_01_main/track2 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
CSeq: 4
Authorization: Digest username="admin", realm="BC Streaming Media", nonce="c78ae772ee70e0891c672cd27fdb8510", uri="rtsp://192.168.30.27/Preview_01_main/track2", response="4acc00a30c8accff5e6206e453153c64"
Session: AC102710

15:36:24.407 TRC [rtsp] client response:
RTSP/1.0 200 OK
Transport: RTP/AVP/TCP;unicast;destination=192.168.10.17;source=192.168.30.27;interleaved=2-3
Session: AC102710;timeout=65
Cseq: 4
Date: Fri, Oct 11 2024 22:36:25 GMT

15:36:24.407 DBG [streams] start producer url=rtsp://admin:[email protected]:554/h265Preview_01_main
15:36:24.407 TRC [rtsp] client request:
PLAY rtsp://192.168.30.27/Preview_01_main/ RTSP/1.0
CSeq: 5
Authorization: Digest username="admin", realm="BC Streaming Media", nonce="c78ae772ee70e0891c672cd27fdb8510", uri="rtsp://192.168.30.27/Preview_01_main/", response="186921abbdece512d7411652439d2dd4"
Session: AC102710

15:36:24.455 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 5
Date: Fri, Oct 11 2024 22:36:25 GMT
Range: npt=0.000-
Session: AC102710
Rtp-Info: url=rtsp://192.168.30.27/Preview_01_main/track1;seq=52077;rtptime=107816884,url=rtsp://192.168.30.27/Preview_01_main/track2;seq=26019;rtptime=2378866631,url=rtsp://192.168.30.27/Preview_01_main/track3;seq=0;rtptime=0`

@virtualbitzz
Copy link
Author

Can go2rtc route an RTSP H265 stream to WebRTC? This camera's main stream can't product H264 at the full resolution, which I need for the FoV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant