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.57k stars 157 forks source link

livestream (to youtube) does not start until accessing web UI #985

Open kratsg opened 1 year ago

kratsg commented 1 year ago

Thanks for a great project, just curious if it is expected behavior that you access the web UI to see the cameras first before the livestream enables? When restarting after docker-compose up -d , I see this while tailing the logs

🚀 DOCKER-WYZE-BRIDGE v2.3.17

[WyzeBridge] 📚 Using 'auth' from local cache...
[WyzeBridge] 📚 Using 'user' from local cache...
[WyzeBridge] 📚 Using 'cameras' from local cache...
[WyzeBridge] [+] Adding The Night’s Watch [HL_PAN3]
 * Serving Flask app 'frontend'
 * Debug mode: off
[WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://172.18.0.2:5000
[WyzeBridge] Press CTRL+C to quit
[WyzeBridge] starting MediaMTX 1.0.3
[WyzeBridge] 🎬 1 stream enabled

then accessing the web UI, with some delay, I see

[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:07] "GET / HTTP/1.1" 200 -
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:07] "GET /static/site.css HTTP/1.1" 304 -
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:08] "GET /static/site.js HTTP/1.1" 304 -
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:08] "GET /img/the-nights-watch.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:08] "GET /img/the-nights-watch.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:08] "GET /api/sse_status HTTP/1.1" 200 -
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:08] "GET /img/the-nights-watch.jpg HTTP/1.1" 304 -
[WyzeBridge] 🎉 Connecting to WyzeCam Pan V3 - The Night’s Watch on 10.0.0.99
[the-nights-watch] 📡 Getting 180kb/s HD stream (H264/20fps) via LAN mode (WiFi: 37%) FW: 4.50.4.4767 🔒 (DTLS) (2/3)
[the-nights-watch] 📺 YouTube livestream enabled
[the-nights-watch] WARNING: Skipping smaller frame at start of stream (frame_size=1)
[WyzeBridge] ✅ '/the-nights-watch stream is UP! (3/3)
[WyzeBridge] 📖 New client reading from the-nights-watch
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:44] "GET /snapshot/the-nights-watch.jpg?1693867298623 HTTP/1.1" 200 -
[WyzeBridge] 📖 New client reading from the-nights-watch
[WyzeBridge] 📕 Client stopped reading from the-nights-watch
[WyzeBridge] 172.18.0.1 - - [04/Sep/2023 22:41:46] "GET /snapshot/the-nights-watch.jpg?1693867298623 HTTP/1.1" 200 -
[WyzeBridge] 📕 Client stopped reading from the-nights-watch

it's not clear to me how it's meant to be enabled without manual intervention?

kratsg commented 1 year ago

Somewhat related -- the wyze-bridge service seems to stop sending to YouTube when I close my browser (and not running in the background). Am I using the wrong solution?

kratsg commented 1 year ago

I believe the solution here is that ON_DEMAND is disabled by default (meaning an active client needs to be there to connect the camera), so adding ON_DEMAND=False seems to work. I'll leave this open until someone can confirm the expected behavior.