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.61k stars 161 forks source link

Audio delay #388

Open mjb83 opened 2 years ago

mjb83 commented 2 years ago

So to start as a question, would 20-30 second audio delay be considered acceptable delay or is the expectation real time? I have 4 cameras, 2x v2, 1x cam pan v1, 1x outdoor v1 and they all have around the same time delay. I can confirm two playback outputs tinycam pro for live monitoring in the kitchen as well I have the feeds all being sent to blue iris for video history / playback. Same delay exists on from both output feeds when watching live, looks to be RTSP not syncing the audio and video.

Not the end of the world but two of them are being used as baby cams so I would of course rather they were real time. Thoughts?

What would you need to diagnose, bridge logs don't seem to show any issue. Maybe I have a setting wrong in the config?

mrlt8 commented 2 years ago

Just to confirm, is the delay 20-30s behind real-time or behind the official app/tinycam?

I believe there is an option in the TUTK avclient to request that the data be synchronized, but it ended up causing the video frames to be dropped when I was playing around with it.

I'll have to look into this again and see what they're doing in the official app.

mjb83 commented 2 years ago

The video seems to be real time it's just the audio is delayed. So I'll see one of the kids make a noise and then I'll hear it later.

I can also hear them upstairs if they're really loud (real time of course) and then I get the 'echo' downstairs on tinycam after.

On Mon., May 23, 2022, 12:00 p.m. mrlt8, @.***> wrote:

Just to confirm, is the delay 20-30s behind real-time or behind the official app/tinycam?

I believe there is an option in the TUTK avclient to request that the data be synchronized, but it ended up causing the video frames to be dropped when I was playing around with it.

I'll have to look into this again and see what they're doing in the official app.

β€” Reply to this email directly, view it on GitHub https://github.com/mrlt8/docker-wyze-bridge/issues/388#issuecomment-1134858731, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWLQ5B7DU2AUUG2XWAARMCTVLOTS5ANCNFSM5WWIFMCQ . You are receiving this because you authored the thread.Message ID: @.***>

mjb83 commented 2 years ago

Any luck turning the data sync back on? I'm seeing considerable delays now on my wyze v3 that I just added. It's delayed about 2-3 minutes now.

mrlt8 commented 2 years ago

Does the delay increase over time or is it a constant delay?

Can you post the audio codec for the cam with the 3-min delay? I believe they keep switching the audio codecs around with some of the firmware updates.

mjb83 commented 2 years ago

It might be increasing, I'm not exactly sure but I could try to time it?

Log is here, looks like it's using alaw: 2022/07/10 21:04:35 [WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - on (1/3) 2022/07/10 21:04:38 [] πŸ“‘ Getting 120kb/s HD stream (20fps) via LAN mode (WiFi: 57%) FW: πŸ”’ (DTLS) (2/3) 2022/07/10 21:04:38 [] πŸ”Š Audio Enabled - ALAW/16,000Hz 2022/07/10 21:04:38 [] WARNING: Skipping smaller frame at start of stream (frame_size=1)

mrlt8 commented 2 years ago

@mjb83 Is the audio distorted in any way compared to the stock app?

mjb83 commented 2 years ago

Actually... having checked the actual app the sound is kind of garbled... Maybe there is something wrong with the camera?

Strange though as I had a cam pan in there previously that I retired and replaced with the V3. Maybe I need to roll back firmware or something..

tmeekes commented 1 year ago

Can also confirm I get serious audio delay on my Wyze Cam v3 too... haven't dug in to how long or significant it is... I just stopped using the audio because of it.

mrlt8 commented 1 year ago

hmm, I'm unable to replicate the delay. I tried comparing the audio from the bridge to the audio from firmware rtsp on a v2/v3 but they're both very similar.

Could this be a firmware and/or camera issue?

mrlt8 commented 1 year ago

@tmeekes can you post the FW version your camera is on and what audio codec you're getting?

tmeekes commented 1 year ago

@mrlt8 Let's see here, I've got two cameras here, running 4.36.9.139. I've set the env variable to use AAC.

Interestingly, it's not just the rtsp stream... I popped open the HLS stream and there's delay on there as well. Could it possibly be an issue with computing power? I am running a series of services on this PC... I wonder what it would look like on hw running nothing else... hmmm. At the same time, the video runs with limited delay, so I can only imagine.

Thoughts?

mrlt8 commented 1 year ago

Hmm. Could you try removing the AAC option to see if the re-encode is causing any issues?

JamHeHe commented 1 year ago

I've just recently started using wyze-bridge with a pair of Wyze Cam v3 and Zoneminder. I too see a delay in the audio, and have tried both with and without the AAC setting. I've also noticed a pattern of my Linux host becoming nonresponse after some time, typically less than 24 hours. I suspect it's related to the audio issues as I disabled audio yesterday, and things have been stable since. The one time I was able to use top when the system was mostly non- responsive (I already had a console session open), the wyze-bridge container was thrashing the CPU and the io waits were massive.

I'm running OpenSuSE Leap 15.3, Zoneminder 1.36.25, and Wyze Cam v3 4.36.9.139 firmware.

mrlt8 commented 1 year ago

Thanks for the data point! I did notice some delay with the RTSP firmware when audio was enabled, so I'll be taking another look at the audio.

mrlt8 commented 1 year ago

I think I found the issue and pushed some updates to the ffmpeg command on the dev branch which should reduce the delay.

Would appreciate it if someone could test it out and see if it helps.

JamHeHe commented 1 year ago

Thanks! I should be able to find some time to get it in place today. I'll let you know how it goes.

JamHeHe commented 1 year ago

I pulled the dev branch and enabled audio. My results were that audio was still not synced, and one of the 2 cameras actually wouldn't record video. Went back to the main branch and things are back to normal. I have other things to pay attention to right now, but I will try again in the near future just to make sure I didn't do something wrong.

mrlt8 commented 1 year ago

hmm, I'm unable to replicate the out of sync/delay on v4.36.9.139.. My rtsp stream is about 1/2 second off from the Wyze App.

Can you try rebooting the camera?

As for recording, there were some changes in the last release which will use the mov container if the camera is sending PCM audio which isn't compatible with the mp4 container.

JamHeHe commented 1 year ago

Thanks again. I'm stepping back a bit on the audio issue right now as there's something else going on. I'm having a hard time troubleshooting it, but need to square it away first.

Basically, at dusk and dawn I end up with something tied to the video driving my system into high IO Wait, and the whole system becomes unresponsive. I'm going to systematically work through the cameras Night Vision settings and see if anything hits.

Once I can get this squared away I'll go back to the audio piece.

Thanks for your responsiveness, and you're putting this together in the first place. Greatly appreciate your effort!

JamHeHe commented 1 year ago

I have stabilized my system. Turns out it was starved for memory. Upgraded the memory, and everything is much happier. Start with the simple stuff is the moral I guess.

With that, I gave the dev branch another go. It's definitely not happy. The audio is still out of sync, and it frequently causes the video into zoneminder to stop all together or break up at times. I used VLC to test outside of zoneminder and experienced similar issues there. Tried it both without and with the AAC switch.

As you aren't experiencing these issues, could it be tied to the ffmpeg version, of configuration, or something along those lines? I'm on 4.4 with my opensuse 15.3 fully patched up.

mrlt8 commented 1 year ago

The container is using ffmpeg-for-homebridge for the default images and FFmpeg-Builds for the images with hardware acceleration enabled, so we should be on the same ffmpeg build inside the container.

When you say out of sync, does the video also fall behind (compared to video only mode) or is it just the audio that's a few seconds behind? Could you also check the audio in the wyze app to make sure everything is good in there?

Do you have any extra options in your docker-compose? Could you try using the minimal config and see if there is a delay in VLC:

docker run \
  -e WYZE_EMAIL=email@email.com \
  -e WYZE_PASSWORD=password \
  -p 8554:8554 \
  mrlt8/wyze-bridge:latest
JamHeHe commented 1 year ago

I've been poking at it for a few days with no progress made I've tried it with the really simple config as you reference with no change.

What I've noticed is that the logs in Zoneminder show pkt.dts errors. I'm attaching a screenshot of the errors. I've been poking around the Zoneminder forums and see references to others having the same issue with certain cameras, but no fixes. Screenshot 2022-11-09 190053

mrlt8 commented 1 year ago

That's most likely caused by the raw h264 from the camera. Might be able to tweak some setting in the ffmpeg command to fix some of them but it may require re-encoding the video.

tmeekes commented 1 year ago

Interestingly (and I'm not sure what's changed) I'm noticing that my audio stream has a more regular delay now (a half second or so). Things seem to be working better... the extreme audio delays seem like they are gone now.

I should add that I am now making more regular restarts on the related containers now... so that might also be helping to hide any possible delays that build over time.

mrlt8 commented 1 year ago

@tmeekes Is that with the November firmware?

Still playing around with the buffer/sleep interval, but would appreciate some feedback with the changes on the dev branch.

Not sure if it's just the camera/firmware I'm testing with, but I've noticed that the audio from the bridge occasionally comes a fraction of a second ahead of the wyze app.

I've also noticed that it seems like the audio and video almost want to stay in sync, and that the video and audio will both lag equally when they fall behind.

tmeekes commented 1 year ago

Actually, Yea, that's a good point. I did update the cameras with the latest firmware... That's one of the few changes I can think I made to the system.

If I get some time, I'll see if I can take a look at the dev branch.

Shadester commented 1 year ago

I have this issue too on v3 camera. Like 45s delay or so. Haven't tried the dev branch.

mrlt8 commented 1 year ago

@Shadester Is that on a single camera or across multiple? There were some tweaks added to the latest release version that could potentially help with the audio delay.

Shadester commented 1 year ago

Single camera.

Mr-HaleYa commented 1 year ago

@mrlt8 Do you know if there's any progress on this? I added 3 cameras and noticed the audio delay is 15-45 sec. long enough for me to go downstairs talk to the camera, walk upstairs, get sat down, then listen to it...

Current config

version: v1.11.10

WYZE_EMAIL: ***
WYZE_PASSWORD: ***
NET_MODE: ANY
SNAPSHOT: RTSP30
MQTT_DTOPIC: homeassistant
ENABLE_AUDIO: true
ON_DEMAND: false
CAM_OPTIONS: []
TOTP_KEY: ***
IMG_TYPE: png
WB_IP: 195.168.***.***
AUDIO_CODEC: LIBOPUS
FRESH_DATA: true

I'm using the card from https://github.com/AlexxIT/WebRTC to view the feed over RTC from the RTSP URL

type: custom:webrtc-camera
url: rtsp://192.168.***.***:8554/loft-cam
ui: true
title: Loft Cam
poster: http://192.168.***.***:8123/local/loft-cam.png
muted: true
mode: webrtc

Im using this custom card to cut all the video lag over RTSP as mentioned in https://github.com/mrlt8/docker-wyze-bridge/issues/221. I've tested all the audio codecs and am currently using libopus, but they all seem to have the same delay... I've tested using generic cam integration and got the same results.

Fatal Python error: init_sys_streams: can't initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
KeyboardInterrupt
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site.py", line 73, in <module>
    import os
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1012, in get_code
  File "<frozen importlib._bootstrap_external>", line 672, in _compile_bytecode
KeyboardInterrupt
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Traceback (most recent call last):
  File "/app/rtsp_event.py", line 5, in <module>
    import signal
  File "/usr/local/lib/python3.10/signal.py", line 3, in <module>
    from enum import IntEnum as _IntEnum
  File "/usr/local/lib/python3.10/enum.py", line 2, in <module>
    from types import MappingProxyType, DynamicClassAttribute
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap>", line 555, in _init_module_attrs
KeyboardInterrupt
Output file #0 does not contain any stream
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site.py", line 73, in <module>
    import os
  File "/usr/local/lib/python3.10/os.py", line 29, in <module>
    from _collections_abc import _check_methods
  File "/usr/local/lib/python3.10/_collections_abc.py", line 416, in <module>
    class _CallableGenericAlias(GenericAlias):
KeyboardInterrupt
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Traceback (most recent call last):
  File "/app/rtsp_event.py", line 7, in <module>
    from datetime import datetime as dt
  File "/usr/local/lib/python3.10/datetime.py", line 758, in <module>
    timedelta.max = timedelta(days=999999999, hours=23, minutes=59, seconds=59,
  File "/usr/local/lib/python3.10/datetime.py", line 536, in __new__
    microseconds = round(microseconds + usdouble)
KeyboardInterrupt
[h264 @ 0x2e1f2b0] Missing reference picture, default is 0
[h264 @ 0x2e1f2b0] decode_slice_header error
Output file #0 does not contain any stream
Traceback (most recent call last):
  File "/app/rtsp_event.py", line 5, in <module>
    import signal
  File "/usr/local/lib/python3.10/signal.py", line 3, in <module>
    from enum import IntEnum as _IntEnum
  File "/usr/local/lib/python3.10/enum.py", line 2, in <module>
    from types import MappingProxyType, DynamicClassAttribute
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 975, in get_code
  File "<frozen importlib._bootstrap_external>", line 1074, in get_data
KeyboardInterrupt
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Fatal Python error: init_sys_streams: can't initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/io.py", line 52, in <module>
    import abc
  File "/usr/local/lib/python3.10/abc.py", line 92, in <module>
    class ABCMeta(type):
KeyboardInterrupt
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Output file #0 does not contain any stream
Traceback (most recent call last):
  File "/app/rtsp_event.py", line 7, in <module>
    from datetime import datetime as dt
  File "/usr/local/lib/python3.10/datetime.py", line 14, in <module>
    from operator import index as _index
  File "/usr/local/lib/python3.10/operator.py", line 408, in <module>
    from _operator import *
KeyboardInterrupt

my log is full of these but I don't know if that's related to audio

fresh boot gives me an output of

🎬 STARTING ALL 3 CAMERAS
2023/02/24 02:52:56 [WyzeBridge] Starting rtsp-simple-server v0.21.2
2023/02/24 02:52:56 [WyzeBridge] πŸŽ‰ Connecting to WyzeCam Pan - kitchen-cam on 192.168.***.*** (1/3)
2023/02/24 02:52:56 [WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - garage-door on 192.168.***.*** (1/3)
2023/02/24 02:52:56 [WyzeBridge] πŸŽ‰ Connecting to WyzeCam Pan - loft-cam on 192.168.***.*** (1/3)
2023/02/24 02:52:59 [Garage Door] πŸ“‘ Getting 120kb/s HD stream (H264/20fps) via LAN mode (WiFi: 69%) FW: 4.36.9.139 πŸ”’ (DTLS) (2/3)
2023/02/24 02:52:59 [Garage Door] πŸ”Š Audio Enabled - ALAW > LIBOPUS/16,000Hz
2023/02/24 02:52:59 [Garage Door] WARNING: Skipping smaller frame at start of stream (frame_size=1)
2023/02/24 02:53:01 [RTSP][GARAGE-DOOR] βœ… '/garage-door' stream is UP! (3/3)
Output file #0 does not contain any stream
2023/02/24 02:53:02 [Kitchen Cam] πŸ“‘ Getting 120kb/s HD stream (H264/15fps) via LAN mode (WiFi: 88%) FW: 4.10.9.1851 πŸ”’ (DTLS) (2/3)
2023/02/24 02:53:02 [Kitchen Cam] πŸ”Š Audio Enabled - MULAW > LIBOPUS/8,000Hz
2023/02/24 02:53:02 [Loft Cam] πŸ“‘ Getting 120kb/s HD stream (H264/15fps) via LAN mode (WiFi: 87%) FW: 4.10.9.1851 πŸ”’ (DTLS) (2/3)
2023/02/24 02:53:02 [Loft Cam] πŸ”Š Audio Enabled - MULAW > LIBOPUS/8,000Hz
2023/02/24 02:53:03 [RTSP][LOFT-CAM] βœ… '/loft-cam' stream is UP! (3/3)
2023/02/24 02:53:03 [RTSP][KITCHEN-CAM] βœ… '/kitchen-cam' stream is UP! (3/3)
Output file #0 does not contain any stream
Output file #0 does not contain any stream

Love the work you've done ❀️

mrlt8 commented 1 year ago

@Mr-HaleYa Not yet. It's been on my to-do list, but everything has been backed up trying to get sub-streams rolled into v2 of the bridge. Will try to revisit the audio issue after v2.

WebRTC from the bridge should have the least latency right now.

As for the errors, I believe most of those are probably related to the RTSP snapshots timing out.

BeardedTek commented 1 year ago

I too have this issue. I have 6 cameras going into wyze-bridge.

Here is my config:

networks:
  wyze:
    external: true
  frigate:
    external: true

services:
    wyze-bridge:
        container_name: wyze-bridge
        restart: unless-stopped
        image: mrlt8/wyze-bridge:latest
        volumes:
            - ./config:/config
        networks:
          - wyze
          - frigate
        ports:
            - 8888:8888
            - 1936:1935
            - 8554:8554
            - 5555:5000
            - 9997:9997
        environment:
            - WB_RTMP_URL=rtmp://192.168.2.241:1936/
            - WYZE_EMAIL=${EMAIL}
            - WYZE_PASSWORD=${PASS}
            - NET_MODE=LAN
            - SNAPSHOT=RTSP
            - QUALITY=HD120
            - ENABLE_AUDIO=True
            - AUDIO_CODEC=AAC
            - AUDIO_FILTER=highpass=f=300,lowpass=f=2500
            - FFMPEG_FLAGS=-fflags +flush_packets+genpts+discardcorrupt+nobuffer
            - RTSP_READTIMEOUT=10s
            - ON_DEMAND=false
            - RTSP_APIADDRESS=0.0.0.0:9997
            - RTSP_API=yes
            - RTSP_HLSTRUSTEDPROXIES=0.0.0.0/0
dnikles commented 1 year ago

With my v2 cameras the audio lag quickly grows over time. Restarted the bridge yesterday, today the lag is at least 20 minutes.

WilldabeastHA commented 1 year ago

Hi all, love the work that is being done here and would love to help contribute to this bug/issue. I have a Wyze cam, V3 and V2 both with extreme delayed audio issues. I would love to use this, but really need the audio to work. Can someone give me an idea of how to contribute and fix this issue? I’m not an expert, but willing to put in the effort to help this issue.

mrfabe commented 1 year ago

@WilldabeastHA It looks like the cameras you listed can use the Wyze beta firmware that enabled RTSP. You won't have to deal with the audio delays for your use case.

WilldabeastHA commented 1 year ago

@mrfabe i would love to use that little hack but the camera needs to be at an older wyze firmware for this to work. So my V3 cameras are already updated to new of firmware for that to work. My v2 cameras have spotty issues with reading SD cards and I can’t reliably use the SD card for the firmware hack. If it comes down to it I will just go with different cameras with native rtsp but was willing to work on this to help myself and others with this audio issue.

JamHeHe commented 1 year ago

There are a couple issues with the RTSP beta firmware.

  1. Wyze themselves have abandoned it. They say they're "evaluating the way forward". I'm not optimistic.

  2. If you find the RTSP beta firmware (it can still be found and downloaded), it has limitations. For instance, I have the Spotlight, and one camera connected to a light socket. If you use the beta firmware you lose control of those secondary devices.

I'd bought in to the Wyze ecosystem based on the "official" RTSP support, only to learn later it was beta, and didn't fully support the products I was using. It was about a month after I bought in that the official announcement came that Wyze was abandoning it (I know, "evaluating"). That made this project the only way for me to continue to use the cameras in the way I'd intended.

I'm thankful this project exists, and very thankful for those who give of their time to develop and maintain it.

mrlt8 commented 1 year ago

Hey @JamHeHe could you try this ffmpeg command in your docker-compose.yml?

- FFMPEG_CMD=ffmpeg -loglevel fatal -fflags +flush_packets+nobuffer+bitexact -flags +low_delay -re -thread_queue_size 100 -analyzeduration 50 -probesize 50 -f H264 -i - -thread_queue_size 100 -f s16le -ar 8000 -i /tmp/{cam_name}.wav -copyts -strict -2 -flags +global_header -c:v copy -c:a libopus -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -muxdelay 0 -muxpreload 0 -map 0:v -map 1:a -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/{cam_name}
JamHeHe commented 1 year ago

Gave it a try. I was still experiencing lag in the audio. Right after restart of the wyze-bridge and Zoneminder it was in the ballpark of 5 seconds.

I don't know if this helps or not, but maybe it points somewhere. When doing video only any motion triggers an immediate recording showing in Zoneminder. As soon as the audio is enabled it can take 5 to 10 minutes for the recording to appear. During this time I don't see any high utilization processes running. Not certain what the delay could be.

mrlt8 commented 1 year ago

hmm, still looking into this.

5 seconds.

is that an improvement from before?

JamHeHe commented 1 year ago

No Sir. It also, oddly, ends up with the video being chopped in weird ways (different from normal) in Zoneminder. It almost seems like the video gets chopped based on the audio, which being delayed misses some of the motion (which could be the way Zoneminder is processing the video based on how it's coming from the camera in a not good fashion).

It's hard to explain, but the recordings don't have all the motion. I'll put it in place again, when I have a chance, and play with it with VLC as the client and get back to you with any info I can provide from that experience that way, just to eliminate the Zoneminder variable. Are there any tools you'd rather I use as I troubleshoot that would provide better info?

Nbr1Sniper commented 1 year ago

This is still an issue for my V3 cameras. Really annoying after it took me forever to find out why audio got disabled somehow and how to re-enable it and get Scrypted to run everything to HomeKit.

Please fix the audio delay issue.

gtxaspec commented 1 year ago

Just noticed that I have the audio delay issue too... I realized this viewing recordings, and then check the livestream and it is indeed off. I'll try playing with ffmpeg parameteres to see if it makes a difference.

Since it happens on recordings, I'm assuming that the a/v path is net>bridge_subsystem>ffmpeg>disk, so no mediamtx in between. sound right @mrlt8 ?

mrlt8 commented 1 year ago

Correct. We're using ffmpeg's tee muxer when recording or using an external RTMP server so the sync issue is happening before MediaMTX.

gtxaspec commented 1 year ago

Just some quick testing of the live streams, the HD stream does have an audio delay of a few seconds to 10 seconds.

The sub streams have almost zero delay, sometimes the audio is ahead of the video by a few frames.

Restarting the container fixes the audio sync, no delay on both streams. I'll leave it up for a while and test again.

a9s2w5 commented 1 year ago

I too have delay on audio for streams. Pan V3s - It does seem to be worse with default setting. AAC is a bit less but both seem to increase over time. After a day or so, I will have 20-30s delay on cams. If there's any info I can provide, I will. Or does anyone have any suggestions? There is no delay from the wyze app or live site, running sub streams with all cameras but delay happens no matter what settings, even with sub streams turned off. Restarting the container does help.

1fastt2 commented 1 year ago

I'll chime in here as well. I've been experiencing audio delays of about 45 seconds ever after a fresh restart. l figured it would just get fixed as updates roll out and I'm certainly not one to complain since this docker is pretty amazing. I'm running the docker through HA on a virtual machine. 6 Wyze cams consisting of 3 V3 Pros, 2 V3's and 1 V2 routed through BlueIris. Computing power is certainly not the problem here. If there's any logs or config files anyone wants me to share to help resolve this issue id be happy to assist.

ahamill85 commented 1 year ago

I'm experiencing similar issues and have similar setups to the previous 2 comments. Happy to share config and logs if needed.

WilldabeastHA commented 1 year ago

Is there anyway to roll back the firmware on a wyze cam v3? I’m on 4.36.10.4054 and the wyze mini hack works on another v3 I have but the firmware can’t be past 4.36.9.139

BeardedTek commented 1 year ago

Yes, you can reflash any firmware.

Put the desired firmware on a FAT32 formatted sd card, insert in camera, then hold the reset button while powering on until the indicator light turns purple. Then wait about 4-5 minutes and reset the camera.

https://securitycamcenter.com/how-to-update-wyze-cam-firmware-manually/