-
Notifications
You must be signed in to change notification settings - Fork 3
Support H265 for WebRTC in Safari with go2rtc #5
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
Comments
Спасибо Вам,Вы делаете огромную и трудоемкую работу!За Getwei 3 Отдельное СПАСИБИЩЕ! |
use webcodecs |
Edge support H265 as well. |
@itispip can you show SDP that confirms your words? |
[Assistance needed]: Only audio played during WebRTC test via RTSP stream from H.265 file on Safari Description: I encountered an issue while testing the WebRTC via RTSP stream from an H.265 file on Safari. When I tried to stream from a file encoded with libx265 and hevc_nvenc with opus for audio, only the audio is played for WebRTC, and only the first picture is shown for MSE.
I would appreciate your guidance on what I might be doing wrong. Thank you in advance for your help |
H264 and H265 from files may not be compatible for streaming. They may have B-frames or some others unsupported NAL types. I don't support hardware encoding for H265 NVENC exact because it produce some kind of "bad" stream. Haven't had time to figure out the problem and fix it yet. The best stream is made by cameras of good brands, such as Dahua. |
Dear AlexxIT, Thank you for your prompt response. Do you have an example of an H.265+opus file that works well with go2rtc? Alternatively, could you provide me with a test stream from a Dahua camera or any other HEVC RTSP test stream that I can use for testing purposes? I ask this as I am currently unable to purchase a Dahua camera. Also, regarding NVENC, I don't require a hardware video encoder. Instead, a software video encoder such as libx265 would suffice for my current needs. Thank you for your assistance. |
Dear AlexxIT, I hope you are doing well. I have been attempting to create an RTSP stream without audio, and while it worked for MSE, I have yet to make it work for WebRTC. So I have a question about MSE - is it considered a Progressive Download? Please provide me with some assistance with WebRTC. I would appreciate your help. Here are the ffmpeg commands I used for creating the RTSP stream without audio:
Thank you. |
Are you sure you using WebRTC in Apple Safari with enabled H265 for WebRTC checkbox? |
Hi AlexxIT, |
Hi AlexxIT, I'm having trouble finding a working RTSP H.265 stream for Safari browser. I've tested my RTSP stream on Safari versions 16.3 (Apple M1, macOS Ventura v13.2.1) and 14.1.2 (macOS Mojave v10.14.6), but haven't had any success with WebRTC. Do you know where I can find a working stream? Thank you, Evgeny |
Hi AlexxIT, I hope this message finds you well. I have successfully tested the rtsp stream from go2rtc on the VLC media player. Here is the URL: rtsp://192.168.2.30:8554/stream1 I have tried it on both my MacBook Air and iPad, and everything appears to be working well, including the original HEVC file with alpha channel "puppets_with_alpha_hevc.mov" with AAC from Apple.
However, I am experiencing an issue making WebRTC with HEVC work on the Safari browser. I would like your assistance in resolving this issue. I would appreciate your prompt response and help. Thank you very much. |
I implemented the same at June, 2022 https://blog.wmspanel.com/2022/07/hevc-webrtc-apple.html |
@alexpokotilo fair enough. I have removed phrase about "first in the World" from readme. Go2rtc has many others "first in the World". No any problem :) |
@AlexxIT it's not about who made it first. I just started to implement whep and found your habr article and this post and send a message to support you. When I faced with that case I thought I do something wrong. |
@alexpokotilo Thank you. You are developing a really cool project. This is the first time I've seen it. Very powerful features. From the video it looks pretty handy. |
Here is what Sergio Garcia Murillo just replied about this problem
|
I can confirm that in Safari 17.5 you have to use RFC 7798 to stream H265 over WebRTC. |
H265 for WebRTC is now supported by Chrome 136+. According to my tests it's already working without any change to go2rtc. @AlexxIT I think it would be nice to update the documentation about it, because it mentions Safari-only. |
@felipecrs Yes. Normal H265 support was added in go2rtc v1.9.9. |
I can also confirm that H265 using WebRTC works with Chrome on PC, not on android tablet. I tried to force go2rtc to use only H264 as follows: Here is the info, it picked the main producer Log: 5:00:10.930 PM | debug | [webrtc] new consumer src=88d87a05-d7f7-7e45-b1e9-E8ABFAA9F6B6_vs_videosource_token0 Suggestions very much appreciated!! |
@dcorsus, can you visit this site in your tablet and paste the result here? For my tablet, I ran into another problem and thus I'm not able to even use Chrome 136+: |
@felipecrs Here you go: receiver video
video/VP8,,90000, video/rtx,,90000, video/VP9,,90000,profile-id=0 video/VP9,,90000,profile-id=1 video/VP9,,90000,profile-id=3 video/AV1,,90000,level-idx=5;profile=0;tier=0 video/AV1,,90000,level-idx=5;profile=1;tier=0 video/VP9,,90000,profile-id=2 video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=64001f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f video/H265,,90000,level-id=90;profile-id=1;tier-flag=0;tx-mode=SRST video/red,,90000, video/ulpfec,,90000, video/flexfec-03,,90000,repair-window=10000000 receiver audio audio/opus,2,48000,minptime=10;useinbandfec=1 audio/red,2,48000, audio/G722,1,8000, audio/PCMU,1,8000, audio/PCMA,1,8000, audio/CN,1,8000, audio/telephone-event,1,48000, audio/telephone-event,1,8000, sender video video/VP8,,90000, video/rtx,,90000, video/VP9,,90000,profile-id=0 video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f video/H264,,90000,level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f video/H265,,90000,level-id=93;profile-id=1;tier-flag=0;tx-mode=SRST video/red,,90000, video/ulpfec,,90000, sender audio audio/opus,2,48000,minptime=10;useinbandfec=1 audio/red,2,48000, audio/G722,1,8000, audio/PCMU,1,8000, audio/PCMA,1,8000, audio/CN,1,8000, audio/telephone-event,1,48000, audio/telephone-event,1,8000, video.canPlayType video/mp4; codecs="avc1.42401E" = true / probably video/mp4; codecs="avc1.42C01E" = true / probably video/mp4; codecs="avc1.42E01E" = true / probably video/mp4; codecs="avc1.42001E" = true / probably video/mp4; codecs="avc1.4D401E" = true / probably video/mp4; codecs="avc1.4D001E" = true / probably video/mp4; codecs="avc1.640032" = true / probably video/mp4; codecs="avc1.640C32" = true / probably video/mp4; codecs="avc1.F4001F" = true / maybe video/mp4; codecs="hvc1.1.6.L93.B0" = true / probably video/mp4; codecs="hev1.1.6.L93.B0" = true / probably video/mp4; codecs="hev1.2.4.L120.B0" = false / video/mp4; codecs="flac" = true / probably video/mp4; codecs="opus" = true / probably video/mp4; codecs="mp3" = false / probably video/mp4; codecs="null" = false / application/vnd.apple.mpegurl = false / maybe |
These lines probably mean your device is advertising H.265 as playable:
Maybe @AlexxIT has some idea on why it's not working. |
@felipecrs , Indeed it does but I want go2rtc to only pick streams that are H264 by config, and maybe I'm not understanding how the config should be ... or.... it is simply not supported :-( as a config item. I on purpose configured streams with multiple "sub"streams in the hope that during negotiation, go2rtc would pick one that matches, request and/or restrictions implied by configuration |
Oh. I think the only way to do that is by removing the H265 stream from the list and leaving only the H264. But anyway, H265 is better and instead your tablet was supposed to be able to play it. |
I just realized (while browsing the documentation) , that this config was suggest to me by chatGPT and therefore could be completely bogus ..... webrtc: |
Oh yeah. I have no idea what is that. |
One of the examples where GPT completely made up a non-existent part of the config. |
Anyway, @dcorsus, about your tablet not playing H.265 over WebRTC: I recommend you check for existing issues in the go2rtc project, and create one if there's none for the same problem. |
If your device doesn't support the H265 codec, it's not go2rtc's problem. No need to create new issues :) Due to licensing issues, this codec must be supported not only at the software level (such as the latest version of the Chrome browser), but also at the hardware level. The hardware developer has to pay money to the patent owner of this codec. |
Agree with @AlexxIT , if not supported in HW, it isn't a go2rtc problem. It does raise the question why the browser is so dumb to advertise its capability for H265 if the underlying HW can't. Oh well, not a discussion for here. streams:
88d87a05-d7f7-7e45-b1e9-E8ABFAA9F6B6_vs_videosource_token0:
- rtsp://me:Nie%[email protected]:88/videoMain
- rtsp://me:Nie%[email protected]:88/videoSub Where the videoMain is H265 and videoSub is h264, can go2rtc pick the right rtsp matching stream or will it always pick the first stream, in which case I would expect go2rtc to return an unsuccessful sort of SDP response. From the documentation, I interpret that go2rtc is capable of picking the right substream, no? Does it need perhaps attributes for that? |
If the client supports only H264, main has H265 codec and sub has H264 codec, everything should work. Go2rtc supports this. |
Thanks @AlexxIT , that was my understanding as well. Ah, I was struggling a bit with turning on logging for RTSP but got it going now, and I indeed see that go2rtc queries (Describe) both main and sub and guess what, the camera (foscam x5) reports only h265 for both main and sub (grrrr). Reolink TrackMix seems to do the same on all 3 substreams. hmmm what's up with that.... |
If your browser advertises H.265 as playable, then it should play it. Otherwise it should have advertised as non playable. It may be worth reporting a chromium bug for this. |
The problem is not that it does not support it. The problem is that it advertises as supported:
@AlexxIT, it could either be an issue with go2rtc or an issue with Chromium as well. I think it should be reported so that it can be investigated. And if there's indeed no issue with go2rtc, I would recommend reporting a bug to Chromium. The browser shouldn't advertise H.265 as playable if it is not. I reported the issue with my tablet to Chromium, and it just got fixed (only in Chrome Canary for now). Now my Teclast P20HD with Android 10 and an Unisoc SC9863A can play H.265 over WebRTC. |
If the browser shows that it can play this codec - then of course it could be a go2rtc problem. But, for example, there's a browser like Safari. The worst browser to date, in my opinion (because IE is no longer relevant). |
Thanks @AlexxIT and @felipecrs for your comments. First of all, congrats @felipecrs to convince the chromium crowd they had an issue, even if they couldn't reproduce it themselves. You seem quite knowledgeable of Android and probably a lot more. I'm trying to cut through my own noise. On a windows laptop running chrome, I can have all my cameras with all its sub-streams running simultaneous, no issue. Of the 3 cameras. the Trackmix has H265 in its main profile(000), H264 in sub (001) and H265 in its autotrack (003). The reolink has H264 in main (000) and Sub (001) and I see no difference in the SDP info its returns on a Describe. The Foscam (Fussy) has H265 in main and H264 in sub. Obviously main , sub, etc have different framerates , bit rates, size .. Now the results are all over the place when I use either a Lenovo android tablet (v13) or a Samsung tablet or Chrome or Opera on the tablet, so I'm trying to sort through what works and what doesn't. Interestingly enough the Reolink (both streams H264) doesn't seem to work at all on the Lenovo tablet including using the go2rtc built in feature to open a stream. No errors anywhere (urgghh). The Foscam on the other hand, might have some timing issue, because I can play the substream (H264) on the Lenovo tablet, BUT, if I first start the main stream (spinning wheel) and subsequently the substream, neither streams will start playing. Sorry for my rambling, I'll dig around some more, if you have pointers as to what I should pay attention to or where I can get more info , perhaps straight out of the codec, maybe I can understand this better and find a way to properly select the streams that work. I would say that for all non-working scenarios, the player "tries" to move to play state but never gets there, somehow it either is not receiving, or figuring out the metadata of the stream and remains stuck in this state without an error, while go2rtc is merrily streaming packets to the browser and the browser (using chrome://webrtc-internals) is merrily accepting these packets. |
@AlexxIT , perhaps something to look at .... Test scenario: I'm starting substream 000, which is H265 so we have our spinner. Finding:
Now have a look at this log. My client sends an offer with all codecs under the sun. A RSTP Describe SDP response only lists H265/90000 with profile 95, but in go2rtc's SDP response to the requestor, it lists these codecs: video 9 UDP/TLS/RTP/SAVPF 103 115 119 45, of which most are H264 (103, 115, 119) and only code 45 is a H265. Is that by design because I suspect the camera has no H264 capable codec available at that point in time. Thoughts? 1:49:18.281 PM | debug | [webrtc] new consumer src=15011100-0003-1113-0605-ec71db3e45af_003 -- | -- | -- 1:49:18.295 PM | trace | [webrtc] remote candidate=candidate:1260967208 1 udp 2113937151 192.168.1.10 52008 typ host generation 0 ufrag 0XWt network-cost 999 1:49:18.282 PM | trace | [webrtc] offer:v=0o=- 482034942108192081 2 IN IP4 127.0.0.1s=-t=0 0a=group:BUNDLE 0 1a=extmap-allow-mixeda=msid-semantic: WMSm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 35 36 37 38 39 40 41 42 100 101 103 104 107 108 109 114 43 44 115 116 117 118 119 120 121 122 45 46 123 124 125 47c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:0XWta=ice-pwd:pt98I5+4Lfcv7VJPfoDj9ZoEa=ice-options:tricklea=fingerprint:sha-256 0D:90:3C:4E:DB:18:62:F2:9C:05:7D:C7:0F:0A:2F:7B:14:AB:16:CE:06:90:8A:20:E4:F8:97:11:CB:77:03:D2a=setup:actpassa=mid:0a=extmap:1 urn:ietf:params:rtp-hdrext:toffseta=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:3 urn:3gpp:video-orientationa=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delaya=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-typea=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timinga=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-spacea=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mida=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-ida=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-ida=recvonlya=rtcp-muxa=rtcp-rsizea=rtpmap:96 VP8/90000a=rtcp-fb:96 goog-remba=rtcp-fb:96 transport-cca=rtcp-fb:96 ccm fira=rtcp-fb:96 nacka=rtcp-fb:96 nack plia=rtpmap:97 rtx/90000a=fmtp:97 apt=96a=rtpmap:98 VP9/90000a=rtcp-fb:98 goog-remba=rtcp-fb:98 transport-cca=rtcp-fb:98 ccm fira=rtcp-fb:98 nacka=rtcp-fb:98 nack plia=fmtp:98 profile-id=0a=rtpmap:99 rtx/90000a=fmtp:99 apt=98a=rtpmap:35 VP9/90000a=rtcp-fb:35 goog-remba=rtcp-fb:35 transport-cca=rtcp-fb:35 ccm fira=rtcp-fb:35 nacka=rtcp-fb:35 nack plia=fmtp:35 profile-id=1a=rtpmap:36 rtx/90000a=fmtp:36 apt=35a=rtpmap:37 VP9/90000a=rtcp-fb:37 goog-remba=rtcp-fb:37 transport-cca=rtcp-fb:37 ccm fira=rtcp-fb:37 nacka=rtcp-fb:37 nack plia=fmtp:37 profile-id=3a=rtpmap:38 rtx/90000a=fmtp:38 apt=37a=rtpmap:39 AV1/90000a=rtcp-fb:39 goog-remba=rtcp-fb:39 transport-cca=rtcp-fb:39 ccm fira=rtcp-fb:39 nacka=rtcp-fb:39 nack plia=fmtp:39 level-idx=5;profile=0;tier=0a=rtpmap:40 rtx/90000a=fmtp:40 apt=39a=rtpmap:41 AV1/90000a=rtcp-fb:41 goog-remba=rtcp-fb:41 transport-cca=rtcp-fb:41 ccm fira=rtcp-fb:41 nacka=rtcp-fb:41 nack plia=fmtp:41 level-idx=5;profile=1;tier=0a=rtpmap:42 rtx/90000a=fmtp:42 apt=41a=rtpmap:100 VP9/90000a=rtcp-fb:100 goog-remba=rtcp-fb:100 transport-cca=rtcp-fb:100 ccm fira=rtcp-fb:100 nacka=rtcp-fb:100 nack plia=fmtp:100 profile-id=2a=rtpmap:101 rtx/90000a=fmtp:101 apt=100a=rtpmap:103 H264/90000a=rtcp-fb:103 goog-remba=rtcp-fb:103 transport-cca=rtcp-fb:103 ccm fira=rtcp-fb:103 nacka=rtcp-fb:103 nack plia=fmtp:103 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001fa=rtpmap:104 rtx/90000a=fmtp:104 apt=103a=rtpmap:107 H264/90000a=rtcp-fb:107 goog-remba=rtcp-fb:107 transport-cca=rtcp-fb:107 ccm fira=rtcp-fb:107 nacka=rtcp-fb:107 nack plia=fmtp:107 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001fa=rtpmap:108 rtx/90000a=fmtp:108 apt=107a=rtpmap:109 H264/90000a=rtcp-fb:109 goog-remba=rtcp-fb:109 transport-cca=rtcp-fb:109 ccm fira=rtcp-fb:109 nacka=rtcp-fb:109 nack plia=fmtp:109 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001fa=rtpmap:114 rtx/90000a=fmtp:114 apt=109a=rtpmap:43 H264/90000a=rtcp-fb:43 goog-remba=rtcp-fb:43 transport-cca=rtcp-fb:43 ccm fira=rtcp-fb:43 nacka=rtcp-fb:43 nack plia=fmtp:43 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001fa=rtpmap:44 rtx/90000a=fmtp:44 apt=43a=rtpmap:115 H264/90000a=rtcp-fb:115 goog-remba=rtcp-fb:115 transport-cca=rtcp-fb:115 ccm fira=rtcp-fb:115 nacka=rtcp-fb:115 nack plia=fmtp:115 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001fa=rtpmap:116 rtx/90000a=fmtp:116 apt=115a=rtpmap:117 H264/90000a=rtcp-fb:117 goog-remba=rtcp-fb:117 transport-cca=rtcp-fb:117 ccm fira=rtcp-fb:117 nacka=rtcp-fb:117 nack plia=fmtp:117 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=64001fa=rtpmap:118 rtx/90000a=fmtp:118 apt=117a=rtpmap:119 H264/90000a=rtcp-fb:119 goog-remba=rtcp-fb:119 transport-cca=rtcp-fb:119 ccm fira=rtcp-fb:119 nacka=rtcp-fb:119 nack plia=fmtp:119 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01fa=rtpmap:120 rtx/90000a=fmtp:120 apt=119a=rtpmap:121 H264/90000a=rtcp-fb:121 goog-remba=rtcp-fb:121 transport-cca=rtcp-fb:121 ccm fira=rtcp-fb:121 nacka=rtcp-fb:121 nack plia=fmtp:121 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01fa=rtpmap:122 rtx/90000a=fmtp:122 apt=121a=rtpmap:45 H265/90000a=rtcp-fb:45 goog-remba=rtcp-fb:45 transport-cca=rtcp-fb:45 ccm fira=rtcp-fb:45 nacka=rtcp-fb:45 nack plia=fmtp:45 level-id=90;profile-id=1;tier-flag=0;tx-mode=SRSTa=rtpmap:46 rtx/90000a=fmtp:46 apt=45a=rtpmap:123 red/90000a=rtpmap:124 rtx/90000a=fmtp:124 apt=123a=rtpmap:125 ulpfec/90000a=rtpmap:47 flexfec-03/90000a=rtcp-fb:47 goog-remba=rtcp-fb:47 transport-cca=fmtp:47 repair-window=10000000m=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:0XWta=ice-pwd:pt98I5+4Lfcv7VJPfoDj9ZoEa=ice-options:tricklea=fingerprint:sha-256 0D:90:3C:4E:DB:18:62:F2:9C:05:7D:C7:0F:0A:2F:7B:14:AB:16:CE:06:90:8A:20:E4:F8:97:11:CB:77:03:D2a=setup:actpassa=mid:1a=extmap:14 urn:ietf:params:rtp-hdrext:ssrc-audio-levela=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mida=recvonlya=rtcp-muxa=rtcp-rsizea=rtpmap:111 opus/48000/2a=rtcp-fb:111 transport-cca=fmtp:111 minptime=10;useinbandfec=1a=rtpmap:63 red/48000/2a=fmtp:63 111/111a=rtpmap:9 G722/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:13 CN/8000a=rtpmap:110 telephone-event/48000a=rtpmap:126 telephone-event/8000 1:49:18.409 PM | trace | [webrtc] remote candidate=candidate:1260967208 1 udp 2113937151 192.168.1.10 40706 typ host generation 0 ufrag 0XWt network-cost 999 1:49:18.409 PM | trace | [webrtc] remote candidate=candidate:1907461702 1 udp 1677729535 94.224.67.92 23293 typ srflx raddr 192.168.1.10 rport 52008 generation 0 ufrag 0XWt network-cost 999 1:49:18.409 PM | trace | [webrtc] remote candidate=candidate:1907461702 1 udp 1677729535 94.224.67.92 7743 typ srflx raddr 192.168.1.10 rport 40706 generation 0 ufrag 0XWt network-cost 999 1:49:18.411 PM | trace | [rtsp] client request:DESCRIBE rtsp://192.168.1.98:554/Preview_01_autotrack RTSP/1.0Require: www.onvif.org/ver20/backchannelUser-Agent: go2rtc/1.9.9CSeq: 1Accept: application/sdp 1:49:18.497 PM | trace | [rtsp] client response:RTSP/1.0 401 UnauthorizedWww-Authenticate: Digest realm="BC Streaming Media", nonce="7eb97f3e7b6a59db1e8d0ec123311584"Cseq: 1Date: Wed, Jun 04 2025 11:49:20 GMT 1:49:18.497 PM | trace | [rtsp] client request:DESCRIBE rtsp://192.168.1.98:554/Preview_01_autotrack RTSP/1.0Accept: application/sdpRequire: www.onvif.org/ver20/backchannelUser-Agent: go2rtc/1.9.9CSeq: 2Authorization: Digest username="admin", realm="BC Streaming Media", nonce="7eb97f3e7b6a59db1e8d0ec123311584", uri="rtsp://192.168.1.98:554/Preview_01_autotrack", response="fd782c11add043146f19d70a670a71d1" 1:49:18.538 PM | trace | [rtsp] client response:RTSP/1.0 200 OKContent-Base: rtsp://192.168.1.98/Preview_02_main/Content-Type: application/sdpContent-Length: 855Cseq: 2Date: Wed, Jun 04 2025 11:49:20 GMTv=0o=- 1748963808529032 1 IN IP4 192.168.0.3s=Session streamed by "preview"t=0 0a=tool:BC Streaming Media v202210012022.10.01a=type:broadcasta=control:*a=range:npt=now-a=x-qt-text-nam:Session streamed by "preview"m=video 0 RTP/AVP 96c=IN IP4 0.0.0.0b=AS:8192a=rtpmap:96 H265/90000a=fmtp:96 profile-space=0;profile-id=1;tier-flag=0;level-id=150;interop-constraints=000000000000;sprop-vps=QAEMAf//AWAAAAMAAAMAAAMAAAMAlqwJ;sprop-sps=QgEBAWAAAAMAAAMAAAMAAAMAlqADwIARB8uKrTuiS7I=;sprop-pps=RAHAcvAbJA==a=recvonlya=control:track1m=audio 0 RTP/AVP 97c=IN IP4 0.0.0.0b=AS:8192a=rtpmap:97 MPEG4-GENERIC/16000a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408a=recvonlya=control:track2m=audio 0 RTP/AVP 0a=control:track3a=rtpmap:0 PCMU/8000a=sendonly 1:49:18.574 PM | trace | [rtsp] client request:SETUP rtsp://192.168.1.98/Preview_02_main/track1 RTSP/1.0Transport: RTP/AVP/TCP;unicast;interleaved=0-1CSeq: 3Authorization: Digest username="admin", realm="BC Streaming Media", nonce="7eb97f3e7b6a59db1e8d0ec123311584", uri="rtsp://192.168.1.98/Preview_02_main/track1", response="55cbaaeb66dea70060402f61fe376c11" 1:49:18.668 PM | trace | [rtsp] client response:RTSP/1.0 200 OKCseq: 3Date: Wed, Jun 04 2025 11:49:20 GMTTransport: RTP/AVP/TCP;unicast;destination=192.168.1.184;source=192.168.1.98;interleaved=0-1Session: 45A64243;timeout=65 1:49:18.669 PM | trace | [rtsp] client request:PLAY rtsp://192.168.1.98/Preview_02_main/ RTSP/1.0Authorization: Digest username="admin", realm="BC Streaming Media", nonce="7eb97f3e7b6a59db1e8d0ec123311584", uri="rtsp://192.168.1.98/Preview_02_main/", response="30fc0cb13103d89c771579e553db1385"Session: 45A64243CSeq: 4 1:49:18.718 PM | trace | [rtsp] client response:RTSP/1.0 200 OKCseq: 4Date: Wed, Jun 04 2025 11:49:20 GMTRange: npt=0.000-Session: 45A64243Rtp-Info: url=rtsp://192.168.1.98/Preview_02_main/track1;seq=41973;rtptime=3667296353,url=rtsp://192.168.1.98/Preview_02_main/track2;seq=0;rtptime=0,url=rtsp://192.168.1.98/Preview_02_main/track3;seq=0;rtptime=0 1:49:18.846 PM | trace | [webrtc] answerv=0o=- 8336207202157672804 1749037758 IN IP4 0.0.0.0s=-t=0 0a=msid-semantic:WMS*a=fingerprint:sha-256 96:04:CB:1D:AB:8E:AD:A8:3F:7B:C4:CE:19:1B:16:B5:4F:0A:9F:33:8D:6A:C2:57:DD:A8:BE:6E:D1:E6:6B:4Da=extmap-allow-mixeda=group:BUNDLE 0 1m=video 9 UDP/TLS/RTP/SAVPF 103 115 119 45c=IN IP4 0.0.0.0a=setup:activea=mid:0a=ice-ufrag:ykTHKrupBEJYCsLAa=ice-pwd:ftKWMPQjwXqxjSNKhHUqzLGSjNDhxRNra=rtcp-muxa=rtcp-rsizea=rtpmap:103 H264/90000a=fmtp:103 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001fa=rtcp-fb:103 goog-remba=rtcp-fb:103 ccm fira=rtcp-fb:103 nacka=rtcp-fb:103 nack plia=rtcp-fb:103 nacka=rtcp-fb:103 nack plia=rtcp-fb:103 transport-cca=rtpmap:115 H264/90000a=fmtp:115 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001fa=rtcp-fb:115 goog-remba=rtcp-fb:115 ccm fira=rtcp-fb:115 nacka=rtcp-fb:115 nack plia=rtcp-fb:115 nacka=rtcp-fb:115 nack plia=rtcp-fb:115 transport-cca=rtpmap:119 H264/90000a=fmtp:119 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01fa=rtcp-fb:119 goog-remba=rtcp-fb:119 ccm fira=rtcp-fb:119 nacka=rtcp-fb:119 nack plia=rtcp-fb:119 nacka=rtcp-fb:119 nack plia=rtcp-fb:119 transport-cca=rtpmap:45 H265/90000a=fmtp:45 level-id=90;profile-id=1;tier-flag=0;tx-mode=SRSTa=rtcp-fb:45 goog-remba=rtcp-fb:45 ccm fira=rtcp-fb:45 nacka=rtcp-fb:45 nack plia=rtcp-fb:45 nacka=rtcp-fb:45 nack plia=rtcp-fb:45 transport-cca=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=ssrc:336754385 cname:go2rtca=ssrc:336754385 msid:go2rtc go2rtc-videoa=ssrc:336754385 mslabel:go2rtca=ssrc:336754385 label:go2rtc-videoa=msid:go2rtc go2rtc-videoa=sendonlym=audio 9 UDP/TLS/RTP/SAVPF 111 0 8c=IN IP4 0.0.0.0a=setup:activea=mid:1a=ice-ufrag:ykTHKrupBEJYCsLAa=ice-pwd:ftKWMPQjwXqxjSNKhHUqzLGSjNDhxRNra=rtcp-muxa=rtcp-rsizea=rtpmap:111 opus/48000/2a=fmtp:111 minptime=10;useinbandfec=1a=rtcp-fb:111 transport-cca=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=ssrc:2051924775 cname:go2rtca=ssrc:2051924775 msid:go2rtc go2rtc-audioa=ssrc:2051924775 mslabel:go2rtca=ssrc:2051924775 label:go2rtc-audioa=msid:go2rtc go2rtc-audioa=inactive 1:49:18.847 PM | trace | [webrtc] local candidate=candidate:632112936 1 udp 2130706431 192.168.1.184 8555 typ host 1:49:18.847 PM | trace | [webrtc] local candidate=candidate:2556311240 1 tcp 1671430143 192.168.1.184 8555 typ host tcptype passive 1:49:18.888 PM | trace | [webrtc] local candidate=candidate:181094971 1 udp 1694498815 94.224.67.92 11486 typ srflx raddr 0.0.0.0 rport 51948 |
It's impossible to read the logs from the browser. The formatting is destroyed in them. |
Hear ye, was in parallel trying to post with structure. Is there a way to export the log? |
The same log is displayed in the OS console. |
<style>
</style>
<script src="./go2rtc - Logs_files/main.js.download"> </script>Clean Auto Update: ON Reverse Log Order: OFF
|
Uh oh!
There was an error while loading. Please reload this page.
go2rtc is one of the first projects in the World, that support
HEVC/H.265
for WebRTC in web browser.Maybe you can see articles about WebRTC H265 earlier. But I haven't seen any examples where the video was displayed in a popular browser. Some projects can support WebRTC H265 if they are used on the receiving and transmitting sides. But what if there is a real browser on one side?
I tried streaming the RTSP from the Dahua camera to Safari with Janus without success. This works for some H264 cameras, but not all of them. This can work for streaming H265 between two Apple devices. But this does not work for H265 cameras.
All because Apple doesn't respect world standards. You can forgot RTP Payload Format for High Efficiency Video Coding (HEVC) (RFC 7798) then work with Apple devices. They invented their own payload:
00 00 00 01
before each NAL unit.03
for payload with VPS, SPS, PPS, I-frame start01
for all next packets from this I-frame02
for payload with P-frame00
for all next packets from this P-frameThat's all. Now anyone can try to watch WebRTC H265 in Safari even if don't have H265 cameras. This is because go2rtc has optional transcode feature for almost any stream source:
If you have H265 camera, you can stream it without transcoding, even from Xiaomi Gateway 3. Because go2rtc is a small application that you can install almost anywhere.
Unfortunately Safari is the only browser at the moment that supports H265 for WebRTC.
Codecs madness
The text was updated successfully, but these errors were encountered: