mrlt8 / docker-wyze-bridge

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container
GNU Affero General Public License v3.0
2.45k stars 151 forks source link

Video Delay, Audio real time. #1231

Open delmlund opened 1 month ago

delmlund commented 1 month ago

Describe the bug

Running latest edge build as of today. I usually don't turn audio on but needing it now that using camera as toddler cam.

Camera is loosing Video alignment more more as day goes on. Audio is still perfectly in sync though. Last reboot the the app was ~8 hours ago and video is ~8 seconds behind, audio is within a second of real time.

Formally was running v2.6 with audio disabled. Rock solid. Would have weeks+ uptime, with ~1 second or less video delay. Upgraded to v2.9.3, also seemed to be solid with audio disabled. Once audio was turned on, video slipping behind. Also had this issue with previous versions, but had no need for audio so didn't bother to look into more.

Running UNRAID. Will supply logs I have from there:

text error warn system array login

[WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:26] "GET /api/sse_status HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:26] "GET /favicon.ico HTTP/1.1" 404 - [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:28] "GET /img/baby-cam.jpg HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:28] "GET /img/baby-cam.jpg HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET / HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/site.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/bulma.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/loading.svg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/bulma-toast.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/site.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/bulma.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/site.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/bulma-toast.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /static/site.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:38] "GET /api/sse_status HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:45] "GET /api/sse_status HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET / HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /static/site.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /static/bulma.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /static/bulma-toast.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /static/site.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:53] "GET /api/sse_status HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /?fullscreen HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /static/bulma.css HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /static/site.css HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /static/bulma-toast.js HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /static/site.js HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /img/baby-cam.jpg HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /api/sse_status HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /img/baby-cam.jpg HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:29:57] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:19] "GET /api/sse_status HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:19] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET / HTTP/1.1" 200 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /static/site.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /static/bulma.css HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /static/site.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /static/bulma-toast.js HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /img/baby-cam.jpg HTTP/1.1" 304 - [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:25] "GET /api/sse_status HTTP/1.1" 200 - [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:56] "GET /snapshot/baby-cam.jpg?1716697855431 HTTP/1.1" 200 - [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:30:58] "GET /snapshot/baby-cam.jpg?1716697855431 HTTP/1.1" 200 - [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:31:26] "GET /snapshot/baby-cam.jpg?1716697885436 HTTP/1.1" 200 - [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:31:28] "GET /snapshot/baby-cam.jpg?1716697885436 HTTP/1.1" 200 - [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:31:56] "GET /snapshot/baby-cam.jpg?1716697915435 HTTP/1.1" 200 - [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] 192.168.2.235 - - [26/May/2024 12:31:58] "GET /snapshot/baby-cam.jpg?1716697915435 HTTP/1.1" 200 - [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam [WyzeBridge] ๐Ÿ“• Client stopped reading from baby-cam [WyzeBridge] ๐Ÿ“– New client reading from baby-cam

Bridge Info Report:

Wyze-Bridge Info.pdf

Unraid Docker config:

Docker Settings

Environment (if applicable)

delmlund commented 1 month ago

Here are the logs after a reboot of the container to show boot up logs:

๐Ÿš€ DOCKER-WYZE-BRIDGE v2.9.3 X86_64 EDGE BUILD [2024-05-25t15:08:07.923z] 81d7fee

[WyzeBridge] โ™ป๏ธ Clearing local cache... [WyzeBridge] ๐Ÿ” Could not find local cache for 'auth' [WyzeBridge] โ˜๏ธ Fetching 'auth' from the Wyze API...

mrlt8 commented 1 month ago

I noticed it as well. Could you try the latest edge build to see if that helps?

delmlund commented 1 month ago

Thanks for update. Installed this morning. Only been ~2 hours but looking good.

I see new log entries, looks like itโ€™s restarting stream? (At work so having to vpn in on phone)

IMG_6998

mrlt8 commented 1 month ago

The audio seemed to be a little behind in the last one so, I reduced the queue size to try to keep the audio up to speed with the video. Feedback would be appreciated.

delmlund commented 1 month ago

Looks like video is still slipping behind. Been running this build since ~7am, now 3pm and looks to have slipped ~10 seconds behind.

Canโ€™t confirm if audio is behind or still real time as still at work, but checking time stamp on video to clock itโ€™s slipped.

delmlund commented 1 month ago

Pulled the latest edge. Unfortunately after ~3 hours, fallen 5 seconds behind on video.

mrlt8 commented 1 month ago

Thanks for the feedback! Just to confirm is this the WebRTC stream that's falling behind?

delmlund commented 1 month ago

WebRTC and RTSP both fell behind.

I have the WebRTC Stream on computers and iPad. Then the RTSP stream with Scrypted to AppleTV/Homekit.

Both seemed pretty equally behind.

mrlt8 commented 1 month ago

Made some minor changes that seemed to help for me. Stable connection with audio and video staying in sync for 10+ hours.

delmlund commented 1 month ago

Sadly mine dropped ~50 seconds over 24 hours still with latest build.

mrlt8 commented 4 weeks ago

hmm, I can't seem to replicate the issue. Is the audio staying close to real time? Can you try the latest edge version to see if that helps?

delmlund commented 4 weeks ago

I didn't test audio sync the last edge version, but previous builds the audio was real time, and just the video was lagged behind.

Just pull/installed latest edge. Will see how it goes over night.

delmlund commented 4 weeks ago

I think youโ€™ve done it! Running over night and hasnโ€™t slipped a single second.

Many thanks for hard work!