-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support H265 for WebRTC in Safari with go2rtc #5
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. |
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: