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

WebRTC stream freezes #1091

Open
vuminhkh opened this issue May 5, 2024 · 8 comments
Open

WebRTC stream freezes #1091

vuminhkh opened this issue May 5, 2024 · 8 comments
Labels
question Further information is requested

Comments

@vuminhkh
Copy link

vuminhkh commented May 5, 2024

Hello,

I'm writing a react native app using react-native-webrtc to communicate with go2rtc via frigate and home assistant. It works great in webrtc mode on my Tapo C210, Hikvision doorbell, but on my Annke FCD600 cameras with high resolution 3632 x 1632 in H264, the video stream freezes every seconds or even don't start at all (in debug log the stream receive mute event frequently and takes really long time to establish the connection, the bi directional audio stream is ok). If I reduces the bit rate drastically, then it works a little bit better but it still freezes from time to time, in night mode it freezes less than day mode. In the same time on all other cameras, it works great, if you guys have an idea how to debug this, I'll be very thankful. Basically, if i'm not mistaken Annke is just Hikvision rebranded, so I'm not sure what can be different between my Annke stream and Hikvision doorbell streams. I'm using go2rtc 1.8.5. Thank you in advance for your help.

@vuminhkh
Copy link
Author

vuminhkh commented May 6, 2024

The hikvision doorbell's video in 1920x1080 also freezes from time to time.

@AlexxIT AlexxIT added the question Further information is requested label May 13, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 13, 2024

It depends if you using WebRTC inside or outside your home network.

@vuminhkh
Copy link
Author

I have the same problem inside or outside my network. I checked the stream configuration when i'm inside my network, it's IP v6 UDP which is used. Anyway with Tapo C210 (2304 x 1296), I have the best streaming experience, never freezes inside or outside. For the moment, for my Annke cameras, I get the video stream from home assistant in HLS mode (with 3, 4 seconds lag but no freezing) and audio + microphone stream via WebRTC as a work around. I really wish to be able to use WebRTC though but I don't know how to optimize to avoid freezing.

@AlexxIT
Copy link
Owner

AlexxIT commented May 18, 2024

Have you read recommendations?
https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-rtsp

@vuminhkh
Copy link
Author

Thanks, I prefix the rtsp stream with ffmpeg, it's still 'glitchy'
glichy_camera: ffmpeg:rtsp://username:password@192.168.1.123/live/ch00_1

@vuminhkh
Copy link
Author

I don't know how yet, but frigate on safari on my phone works better than react-native-webrtc. It's perhaps the library which has issues, but I still don't know why the tapo stream works well with react-native-webrtc but not the annke streams.

@vuminhkh
Copy link
Author

but in the same time, it's glitchy both on ios and android.

@AlexxIT
Copy link
Owner

AlexxIT commented May 22, 2024

Have you tried very glitchy version?

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

No branches or pull requests

2 participants