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

rtsp stream wyze cam v4 not working #1215

Closed vknmakes closed 1 month ago

vknmakes commented 1 month ago

Describe the bug

Provide a clear and concise description of the issue and include logs if applicable.

All other default streams appear to work fine, including, rtsp snapshot, however, rtsp stream to vlc does not work (working to connect to frigate but trying to get rtsp sorted out first). I tried downgrading to container versions without any change in behavior. I only have the v4 cam to test with, so, I'm a bit blind beyond the logs since I can't A/B test with something else, but I assume that since I can talk to the camera and other streams are working, rtsp stream should be gnerated.

VLC error is:

VLC is unable to open the MRL 'rtsp://10.0.1.203:8554/cottage-door'. Check the log for details.

Turning on log_level=debug:

2.9.2 log:

Attaching to wyze-bridge wyze-bridge | wyze-bridge | 🚀 DOCKER-WYZE-BRIDGE v2.9.2 X86_64 wyze-bridge | wyze-bridge | 10:45:05 [DEBUG][WyzeBridge] Using 10.0.1.203 for webrtc wyze-bridge | 10:45:05 [INFO][WyzeBridge] 🔍 Could not find local cache for 'auth' wyze-bridge | Serving Flask app 'frontend' wyze-bridge | Debug mode: off wyze-bridge | 10:45:05 [INFO][WyzeBridge] ☁️ Fetching 'auth' from the Wyze API... wyze-bridge | 10:45:05 [DEBUG][WyzeBridge] Starting new HTTPS connection (1): auth-prod.api.wyze.com:443 wyze-bridge | 10:45:05 [INFO][WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. wyze-bridge | Running on all addresses (0.0.0.0) wyze-bridge | Running on http://127.0.0.1:5000 wyze-bridge | * Running on http://172.21.0.2:5000 wyze-bridge | 10:45:05 [INFO][WyzeBridge] Press CTRL+C to quit wyze-bridge | 10:45:05 [DEBUG][WyzeBridge] https://auth-prod.api.wyze.com:443 "POST /api/user/login HTTP/1.1" 200 None wyze-bridge | 10:45:05 [INFO][WyzeBridge] 💾 Saving 'auth' to local cache... wyze-bridge | 10:45:05 [INFO][WyzeBridge] 🔍 Could not find local cache for 'user' wyze-bridge | 10:45:05 [INFO][WyzeBridge] ☁️ Fetching 'user' from the Wyze API... wyze-bridge | 10:45:05 [DEBUG][WyzeBridge] Starting new HTTPS connection (1): api.wyzecam.com:443 wyze-bridge | 10:45:06 [DEBUG][WyzeBridge] https://api.wyzecam.com:443 "POST /app/user/get_user_info HTTP/1.1" 200 281 wyze-bridge | 10:45:06 [INFO][WyzeBridge] 💾 Saving 'user' to local cache... wyze-bridge | 10:45:06 [INFO][WyzeBridge] 🔍 Could not find local cache for 'cameras' wyze-bridge | 10:45:06 [INFO][WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API... wyze-bridge | 10:45:06 [DEBUG][WyzeBridge] Starting new HTTPS connection (1): api.wyzecam.com:443 wyze-bridge | 10:45:06 [DEBUG][WyzeBridge] https://api.wyzecam.com:443 "POST /app/v2/home_page/get_object_list HTTP/1.1" 200 1032 wyze-bridge | 10:45:06 [INFO][WyzeBridge] [API] Fetched [1] cameras wyze-bridge | 10:45:06 [DEBUG][WyzeBridge] [API] cameras=['Cottage Door'] wyze-bridge | 10:45:06 [INFO][WyzeBridge] 💾 Saving 'cameras' to local cache... wyze-bridge | 10:45:06 [INFO][WyzeBridge] [+] Adding Cottage Door [HL_CAM4] wyze-bridge | 10:45:06 [INFO][WyzeBridge] starting MediaMTX 1.1.1 wyze-bridge | 10:45:06 [INFO][WyzeBridge] 🎬 1 stream enabled wyze-bridge | 10:45:07 [INFO][WyzeBridge] 10.0.1.242 - - [19/May/2024 10:45:07] "GET /api/sse_status HTTP/1.1" 200 - wyze-bridge | 10:45:07 [INFO][WyzeBridge] 🎉 Connecting to WyzeCam V4 - Cottage Door on 10.0.1.124 wyze-bridge | 10:45:07 [WARNING][WyzeBridge] WARNING: This process (pid=1) is multi-threaded, use of fork() may lead to deadlocks in the child. wyze-bridge | 10:45:07 [DEBUG][cottage-door] Connect via IOTC_Connect_ByUIDEx wyze-bridge | 10:45:08 [INFO][cottage-door] AV Client Start: chan_id=0 expected_chan=0 wyze-bridge | 10:45:08 [DEBUG][cottage-door] Now listening on channel id 0 wyze-bridge | 10:45:08 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10000 txt_len=0> b'' wyze-bridge | 10:45:08 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10001 txt_len=17>: b'\x03\x81\x81\x8a\x8bQt\xf0\x9b\x1e\xd5)\x96_j\x8f\xce' wyze-bridge | 10:45:08 [DEBUG][cottage-door] Sending response: wyze-bridge | 10:45:08 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10008 txt_len=31> b'\x9c\x06\xc2\x8d\x82\xd0i\xfaZm\xa4\x15\x90\xc2\x83\x1147f5\x01\x00\x0814112787' wyze-bridge | 10:45:08 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10009 txt_len=738>: b'{"connectionRes":"1","cameraInfo":{"audioParm":{"sampleRate":"16000"},"videoParm":{"type":"H264","bitRate":"30","resolution":"2","fps":"20","horizontalFlip":"1","verticalFlip":"1","logo":"1","time":"1"},"settingParm":{"stateVision":"1","nightVision":"3","osd":"1","logSd":"1","logUdisk":"1","telnet":"2","tz":"-4","location":"1"},"basicInfo":{"firmware":"4.52.3.9455","type":"camera","hardware":"0.0.0.0","model":"HL_CAM4","mac":"80482C2A3AAA","wifidb":"70"},"channelResquestResult":{"video":"1","audio":"0"},"recordType":{"type":"1"},"sdParm":{"status":"2","capacity":"0","free":"0","detail":"0"},"uDiskParm":{"status":"2","capacity":"0","free":"0"},"apartalarmParm":{"type":"0","startX":"25","longX":"50","startY":"25","heightY":"50"}}}' wyze-bridge | 10:45:08 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10056 txt_len=3> b'\x04\xb4\x00' wyze-bridge | 10:45:08 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10057 txt_len=1>: b'\x01' wyze-bridge | 10:45:09 [DEBUG][cottage-door] No longer listening on channel id 0 wyze-bridge | 10:45:09 [DEBUG][cottage-door] [videoParm] {'type': 'H264', 'bitRate': '30', 'resolution': '2', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1', 'logo': '1', 'time': '1'} wyze-bridge | 10:45:09 [DEBUG][cottage-door] [cameraInfo] {'audioParm': {'sampleRate': '16000'}, 'videoParm': {'type': 'H264', 'bitRate': '30', 'resolution': '2', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1', 'logo': '1', 'time': '1'}, 'settingParm': {'stateVision': '1', 'nightVision': '3', 'osd': '1', 'logSd': '1', 'logUdisk': '1', 'telnet': '2', 'tz': '-4', 'location': '1'}, 'basicInfo': {'firmware': '4.52.3.9455', 'type': 'camera', 'hardware': '0.0.0.0', 'model': 'HL_CAM4', 'mac': '80482C2A3AAA', 'wifidb': '70'}, 'channelResquestResult': {'video': '1', 'audio': '0'}, 'recordType': {'type': '1'}, 'sdParm': {'status': '2', 'capacity': '0', 'free': '0', 'detail': '0'}, 'uDiskParm': {'status': '2', 'capacity': '0', 'free': '0'}, 'apartalarmParm': {'type': '0', 'startX': '25', 'longX': '50', 'startY': '25', 'heightY': '50'}} wyze-bridge | 10:45:09 [INFO][cottage-door] 📡 Getting 180kb/s 2K stream (H264/20fps) via LAN mode (WiFi: 70%) FW: 4.52.3.9455 🔒 wyze-bridge | 10:45:09 [DEBUG][cottage-door] sync camera time wyze-bridge | 10:45:09 [DEBUG][cottage-door] Now listening on channel id 0 wyze-bridge | 10:45:09 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10092 txt_len=4> b'5\xd8If' wyze-bridge | 10:45:09 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10093 txt_len=1>: b'\x01' wyze-bridge | 10:45:09 [DEBUG][cottage-door] No longer listening on channel id 0 wyze-bridge | 10:45:09 [WARNING][cottage-door] WARNING: Skipping wrong frame_size at start of stream [frame_size=1] wyze-bridge | 10:45:09 [WARNING][cottage-door] WARNING: Skipping wrong frame_size at start of stream [frame_size=1] wyze-bridge | 10:45:10 [WARNING][cottage-door] WARNING: Skipping wrong frame_size at start of stream [frame_size=1] wyze-bridge | 10:45:10 [WARNING][cottage-door] [video] super slow wyze-bridge | 10:45:10 [WARNING][cottage-door] WARNING: clear buffer wyze-bridge | 10:45:10 [DEBUG][cottage-door] sync camera time wyze-bridge | 10:45:10 [DEBUG][cottage-door] Now listening on channel id 0 wyze-bridge | 10:45:10 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10092 txt_len=4> b'6\xd8If' wyze-bridge | 10:45:10 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10093 txt_len=1>: b'\x01' wyze-bridge | 10:45:10 [DEBUG][cottage-door] No longer listening on channel id 0 wyze-bridge | 10:45:10 [DEBUG][cottage-door] [video] slow gap=6.179626703262329 wyze-bridge | 10:45:10 [INFO][WyzeBridge] ✅ '/cottage-door stream is UP! (3/3) wyze-bridge | 10:45:10 [INFO][WyzeBridge] 📖 New client reading from cottage-door wyze-bridge | 10:45:24 [DEBUG][cottage-door] [CONTROL] Attempting to GET: bitrate wyze-bridge | 10:45:24 [DEBUG][cottage-door] Now listening on channel id 0 wyze-bridge | 10:45:24 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10050 txt_len=0> b'' wyze-bridge | 10:45:24 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10051 txt_len=6>: b'\xb4\x00\x04\x14\x01\x01' wyze-bridge | 10:45:24 [DEBUG][cottage-door] No longer listening on channel id 0 wyze-bridge | 10:45:24 [DEBUG][cottage-door] [CONTROL] response=180

2.8.2 log:

Attaching to wyze-bridge wyze-bridge | wyze-bridge | 🚀 DOCKER-WYZE-BRIDGE v2.8.2 X86_64 wyze-bridge | wyze-bridge | 10:40:30 [DEBUG][WyzeBridge] Using 10.0.1.203 for webrtc wyze-bridge | Serving Flask app 'frontend' wyze-bridge | Debug mode: off wyze-bridge | 10:40:30 [INFO][WyzeBridge] 📚 Using 'auth' from local cache... wyze-bridge | 10:40:30 [INFO][WyzeBridge] 📚 Using 'user' from local cache... wyze-bridge | 10:40:30 [INFO][WyzeBridge] 📚 Using 'cameras' from local cache... wyze-bridge | 10:40:30 [INFO][WyzeBridge] [+] Adding Cottage Door [HL_CAM4] wyze-bridge | 10:40:30 [INFO][WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. wyze-bridge | Running on all addresses (0.0.0.0) wyze-bridge | Running on http://127.0.0.1:5000 wyze-bridge | * Running on http://172.21.0.2:5000 wyze-bridge | 10:40:30 [INFO][WyzeBridge] Press CTRL+C to quit wyze-bridge | 10:40:30 [INFO][WyzeBridge] starting MediaMTX 1.1.1 wyze-bridge | 10:40:30 [INFO][WyzeBridge] 🎬 1 stream enabled wyze-bridge | 10:40:31 [INFO][WyzeBridge] 10.0.1.242 - - [19/May/2024 10:40:31] "GET /api/sse_status HTTP/1.1" 200 - wyze-bridge | 10:40:36 [INFO][WyzeBridge] 🎉 Connecting to WyzeCam V4 - Cottage Door on 10.0.1.124 wyze-bridge | 10:40:36 [WARNING][WyzeBridge] WARNING: This process (pid=1) is multi-threaded, use of fork() may lead to deadlocks in the child. wyze-bridge | 10:40:36 [DEBUG][cottage-door] Connect via IOTC_Connect_ByUIDEx wyze-bridge | 10:40:37 [INFO][cottage-door] AV Client Start: chan_id=0 expected_chan=0 wyze-bridge | 10:40:37 [DEBUG][cottage-door] Now listening on channel id 0 wyze-bridge | 10:40:37 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10000 txt_len=0> b'' wyze-bridge | 10:40:37 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10001 txt_len=17>: b'\x03%\xff\xef|\xa3\xfa|\xc0y\x9b]0L4j\xd8' wyze-bridge | 10:40:37 [DEBUG][cottage-door] Sending response: wyze-bridge | 10:40:37 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10008 txt_len=31> b'\xf7\xa2x\xc0\xb9V\x83d\xddk\xfb\xfd\x9e\x99Eg99d1\x01\x00\x0814112787' wyze-bridge | 10:40:37 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10009 txt_len=738>: b'{"connectionRes":"1","cameraInfo":{"audioParm":{"sampleRate":"16000"},"videoParm":{"type":"H264","bitRate":"30","resolution":"2","fps":"20","horizontalFlip":"1","verticalFlip":"1","logo":"1","time":"1"},"settingParm":{"stateVision":"1","nightVision":"3","osd":"1","logSd":"1","logUdisk":"1","telnet":"2","tz":"-4","location":"1"},"basicInfo":{"firmware":"4.52.3.9455","type":"camera","hardware":"0.0.0.0","model":"HL_CAM4","mac":"80482C2A3AAA","wifidb":"70"},"channelResquestResult":{"video":"1","audio":"0"},"recordType":{"type":"1"},"sdParm":{"status":"2","capacity":"0","free":"0","detail":"0"},"uDiskParm":{"status":"2","capacity":"0","free":"0"},"apartalarmParm":{"type":"0","startX":"25","longX":"50","startY":"25","heightY":"50"}}}' wyze-bridge | 10:40:37 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10056 txt_len=3> b'\x04\xb4\x00' wyze-bridge | 10:40:37 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10057 txt_len=1>: b'\x01' wyze-bridge | 10:40:38 [DEBUG][cottage-door] No longer listening on channel id 0 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [videoParm] {'type': 'H264', 'bitRate': '30', 'resolution': '2', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1', 'logo': '1', 'time': '1'} wyze-bridge | 10:40:38 [DEBUG][cottage-door] [cameraInfo] {'audioParm': {'sampleRate': '16000'}, 'videoParm': {'type': 'H264', 'bitRate': '30', 'resolution': '2', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1', 'logo': '1', 'time': '1'}, 'settingParm': {'stateVision': '1', 'nightVision': '3', 'osd': '1', 'logSd': '1', 'logUdisk': '1', 'telnet': '2', 'tz': '-4', 'location': '1'}, 'basicInfo': {'firmware': '4.52.3.9455', 'type': 'camera', 'hardware': '0.0.0.0', 'model': 'HL_CAM4', 'mac': '80482C2A3AAA', 'wifidb': '70'}, 'channelResquestResult': {'video': '1', 'audio': '0'}, 'recordType': {'type': '1'}, 'sdParm': {'status': '2', 'capacity': '0', 'free': '0', 'detail': '0'}, 'uDiskParm': {'status': '2', 'capacity': '0', 'free': '0'}, 'apartalarmParm': {'type': '0', 'startX': '25', 'longX': '50', 'startY': '25', 'heightY': '50'}} wyze-bridge | 10:40:38 [INFO][cottage-door] 📡 Getting 180kb/s 2K stream (H264/20fps) via LAN mode (WiFi: 70%) FW: 4.52.3.9455 🔒 wyze-bridge | 10:40:38 [DEBUG][cottage-door] sync camera time wyze-bridge | 10:40:38 [DEBUG][cottage-door] Now listening on channel id 0 wyze-bridge | 10:40:38 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10092 txt_len=4> b'&\xd7If' wyze-bridge | 10:40:38 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10093 txt_len=1>: b'\x01' wyze-bridge | 10:40:38 [DEBUG][cottage-door] No longer listening on channel id 0 wyze-bridge | 10:40:38 [WARNING][cottage-door] WARNING: Skipping wrong frame_size at start of stream [frame_size=1] wyze-bridge | 10:40:38 [WARNING][cottage-door] WARNING: Skipping wrong frame_size at start of stream [frame_size=1] wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=1.1399273872375488 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=1.0904805660247803 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=1.0410575866699219 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.9915196895599365 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.9420561790466309 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.7938637733459473 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.7932801246643066 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.7436268329620361 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.6937205791473389 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.643775224685669 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.593773603439331 wyze-bridge | 10:40:38 [DEBUG][cottage-door] [video] slow gap=0.5437660217285156 wyze-bridge | 10:40:38 [INFO][WyzeBridge] ✅ '/cottage-door stream is UP! (3/3) wyze-bridge | 10:40:39 [INFO][WyzeBridge] 📖 New client reading from cottage-door wyze-bridge | 10:40:53 [DEBUG][cottage-door] [CONTROL] Attempting to GET: bitrate wyze-bridge | 10:40:53 [DEBUG][cottage-door] Now listening on channel id 0 wyze-bridge | 10:40:53 [DEBUG][cottage-door] SEND <TutkWyzeProtocolHeader prefix=b'HL' protocol=5 code=10050 txt_len=0> b'' wyze-bridge | 10:40:53 [DEBUG][cottage-door] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=36 code=10051 txt_len=6>: b'\xb4\x00\x04\x14\x01\x01' wyze-bridge | 10:40:53 [DEBUG][cottage-door] No longer listening on channel id 0 wyze-bridge | 10:40:53 [DEBUG][cottage-door] [CONTROL] response=180 ^CGracefully stopping... (press Ctrl+C again to force)

Environment (if applicable)

mrlt8 commented 1 month ago

Your logs look fine. VLC will sometimes timeout waiting for the stream to start, so you may need to hit play again.

Have you tried setting ON_DEMAND=false?

vknmakes commented 1 month ago

Aha! You are correct. I did set ON_DEMAND=false, but VLC still unhappy, however, I verified stream with ffplay: ffplay rtsp://10.0.1.203:8554/cottage-door

Everything behaves as it should. Now to see if Frigate will talk with it; Thank you very much for wyze-bridge!