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.49k stars 152 forks source link

ROTATE_DOOR Option Not Working with H264_NVENC #588

Closed hevel86 closed 1 year ago

hevel86 commented 1 year ago

I just enabled the Nvidia hardware option and the stream no longer works for doorbells. If I disable ROTATE_DOOR and enable H264_NVENC then the stream works again albeit not-rotated. If I enable ROTATE_DOOR and disable H264_NVENC then the stream works again albeit not hw accelerated.

Error messages in log: brave_h5inG3GUOM

Here's my docker-compose: MngokV5LMF

thatdaveguy1 commented 1 year ago

I have the same issue using Raspberry Pi hardware acceleration

mrlt8 commented 1 year ago

@hevel86 Could you add - DEBUG_FFMPEG=true to the environment so we can try to see why it's failing.

@thatdaveguy1 could you replace - /dev:/dev with:

devices:
    - /dev/video10:/dev/video10
    - /dev/video11:/dev/video11
    - /dev/video12:/dev/video12
hevel86 commented 1 year ago

@mrlt8 thanks for your response! Here's the log.

mrlt8 commented 1 year ago

Thanks @hevel86! Looks like nvenc doesn't support the ultrafast preset, so we'll have to use one of the nvidia presets. Could you try the dev branch image: mrlt8/wyze-bridge:dev-hw to see if that works?

hevel86 commented 1 year ago

Thanks @hevel86! Looks like nvenc doesn't support the ultrafast preset, so we'll have to use one of the nvidia presets. Could you try the dev branch image: mrlt8/wyze-bridge:dev-hw to see if that works?

Unfortunately, it doesn't seem like that did the trick. Here is the 2nd round of logs.

thatdaveguy1 commented 1 year ago

Thanks for replying mrlt8. Your plugin is the only reason I own Wyze cams... :)

No luck on the fix. Here's my docker-compose

version: '2.4' services: wyze-bridge: container_name: wyze-bridge-compose restart: unless-stopped image: mrlt8/wyze-bridge:1.8.13 ports:

here's my logs:

wyze-bridge-compose | 2022/11/05 03:01:32 [WyzeBridge] 🚀 STARTING DOCKER-WYZE-BRIDGE v1.8.13 wyze-bridge-compose | wyze-bridge-compose | 2022/11/05 03:01:32 [WyzeBridge] LL-HLS Enabled wyze-bridge-compose | 2022/11/05 03:01:32 [WyzeBridge] 🔐 Generating key for LL-HLS wyze-bridge-compose | Serving Flask app 'frontend' wyze-bridge-compose | Debug mode: off wyze-bridge-compose | 2022/11/05 03:01:32 [WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. wyze-bridge-compose | Running on all addresses (0.0.0.0) wyze-bridge-compose | Running on http://127.0.0.1:5000 wyze-bridge-compose | * Running on http://172.18.0.2:5000 wyze-bridge-compose | 2022/11/05 03:01:32 [WyzeBridge] Press CTRL+C to quit wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] 🔏 Generating certificate for LL-HLS wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] 🔍 Could not find local cache for 'user' wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] 🔍 Could not find local cache for 'auth' wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] ☁️ Fetching 'auth' from the Wyze API... wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] 💾 Saving 'auth' to local cache... wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] ☁️ Fetching 'user' from the Wyze API... wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] 💾 Saving 'user' to local cache... wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] 🔍 Could not find local cache for 'cameras' wyze-bridge-compose | 2022/11/05 03:01:34 [WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API... wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] 💾 Saving 'cameras' to local cache... wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] wyze-bridge-compose | 🎬 STARTING ALL 5 CAMERAS wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] Starting rtsp-simple-server v0.20.2 wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.50 (1/3) wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] 🎉 Connecting to WyzeCam V2 - southyard on 192.168.2.47 (1/3) wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] 🎉 Connecting to WyzeCam V3 - southdriveway on 192.168.2.231 (1/3) wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] 🎉 Connecting to WyzeCam V3 - northyard on 192.168.2.110 (1/3) wyze-bridge-compose | 2022/11/05 03:01:35 [WyzeBridge] 🎉 Connecting to WyzeCam V3 - northdriveway on 192.168.2.65 (1/3) wyze-bridge-compose | 2022/11/05 03:01:37 [SouthYard] 📡 Getting 255kb/s HD stream (15fps) via LAN mode (WiFi: 86%) FW: 4.9.9.1472 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:37 [SouthYard] 🔊 Audio Enabled - MULAW/8,000Hz wyze-bridge-compose | 2022/11/05 03:01:37 [NorthDriveway] 📡 Getting 255kb/s HD stream (20fps) via LAN mode (WiFi: 85%) FW: 4.36.10.2864 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:37 [NorthDriveway] 🔊 Audio Enabled - ALAW/16,000Hz wyze-bridge-compose | 2022/11/05 03:01:37 [NorthDriveway] WARNING: Skipping smaller frame at start of stream (frame_size=1) wyze-bridge-compose | 2022/11/05 03:01:37 [SouthDriveway] 📡 Getting 255kb/s HD stream (20fps) via LAN mode (WiFi: 98%) FW: 4.36.10.2864 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:37 [SouthDriveway] 🔊 Audio Enabled - ALAW/16,000Hz wyze-bridge-compose | 2022/11/05 03:01:37 [SouthDriveway] WARNING: Skipping smaller frame at start of stream (frame_size=1) wyze-bridge-compose | 2022/11/05 03:01:37 [Doorbell] 📡 Getting 240kb/s HD stream (20fps) via LAN mode (WiFi: 85%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:37 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 03:01:37 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 03:01:37 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) wyze-bridge-compose | 2022/11/05 03:01:38 [NorthYard] 📡 Getting 255kb/s HD stream (20fps) via LAN mode (WiFi: 60%) FW: 4.36.10.2864 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:38 [NorthYard] 🔊 Audio Enabled - ALAW/16,000Hz wyze-bridge-compose | 2022/11/05 03:01:38 [NorthYard] WARNING: Skipping smaller frame at start of stream (frame_size=1) wyze-bridge-compose | 2022/11/05 03:01:39 [RTSP][SOUTHYARD] ✅ '/southyard' stream is UP! (3/3) wyze-bridge-compose | Video encoding failed wyze-bridge-compose | 2022/11/05 03:01:39 [RTSP][SOUTHYARD] 📖 New client reading wyze-bridge-compose | 2022/11/05 03:01:39 [RTSP][NORTHDRIVEWAY] ✅ '/northdriveway' stream is UP! (3/3) wyze-bridge-compose | 2022/11/05 03:01:39 [RTSP][SOUTHDRIVEWAY] ✅ '/southdriveway' stream is UP! (3/3) wyze-bridge-compose | 2022/11/05 03:01:39 [Doorbell] WARNING: Audio pipe closed wyze-bridge-compose | 2022/11/05 03:01:39 [RTSP][NORTHDRIVEWAY] 📖 New client reading wyze-bridge-compose | 2022/11/05 03:01:39 [RTSP][SOUTHDRIVEWAY] 📖 New client reading wyze-bridge-compose | Output file #0 does not contain any stream wyze-bridge-compose | 2022/11/05 03:01:40 [RTSP][NORTHYARD] ✅ '/northyard' stream is UP! (3/3) wyze-bridge-compose | 2022/11/05 03:01:40 [RTSP][NORTHYARD] 📖 New client reading wyze-bridge-compose | Output file #0 does not contain any stream wyze-bridge-compose | 2022/11/05 03:01:40 [Doorbell] FFMPEG stopped wyze-bridge-compose | 2022/11/05 03:01:40 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.50 (1/3) wyze-bridge-compose | Output file #0 does not contain any stream wyze-bridge-compose | 2022/11/05 03:01:41 [RTSP][SOUTHDRIVEWAY] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:41 [RTSP][SOUTHYARD] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:41 [RTSP][NORTHYARD] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:42 [RTSP][NORTHDRIVEWAY] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:42 [Doorbell] 📡 Getting 240kb/s HD stream (20fps) via LAN mode (WiFi: 76%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:42 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 03:01:42 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 03:01:42 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) wyze-bridge-compose | Video encoding failed wyze-bridge-compose | 2022/11/05 03:01:44 [Doorbell] WARNING: Audio pipe closed wyze-bridge-compose | 2022/11/05 03:01:45 [Doorbell] FFMPEG stopped wyze-bridge-compose | 2022/11/05 03:01:45 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.50 (1/3) wyze-bridge-compose | 2022/11/05 03:01:48 [Doorbell] 📡 Getting 240kb/s HD stream (20fps) via LAN mode (WiFi: 79%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:48 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 03:01:48 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 03:01:48 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) wyze-bridge-compose | 2022/11/05 03:01:48 [NorthDriveway] WARNING: Frame not available yet wyze-bridge-compose | 2022/11/05 03:01:48 [NorthYard] WARNING: Frame not available yet wyze-bridge-compose | 2022/11/05 03:01:48 [SouthDriveway] WARNING: Frame not available yet wyze-bridge-compose | 2022/11/05 03:01:50 [RTSP][SOUTHDRIVEWAY] 📖 New client reading wyze-bridge-compose | 2022/11/05 03:01:50 [RTSP][SOUTHYARD] 📖 New client reading wyze-bridge-compose | 2022/11/05 03:01:50 [RTSP][NORTHYARD] 📖 New client reading wyze-bridge-compose | Video encoding failed wyze-bridge-compose | Output file #0 does not contain any stream wyze-bridge-compose | 2022/11/05 03:01:51 [Doorbell] WARNING: Audio pipe closed wyze-bridge-compose | 2022/11/05 03:01:51 [RTSP][NORTHDRIVEWAY] 📖 New client reading wyze-bridge-compose | 2022/11/05 03:01:51 [RTSP][SOUTHYARD] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:52 [Doorbell] FFMPEG stopped wyze-bridge-compose | 2022/11/05 03:01:52 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.50 (1/3) wyze-bridge-compose | 2022/11/05 03:01:52 [RTSP][SOUTHDRIVEWAY] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:53 [RTSP][NORTHYARD] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:53 [RTSP][NORTHDRIVEWAY] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 03:01:54 [Doorbell] 📡 Getting 240kb/s HD stream (20fps) via LAN mode (WiFi: 78%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 03:01:54 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 03:01:54 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 03:01:54 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) ^CGracefully stopping... (press Ctrl+C again to force)

mrlt8 commented 1 year ago

@hevel86 hmm, seems like it's doing some kind of encoding... can you try to access the streams? ffprobe -show_streams -i rtsp://path.to.your:8554/camera

We could always try setting the ffmpeg command directly with:

- FFMPEG_CMD_FRONT_DOOR=ffmpeg -loglevel verbose -f h264 -i - -c:v h264_nvenc -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554/{cam_name}

with audio to prevent memory issues:

- FFMPEG_CMD_FRONT_DOOR=ffmpeg -loglevel verbose -f h264 -i - -f s16le -ar 8000 -i /tmp/{cam_name}.wav -c:a aac -c:v h264_nvenc -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554/{cam_name}

I believe @mitchross was able to get nvenc to work

@thatdaveguy1 Could you run with - DEBUG_FFMPEG=true

thatdaveguy1 commented 1 year ago

@mrlt8 thanks again for looking, here it is with debug on

yze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] 🚀 STARTING DOCKER-WYZE-BRIDGE v1.8.13 wyze-bridge-compose | wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] 🔍 Could not find local cache for 'user' wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] 🔍 Could not find local cache for 'auth' wyze-bridge-compose | Serving Flask app 'frontend' wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] ☁️ Fetching 'auth' from the Wyze API... wyze-bridge-compose | Debug mode: off wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. wyze-bridge-compose | Running on all addresses (0.0.0.0) wyze-bridge-compose | Running on http://127.0.0.1:5000 wyze-bridge-compose | Running on http://172.18.0.2:5000 wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] Press CTRL+C to quit wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] 💾 Saving 'auth' to local cache... wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] ☁️ Fetching 'user' from the Wyze API... wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] 💾 Saving 'user' to local cache... wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] 🔍 Could not find local cache for 'cameras' wyze-bridge-compose | 2022/11/05 19:38:03 [WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API... wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] 💾 Saving 'cameras' to local cache... wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] wyze-bridge-compose | 🎬 STARTING ALL 5 CAMERAS wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] Starting rtsp-simple-server v0.20.2 wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.51 (1/3) wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] 🎉 Connecting to WyzeCam V2 - southyard on 192.168.2.48 (1/3) wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] 🎉 Connecting to WyzeCam V3 - southdriveway on 192.168.2.233 (1/3) wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] 🎉 Connecting to WyzeCam V3 - northyard on 192.168.2.111 (1/3) wyze-bridge-compose | 2022/11/05 19:38:04 [WyzeBridge] 🎉 Connecting to WyzeCam V3 - northdriveway on 192.168.2.67 (1/3) wyze-bridge-compose | 2022/11/05 19:38:06 [Doorbell] 📡 Getting 200kb/s HD stream (20fps) via LAN mode (WiFi: 78%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:06 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 19:38:06 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 19:38:06 [Doorbell] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f s16le -ar 8000 -i /tmp/doorbell.wav -flags +global_header -c:v h264_v4l2m2m -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v 77 -preset ultrafast -force_key_frames expr:gte(t,n_forced2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell wyze-bridge-compose | 2022/11/05 19:38:06 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 wyze-bridge-compose | [h264 @ 0x413c580] Reinit context to 1728x1296, pix_fmt: yuv420p wyze-bridge-compose | [h264 @ 0x412b680] Stream #0: not enough frames to estimate rate; consider increasing probesize wyze-bridge-compose | Input #0, h264, from 'pipe:': wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, unknown/bt709/unknown, progressive, left), 1728x1296, 20 tbr, 1200k tbn wyze-bridge-compose | 2022/11/05 19:38:06 [SouthYard] 📡 Getting 200kb/s HD stream (15fps) via LAN mode (WiFi: 83%) FW: 4.9.9.1472 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:06 [SouthYard] 🔊 Audio Enabled - MULAW/8,000Hz wyze-bridge-compose | 2022/11/05 19:38:06 [SouthYard] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f mulaw -ar 8000 -i /tmp/southyard.wav -flags +global_header -c:v copy -c:a copy -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/southyard wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | 2022/11/05 19:38:06 [SouthYard] WARNING: Skipping smaller frame at start of stream (frame_size=1) wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 wyze-bridge-compose | 2022/11/05 19:38:06 [NorthYard] 📡 Getting 200kb/s HD stream (20fps) via LAN mode (WiFi: 58%) FW: 4.36.10.2864 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:06 [NorthYard] 🔊 Audio Enabled - ALAW/16,000Hz wyze-bridge-compose | 2022/11/05 19:38:06 [NorthYard] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f alaw -ar 16000 -i /tmp/northyard.wav -flags +global_header -c:v copy -c:a copy -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/northyard wyze-bridge-compose | 2022/11/05 19:38:06 [NorthYard] WARNING: Skipping smaller frame at start of stream (frame_size=1) wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 wyze-bridge-compose | [h264 @ 0x22d7450] Reinit context to 1920x1088, pix_fmt: yuv420p wyze-bridge-compose | [h264 @ 0x22c6500] Stream #0: not enough frames to estimate rate; consider increasing probesize wyze-bridge-compose | Input #0, h264, from 'pipe:': wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1920x1080 (1920x1088), 20 tbr, 1200k tbn wyze-bridge-compose | 2022/11/05 19:38:07 [NorthDriveway] 📡 Getting 200kb/s HD stream (20fps) via LAN mode (WiFi: 100%) FW: 4.36.10.2864 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:07 [NorthDriveway] 🔊 Audio Enabled - ALAW/16,000Hz wyze-bridge-compose | 2022/11/05 19:38:07 [NorthDriveway] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f alaw -ar 16000 -i /tmp/northdriveway.wav -flags +global_header -c:v copy -c:a copy -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/northdriveway wyze-bridge-compose | 2022/11/05 19:38:07 [NorthDriveway] WARNING: Skipping smaller frame at start of stream (frame_size=1) wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 wyze-bridge-compose | 2022/11/05 19:38:07 [SouthDriveway] 📡 Getting 200kb/s HD stream (20fps) via LAN mode (WiFi: 87%) FW: 4.36.10.2864 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:07 [SouthDriveway] 🔊 Audio Enabled - ALAW/16,000Hz wyze-bridge-compose | 2022/11/05 19:38:07 [SouthDriveway] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f alaw -ar 16000 -i /tmp/southdriveway.wav -flags +global_header -c:v copy -c:a copy -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/southdriveway wyze-bridge-compose | [h264 @ 0x2d35450] Reinit context to 1920x1088, pix_fmt: yuv420p wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 wyze-bridge-compose | 2022/11/05 19:38:07 [SouthDriveway] WARNING: Skipping smaller frame at start of stream (frame_size=1) wyze-bridge-compose | [h264 @ 0x2d24500] Stream #0: not enough frames to estimate rate; consider increasing probesize wyze-bridge-compose | Input #0, h264, from 'pipe:': wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(progressive, left), 1920x1080 (1920x1088), 15 tbr, 1200k tbn wyze-bridge-compose | [h264 @ 0x2961450] Reinit context to 1920x1088, pix_fmt: yuv420p wyze-bridge-compose | [h264 @ 0x2950500] Stream #0: not enough frames to estimate rate; consider increasing probesize wyze-bridge-compose | Input #0, h264, from 'pipe:': wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1920x1080 (1920x1088), 20 tbr, 1200k tbn wyze-bridge-compose | Guessed Channel Layout for Input Stream #1.0 : mono wyze-bridge-compose | Input #1, s16le, from '/tmp/doorbell.wav': wyze-bridge-compose | Duration: N/A, bitrate: 128 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Codec AVOption coder (Coder type) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_v4l2m2m)) wyze-bridge-compose | Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native)) wyze-bridge-compose | [h264 @ 0x41787c0] Reinit context to 1728x1296, pix_fmt: yuv420p wyze-bridge-compose | [graph 0 input from stream 0:0 @ 0x4192610] w:1728 h:1296 pixfmt:yuv420p tb:1/1200000 fr:20/1 sar:0/1 wyze-bridge-compose | [Parsed_transpose_0 @ 0x4192420] w:1728 h:1296 dir:1 -> w:1296 h:1728 rotation:clockwise vflip:0 wyze-bridge-compose | [h264_v4l2m2m @ 0x4140fd0] Could not find a valid device wyze-bridge-compose | [h264_v4l2m2m @ 0x4140fd0] can't configure encoder wyze-bridge-compose | Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height wyze-bridge-compose | [s16le @ 0x414a1b0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) wyze-bridge-compose | [AVIOContext @ 0x413bf60] Statistics: 428146 bytes read, 0 seeks wyze-bridge-compose | [AVIOContext @ 0x4178e60] Statistics: 34560 bytes read, 0 seeks wyze-bridge-compose | Conversion failed! wyze-bridge-compose | 2022/11/05 19:38:08 [Doorbell] WARNING: Audio pipe closed wyze-bridge-compose | Guessed Channel Layout for Input Stream #1.0 : mono wyze-bridge-compose | Input #1, mulaw, from '/tmp/southyard.wav': wyze-bridge-compose | Duration: N/A, bitrate: 64 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s wyze-bridge-compose | [tcp @ 0x2df9960] Starting connection attempt to 0.0.0.0 port 8554 wyze-bridge-compose | [tcp @ 0x2df9960] Successfully connected to 0.0.0.0 port 8554 wyze-bridge-compose | [rtsp @ 0x2df6d90] SDP: wyze-bridge-compose | v=0 wyze-bridge-compose | o=- 0 0 IN IP4 127.0.0.1 wyze-bridge-compose | s=No Name wyze-bridge-compose | c=IN IP4 127.0.0.1 wyze-bridge-compose | t=0 0 wyze-bridge-compose | a=tool:libavformat 59.16.100 wyze-bridge-compose | m=video 0 RTP/AVP 96 wyze-bridge-compose | a=rtpmap:96 H264/90000 wyze-bridge-compose | a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z01AKJ2oHgCJ+WEAAAMAAQAAAwAehA==,aO48gAA=; profile-level-id=4D4028 wyze-bridge-compose | a=control:streamid=0 wyze-bridge-compose | m=audio 0 RTP/AVP 0 wyze-bridge-compose | b=AS:64 wyze-bridge-compose | a=control:streamid=1 wyze-bridge-compose | wyze-bridge-compose | Guessed Channel Layout for Input Stream #1.0 : mono wyze-bridge-compose | Input #1, alaw, from '/tmp/northyard.wav': wyze-bridge-compose | Duration: N/A, bitrate: 128 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_alaw, 16000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | [tcp @ 0x241e5c0] Starting connection attempt to 0.0.0.0 port 8554 wyze-bridge-compose | [tcp @ 0x241e5c0] Successfully connected to 0.0.0.0 port 8554 wyze-bridge-compose | [rtsp @ 0x241b010] SDP: wyze-bridge-compose | v=0 wyze-bridge-compose | o=- 0 0 IN IP4 127.0.0.1 wyze-bridge-compose | s=No Name wyze-bridge-compose | c=IN IP4 127.0.0.1 wyze-bridge-compose | t=0 0 wyze-bridge-compose | a=tool:libavformat 59.16.100 wyze-bridge-compose | m=video 0 RTP/AVP 96 wyze-bridge-compose | a=rtpmap:96 H264/90000 wyze-bridge-compose | a=fmtp:96 packetization-mode=1; sprop-parameter-sets=J00AKedAPAET8s1AQEB8AAADAAQAAAMAoM1ADqYAFfl//wKA,KO48gAA=; profile-level-id=4D0029 wyze-bridge-compose | a=control:streamid=0 wyze-bridge-compose | m=audio 0 RTP/AVP 97 wyze-bridge-compose | b=AS:128 wyze-bridge-compose | a=rtpmap:97 PCMA/16000/1 wyze-bridge-compose | a=control:streamid=1 wyze-bridge-compose | wyze-bridge-compose | [tee @ 0x2d42fd0] filename:'rtsp://0.0.0.0:8554/southyard' format:rtsp wyze-bridge-compose | [tee @ 0x2d42fd0] stream:0 codec:h264 type:video bsfs: AVBSFContext wyze-bridge-compose | [tee @ 0x2d42fd0] stream:1 codec:pcm_mulaw type:audio bsfs: null wyze-bridge-compose | Output #0, tee, to '[f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/southyard': wyze-bridge-compose | Metadata: wyze-bridge-compose | encoder : Lavf59.16.100 wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(progressive, left), 1920x1080 (0x0), q=2-31, 15 tbr, 15 tbn wyze-bridge-compose | Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (copy) wyze-bridge-compose | Stream #1:0 -> #0:1 (copy) [tee @ 0x2418630] filename:'rtsp://0.0.0.0:8554/northyard' format:rtsp00.00 bitrate=N/A speed= 0x wyze-bridge-compose | [tee @ 0x2418630] stream:0 codec:h264 type:video bsfs: AVBSFContext wyze-bridge-compose | [tee @ 0x2418630] stream:1 codec:pcm_alaw type:audio bsfs: null wyze-bridge-compose | Output #0, tee, to '[f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/northyard': wyze-bridge-compose | Metadata: wyze-bridge-compose | encoder : Lavf59.16.100 wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1920x1080 (0x0), q=2-31, 20 tbr, 20 tbn wyze-bridge-compose | Stream #0:1: Audio: pcm_alaw, 16000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (copy) wyze-bridge-compose | Stream #1:0 -> #0:1 (copy) 2022/11/05 19:38:08 [RTSP][SOUTHYARD] ✅ '/southyard' stream is UP! (3/3)00 bitrate=N/A speed= 0x wyze-bridge-compose | 2022/11/05 19:38:08 [RTSP][NORTHYARD] ✅ '/northyard' stream is UP! (3/3) wyze-bridge-compose | [h264 @ 0x3a19450] Reinit context to 1920x1088, pix_fmt: yuv420p wyze-bridge-compose | [tee @ 0x2418630] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly wyze-bridge-compose | [alaw @ 0x236fa40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) wyze-bridge-compose | 2022/11/05 19:38:08 [RTSP][SOUTHYARD] 📖 New client reading wyze-bridge-compose | Guessed Channel Layout for Input Stream #1.0 : mono wyze-bridge-compose | Input #1, alaw, from '/tmp/southdriveway.wav': wyze-bridge-compose | Duration: N/A, bitrate: 128 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_alaw, 16000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | [tcp @ 0x2ac7ac0] Starting connection attempt to 0.0.0.0 port 8554 wyze-bridge-compose | [tcp @ 0x2ac7ac0] Successfully connected to 0.0.0.0 port 8554 wyze-bridge-compose | [rtsp @ 0x2ac7310] SDP: wyze-bridge-compose | v=0 wyze-bridge-compose | o=- 0 0 IN IP4 127.0.0.1 wyze-bridge-compose | s=No Name wyze-bridge-compose | c=IN IP4 127.0.0.1 wyze-bridge-compose | t=0 0 wyze-bridge-compose | a=tool:libavformat 59.16.100 wyze-bridge-compose | m=video 0 RTP/AVP 96 wyze-bridge-compose | a=rtpmap:96 H264/90000 wyze-bridge-compose | a=fmtp:96 packetization-mode=1; sprop-parameter-sets=J00AKedAPAET8s1AQEB8AAADAAQAAAMAoM1ADqYAFfl//wKA,KO48gAA=; profile-level-id=4D0029 wyze-bridge-compose | a=control:streamid=0 wyze-bridge-compose | m=audio 0 RTP/AVP 97 wyze-bridge-compose | b=AS:128 wyze-bridge-compose | a=rtpmap:97 PCMA/16000/1 wyze-bridge-compose | a=control:streamid=1 wyze-bridge-compose | wyze-bridge-compose | [h264 @ 0x3a08500] Stream #0: not enough frames to estimate rate; consider increasing probesize wyze-bridge-compose | Input #0, h264, from 'pipe:': wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1920x1080 (1920x1088), 20 tbr, 1200k tbn wyze-bridge-compose | 2022/11/05 19:38:08 [RTSP][NORTHYARD] 📖 New client reading wyze-bridge-compose | Guessed Channel Layout for Input Stream #1.0 : mono wyze-bridge-compose | Input #1, alaw, from '/tmp/northdriveway.wav': wyze-bridge-compose | Duration: N/A, bitrate: 128 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_alaw, 16000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | [tcp @ 0x3b24210] Starting connection attempt to 0.0.0.0 port 8554 wyze-bridge-compose | [tcp @ 0x3b24210] Successfully connected to 0.0.0.0 port 8554 wyze-bridge-compose | [rtsp @ 0x3b23a60] SDP: wyze-bridge-compose | v=0 wyze-bridge-compose | o=- 0 0 IN IP4 127.0.0.1 wyze-bridge-compose | s=No Name wyze-bridge-compose | c=IN IP4 127.0.0.1 wyze-bridge-compose | t=0 0 wyze-bridge-compose | a=tool:libavformat 59.16.100 wyze-bridge-compose | m=video 0 RTP/AVP 96 wyze-bridge-compose | a=rtpmap:96 H264/90000 wyze-bridge-compose | a=fmtp:96 packetization-mode=1; sprop-parameter-sets=J00AKedAPAET8s1AQEB8AAADAAQAAAMAoM1ADqYAFfl//wKA,KO48gAA=; profile-level-id=4D0029 wyze-bridge-compose | a=control:streamid=0 wyze-bridge-compose | m=audio 0 RTP/AVP 97 wyze-bridge-compose | b=AS:128 wyze-bridge-compose | a=rtpmap:97 PCMA/16000/1 wyze-bridge-compose | a=control:streamid=1 wyze-bridge-compose | wyze-bridge-compose | [tee @ 0x2ac4990] filename:'rtsp://0.0.0.0:8554/southdriveway' format:rtsp wyze-bridge-compose | [tee @ 0x2ac4990] stream:0 codec:h264 type:video bsfs: AVBSFContext wyze-bridge-compose | [tee @ 0x2ac4990] stream:1 codec:pcm_alaw type:audio bsfs: null wyze-bridge-compose | Output #0, tee, to '[f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/southdriveway': wyze-bridge-compose | Metadata: wyze-bridge-compose | encoder : Lavf59.16.100 wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1920x1080 (0x0), q=2-31, 20 tbr, 20 tbn wyze-bridge-compose | Stream #0:1: Audio: pcm_alaw, 16000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (copy) wyze-bridge-compose | Stream #1:0 -> #0:1 (copy) [tee @ 0x2ac4990] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly wyze-bridge-compose | [alaw @ 0x2a1bc40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) wyze-bridge-compose | 2022/11/05 19:38:08 [Doorbell] FFMPEG stopped wyze-bridge-compose | [tee @ 0x3b210e0] filename:'rtsp://0.0.0.0:8554/northdriveway' format:rtsp wyze-bridge-compose | [tee @ 0x3b210e0] stream:0 codec:h264 type:video bsfs: AVBSFContext wyze-bridge-compose | [tee @ 0x3b210e0] stream:1 codec:pcm_alaw type:audio bsfs: null wyze-bridge-compose | Output #0, tee, to '[f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/northdriveway': wyze-bridge-compose | Metadata: wyze-bridge-compose | encoder : Lavf59.16.100 wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1920x1080 (0x0), q=2-31, 20 tbr, 20 tbn wyze-bridge-compose | Stream #0:1: Audio: pcm_alaw, 16000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (copy) wyze-bridge-compose | Stream #1:0 -> #0:1 (copy) [tee @ 0x3b210e0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly wyze-bridge-compose | [alaw @ 0x3aa2ad0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) wyze-bridge-compose | 2022/11/05 19:38:08 [RTSP][SOUTHDRIVEWAY] ✅ '/southdriveway' stream is UP! (3/3) wyze-bridge-compose | 2022/11/05 19:38:08 [RTSP][NORTHDRIVEWAY] ✅ '/northdriveway' stream is UP! (3/3) 2022/11/05 19:38:09 [RTSP][SOUTHDRIVEWAY] 📖 New client reading speed=4.88x ate=N/A speed= 0x wyze-bridge-compose | 2022/11/05 19:38:09 [RTSP][NORTHDRIVEWAY] 📖 New client reading wyze-bridge-compose | [tee @ 0x2d42fd0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly wyze-bridge-compose | [mulaw @ 0x2d441b0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) Output file #0 does not contain any stream q=-1.0 size=N/A time=00:00:01.45 bitrate=N/A speed=2.86x 2022/11/05 19:38:09 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.51 (1/3)x 2022/11/05 19:38:10 [RTSP][SOUTHYARD] 📕 Client stopped readingA speed=1.68x ate=N/A speed=1.98x 2022/11/05 19:38:11 [RTSP][SOUTHDRIVEWAY] 📕 Client stopped readingeed=1.82x ate=N/A speed=1.09x 2022/11/05 19:38:11 [RTSP][NORTHYARD] 📕 Client stopped readingA speed=1.69x ate=N/A speed= 1.4x 2022/11/05 19:38:12 [RTSP][NORTHDRIVEWAY] 📕 Client stopped readingeed=1.19x te=N/A speed= 1.3x 2022/11/05 19:38:12 [NorthDriveway] WARNING: Frame not available yeted=1.48x te=N/A speed= 1.5x 2022/11/05 19:38:13 [SouthDriveway] WARNING: Frame not available yeted=1.31x te=N/A speed=1.02x 2022/11/05 19:38:13 [NorthYard] WARNING: Frame not available yet speed=0.65x ate=N/A speed=0.908x 2022/11/05 19:38:13 [RTSP][NORTHDRIVEWAY] 📖 New client reading speed=1.18x ate=N/A speed=1.12x 2022/11/05 19:38:13 [RTSP][SOUTHDRIVEWAY] 📖 New client reading 00:00:04.12 bitrate=N/A speed=0.817x 2022/11/05 19:38:14 [Doorbell] 📡 Getting 200kb/s HD stream (20fps) via LAN mode (WiFi: 77%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:14 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 19:38:14 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 19:38:14 [Doorbell] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f s16le -ar 8000 -i /tmp/doorbell.wav -flags +global_header -c:v h264_v4l2m2m -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v 77 -preset ultrafast -force_key_frames expr:gte(t,n_forced2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell wyze-bridge-compose | 2022/11/05 19:38:14 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 2022/11/05 19:38:15 [Doorbell] WARNING: Frame not available yetA speed=0.97x te=N/A speed=0.757x [h264 @ 0x3b35580] Reinit context to 1728x1296, pix_fmt: yuv420p speed=0.724x te=N/A speed=0.823x [h264 @ 0x3b24680] Stream #0: not enough frames to estimate rate; consider increasing probesize.704x wyze-bridge-compose | Input #0, h264, from 'pipe:': wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, unknown/bt709/unknown, progressive, left), 1728x1296, 20 tbr, 1200k tbn Guessed Channel Layout for Input Stream #1.0 : monoize=N/A time=00:00:10.26 bitrate=N/A speed=1.13x wyze-bridge-compose | Input #1, s16le, from '/tmp/doorbell.wav': wyze-bridge-compose | Duration: N/A, bitrate: 128 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Codec AVOption coder (Coder type) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_v4l2m2m)) wyze-bridge-compose | Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native)) wyze-bridge-compose | [h264 @ 0x3b71840] Reinit context to 1728x1296, pix_fmt: yuv420p [graph 0 input from stream 0:0 @ 0x3b9e0f0] w:1728 h:1296 pixfmt:yuv420p tb:1/1200000 fr:20/1 sar:0/1 wyze-bridge-compose | [Parsed_transpose_0 @ 0x3b9dd90] w:1728 h:1296 dir:1 -> w:1296 h:1728 rotation:clockwise vflip:0 wyze-bridge-compose | [h264_v4l2m2m @ 0x3b3bca0] Could not find a valid device wyze-bridge-compose | [h264_v4l2m2m @ 0x3b3bca0] can't configure encoder wyze-bridge-compose | Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [s16le @ 0x3b431b0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) wyze-bridge-compose | [AVIOContext @ 0x3b34f60] Statistics: 295161 bytes read, 0 seeks wyze-bridge-compose | [AVIOContext @ 0x3b71ee0] Statistics: 42240 bytes read, 0 seeks wyze-bridge-compose | Conversion failed! 2022/11/05 19:38:18 [Doorbell] WARNING: Audio pipe closedate=N/A speed=0.995x te=N/A speed=0.629x 2022/11/05 19:38:19 [Doorbell] FFMPEG stopped0:10.72 bitrate=N/A speed=1.01x te=N/A speed=0.687x 2022/11/05 19:38:19 [RTSP][SOUTHYARD] 📖 New client reading =N/A speed=0.64x ate=N/A speed=0.654x 2022/11/05 19:38:19 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.51 (1/3) 2022/11/05 19:38:20 [RTSP][SOUTHDRIVEWAY] 📖 New client reading speed=0.643x te=N/A speed=0.646x 2022/11/05 19:38:20 [RTSP][NORTHYARD] 📖 New client reading =N/A speed= 1x ate=N/A speed=0.629x 2022/11/05 19:38:21 [RTSP][NORTHDRIVEWAY] 📖 New client reading speed=1.01x te=N/A speed=0.661x 2022/11/05 19:38:22 [Doorbell] 📡 Getting 200kb/s HD stream (20fps) via LAN mode (WiFi: 79%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:22 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 19:38:22 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 19:38:22 [Doorbell] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f s16le -ar 8000 -i /tmp/doorbell.wav -flags +global_header -c:v h264_v4l2m2m -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v 77 -preset ultrafast -force_key_frames expr:gte(t,n_forced2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell wyze-bridge-compose | 2022/11/05 19:38:22 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 [h264 @ 0x2a0c580] Reinit context to 1728x1296, pix_fmt: yuv420p speed=0.707x te=N/A speed=1.09x [h264 @ 0x29fb680] Stream #0: not enough frames to estimate rate; consider increasing probesize.09x Input #0, h264, from 'pipe:': 252 fps= 18 q=-1.0 size=N/A time=00:00:14.56 bitrate=N/A speed=1.03x wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, unknown/bt709/unknown, progressive, left), 1728x1296, 20 tbr, 1200k tbn wyze-bridge-compose | 2022/11/05 19:38:22 [RTSP][SOUTHYARD] 📕 Client stopped reading wyze-bridge-compose | 2022/11/05 19:38:22 [RTSP][NORTHDRIVEWAY] 📕 Client stopped reading 2022/11/05 19:38:23 [RTSP][SOUTHDRIVEWAY] 📕 Client stopped readingeed=1.04x te=N/A speed=0.726x wyze-bridge-compose | Guessed Channel Layout for Input Stream #1.0 : mono wyze-bridge-compose | Input #1, s16le, from '/tmp/doorbell.wav': wyze-bridge-compose | Duration: N/A, bitrate: 128 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Codec AVOption coder (Coder type) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_v4l2m2m)) wyze-bridge-compose | Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native)) wyze-bridge-compose | [h264 @ 0x2a1a2a0] Reinit context to 1728x1296, pix_fmt: yuv420p 2022/11/05 19:38:23 [RTSP][NORTHYARD] 📕 Client stopped reading=00:00:10.76 bitrate=N/A speed=0.736x [graph 0 input from stream 0:0 @ 0x2ad28a0] w:1728 h:1296 pixfmt:yuv420p tb:1/1200000 fr:20/1 sar:0/1 wyze-bridge-compose | [Parsed_transpose_0 @ 0x2ad2bf0] w:1728 h:1296 dir:1 -> w:1296 h:1728 rotation:clockwise vflip:0 wyze-bridge-compose | [h264_v4l2m2m @ 0x2a13ac0] Could not find a valid device wyze-bridge-compose | [h264_v4l2m2m @ 0x2a13ac0] can't configure encoder wyze-bridge-compose | Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height wyze-bridge-compose | [s16le @ 0x2a49950] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) wyze-bridge-compose | [AVIOContext @ 0x2a0bf60] Statistics: 278030 bytes read, 0 seeks wyze-bridge-compose | [AVIOContext @ 0x2a1b8c0] Statistics: 34560 bytes read, 0 seeks wyze-bridge-compose | Conversion failed! wyze-bridge-compose | 2022/11/05 19:38:23 [Doorbell] WARNING: Audio pipe closed 2022/11/05 19:38:24 [Doorbell] FFMPEG stopped0:16.32 bitrate=N/A speed=1.04x te=N/A speed=0.743x 2022/11/05 19:38:24 [WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - doorbell on 192.168.2.51 (1/3)x 2022/11/05 19:38:27 [Doorbell] 📡 Getting 200kb/s HD stream (20fps) via LAN mode (WiFi: 77%) FW: 4.25.1.314 🔒 (DTLS) (2/3) wyze-bridge-compose | 2022/11/05 19:38:27 [Doorbell] 🔊 Audio Enabled - PCM > AAC/8,000Hz wyze-bridge-compose | 2022/11/05 19:38:27 [Doorbell] Re-encoding stream using h264_v4l2m2m [transpose='clock'] wyze-bridge-compose | 2022/11/05 19:38:27 [Doorbell] [FFMPEG_CMD] ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i pipe: -f s16le -ar 8000 -i /tmp/doorbell.wav -flags +global_header -c:v h264_v4l2m2m -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v 77 -preset ultrafast -force_key_frames expr:gte(t,n_forced*2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell wyze-bridge-compose | 2022/11/05 19:38:27 [Doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4) wyze-bridge-compose | ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers wyze-bridge-compose | built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 wyze-bridge-compose | configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa wyze-bridge-compose | libavutil 57. 17.100 / 57. 17.100 wyze-bridge-compose | libavcodec 59. 18.100 / 59. 18.100 wyze-bridge-compose | libavformat 59. 16.100 / 59. 16.100 wyze-bridge-compose | libavdevice 59. 4.100 / 59. 4.100 wyze-bridge-compose | libavfilter 8. 24.100 / 8. 24.100 wyze-bridge-compose | libswscale 6. 4.100 / 6. 4.100 wyze-bridge-compose | libswresample 4. 3.100 / 4. 3.100 wyze-bridge-compose | libpostproc 56. 3.100 / 56. 3.100 [h264 @ 0x3b20580] Reinit context to 1728x1296, pix_fmt: yuv420p speed=1.03x ate=N/A speed=1.07x wyze-bridge-compose | [h264 @ 0x3b0f680] Stream #0: not enough frames to estimate rate; consider increasing probesize wyze-bridge-compose | Input #0, h264, from 'pipe:': wyze-bridge-compose | Duration: N/A, bitrate: N/A wyze-bridge-compose | Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, unknown/bt709/unknown, progressive, left), 1728x1296, 20 tbr, 1200k tbn Guessed Channel Layout for Input Stream #1.0 : mono6 bitrate=N/A speed= 1x te=N/A speed=0.79x wyze-bridge-compose | Input #1, s16le, from '/tmp/doorbell.wav': wyze-bridge-compose | Duration: N/A, bitrate: 128 kb/s wyze-bridge-compose | Stream #1:0: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s wyze-bridge-compose | Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Codec AVOption coder (Coder type) specified for output file #0 ([f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/doorbell) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. wyze-bridge-compose | Stream mapping: wyze-bridge-compose | Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_v4l2m2m)) wyze-bridge-compose | Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native)) wyze-bridge-compose | [h264 @ 0x3b5c880] Reinit context to 1728x1296, pix_fmt: yuv420p [graph 0 input from stream 0:0 @ 0x3bbe150] w:1728 h:1296 pixfmt:yuv420p tb:1/1200000 fr:20/1 sar:0/1 wyze-bridge-compose | [Parsed_transpose_0 @ 0x3b480c0] w:1728 h:1296 dir:1 -> w:1296 h:1728 rotation:clockwise vflip:0 wyze-bridge-compose | [h264_v4l2m2m @ 0x3b26d80] Could not find a valid device wyze-bridge-compose | [h264_v4l2m2m @ 0x3b26d80] can't configure encoder wyze-bridge-compose | Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [s16le @ 0x3b2e1b0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) wyze-bridge-compose | [AVIOContext @ 0x3b1ff60] Statistics: 326419 bytes read, 0 seeks wyze-bridge-compose | [AVIOContext @ 0x3b5cf20] Statistics: 34560 bytes read, 0 seeks wyze-bridge-compose | Conversion failed! 2022/11/05 19:38:30 [Doorbell] WARNING: Audio pipe closedA time=00:00:17.80 bitrate=N/A speed=0.819x ^CGracefully stopping... (press Ctrl+C again to force)

mrlt8 commented 1 year ago

@thatdaveguy1 looks like a permission issue..?

wyze-bridge-compose | [h264_v4l2m2m @ 0x3b26d80] Could not find a valid device
wyze-bridge-compose | [h264_v4l2m2m @ 0x3b26d80] can't configure encoder

could you run ls -l /dev/video* on the host?

thatdaveguy1 commented 1 year ago

@mrlt8 Definitely could be. I am not (at all) experienced with this stuff

Here's the output

pi@raspberrypi:~ $ ls -l /dev/video* crw-rw----+ 1 root video 81, 1 Nov 4 19:33 /dev/video10 crw-rw----+ 1 root video 81, 2 Nov 4 19:33 /dev/video11 crw-rw----+ 1 root video 81, 5 Nov 4 19:33 /dev/video12 crw-rw----+ 1 root video 81, 0 Nov 4 19:33 /dev/video13 crw-rw----+ 1 root video 81, 3 Nov 4 19:33 /dev/video14 crw-rw----+ 1 root video 81, 4 Nov 4 19:33 /dev/video15 crw-rw----+ 1 root video 81, 6 Nov 4 19:33 /dev/video16 crw-rw----+ 1 root video 81, 8 Nov 4 19:33 /dev/video18 crw-rw----+ 1 root video 81, 7 Nov 4 19:33 /dev/video19 crw-rw----+ 1 root video 81, 10 Nov 4 19:33 /dev/video20 crw-rw----+ 1 root video 81, 11 Nov 4 19:33 /dev/video21 crw-rw----+ 1 root video 81, 12 Nov 4 19:33 /dev/video22 crw-rw----+ 1 root video 81, 13 Nov 4 19:33 /dev/video23 crw-rw----+ 1 root video 81, 9 Nov 4 19:33 /dev/video31

mrlt8 commented 1 year ago

Try the solution from this: https://github.com/raspberrypi/firmware/issues/1687

hevel86 commented 1 year ago

@hevel86 hmm, seems like it's doing some kind of encoding... can you try to access the streams? ffprobe -show_streams -i rtsp://path.to.your:8554/camera

We could always try setting the ffmpeg command directly with:

- FFMPEG_CMD_FRONT_DOOR=ffmpeg -loglevel verbose -f h264 -i - -c:v h264_nvenc -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554/{cam_name}

with audio to prevent memory issues:

- FFMPEG_CMD_FRONT_DOOR=ffmpeg -loglevel verbose -f h264 -i - -f s16le -ar 8000 -i /tmp/{cam_name}.wav -c:a aac -c:v h264_nvenc -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554/{cam_name}

I believe @mitchross was able to get nvenc to work

@thatdaveguy1 Could you run with - DEBUG_FFMPEG=true

Sorry for the delayed response. It turns out that using the dev build allowed me to access the streams via VLC and it showed up in frigate. However, the wyze bridge software did not show the stream. I also noticed that my saved clips in frigate took an extremely long time to load. I'm sure this is somehow related. Knowing this... what config would you like some logs from?

mrlt8 commented 1 year ago

Was the slow loading with the default config? Could be that the encoder is not recognizing the force_key_frames command so the clients have to wait until it receives a keyframe to decode the video causing the long delay for the video to load and/or timeouts.

This command would be most similar to what the bridge would generate: ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i - -f s16le -ar 8000 -i /tmp/{cam_name}.wav -flags +global_header -c:v h264_nvenc -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v main -preset fast -force_key_frames expr:gte(t,n_forced*2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/{cam_name}

it seems like we may need to add forced_idr, so something like this? ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i - -f s16le -ar 8000 -i /tmp/{cam_name}.wav -flags +global_header -c:v h264_nvenc -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v main -preset fast -forced-idr 1 -force_key_frames expr:gte(t,n_forced*2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/{cam_name}

thatdaveguy1 commented 1 year ago

Try the solution from this: raspberrypi/firmware#1687

No luck. :(

pi@raspberrypi:~/dockercompose $ sudo adduser pi video The user pi' is already a member ofvideo'.

hevel86 commented 1 year ago

Was the slow loading with the default config? Could be that the encoder is not recognizing the force_key_frames command so the clients have to wait until it receives a keyframe to decode the video causing the long delay for the video to load and/or timeouts.

This command would be most similar to what the bridge would generate: ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i - -f s16le -ar 8000 -i /tmp/{cam_name}.wav -flags +global_header -c:v h264_nvenc -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v main -preset fast -force_key_frames expr:gte(t,n_forced*2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/{cam_name}

it seems like we may need to add forced_idr, so something like this? ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i - -f s16le -ar 8000 -i /tmp/{cam_name}.wav -flags +global_header -c:v h264_nvenc -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v main -preset fast -forced-idr 1 -force_key_frames expr:gte(t,n_forced*2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/{cam_name}

@mrlt8, can you clarify what you mean when you say default config? Just to make sure I understand correctly, this should be my environment section:

brave_8evN8iravl

mrlt8 commented 1 year ago

@hevel86 with and without the FFMPEG_CMD_FRONT_DOOR as that should override the default ffmpeg command in the container.

mitchross commented 1 year ago

Works fine for me

version: "3.9"
services:
  mqtt:
    container_name: mqtt
    image: eclipse-mosquitto:1.6
    restart: unless-stopped
    ports:
      - "1883:1883"

  wyze-bridge:
        container_name: wyze-bridge
        restart: unless-stopped
        privileged: true
        devices:
          - /dev:/dev
        networks:
        - web
        labels:
        - "traefik.enable=true"
        - "traefik.http.routers.wyze-bridge.rule=Host(`wyze.xx.yy.cc`)"
        - "traefik.http.routers.wyze-bridge.entrypoints=https"
        - "traefik.http.routers.wyze-bridge.tls.certResolver=cloudflare"
        - "traefik.http.services.wyze-bridge.loadbalancer.server.port=5000"
        volumes:
         - /var/run/docker.sock:/var/run/docker.sock

        image: mrlt8/wyze-bridge:latest-hw # Use a prebuilt image
        ports:
            - 1935:1935
            - 8554:8554
            - 8888:8888
            - 4000:5000
        environment:
            - WYZE_EMAIL=xxx # Replace with wyze email
            - WYZE_PASSWORD=yyy # Replace with wyze password
            - FRESH_DATA=true
            - FFMPEG_CMD_SHED=ffmpeg -loglevel verbose -f h264 -c:v h264_cuvid -i - -c:v h264_nvenc -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554/{cam_name}
            - NVIDIA_VISIBLE_DEVICES=all
            - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
            - ROTATE_DOOR=True
        deploy:
            resources:
                reservations:
                    devices:
                    - capabilities: [gpu]
  frigate:
    depends_on:
      - mqtt
      - wyze-bridge
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: "unless-stopped"
    image: blakeblackshear/frigate:stable
    shm_size: "1024mb" # update for your cameras based on calculation above
    devices:
      #nvdia

      - /dev:/dev
      - /dev/dri:/dev/dri
      - /dev/nvidiactl:/dev/nvidiactl
      - /dev/nvidia0:/dev/nvidia0
      - /dev/nvidia-modeset:/dev/nvidia-modeset
      - /dev/nvidia-uvm:/dev/nvidia-uvm
      - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
      #coral
      # - /dev/apex_0:/dev/apex_0
      # - /dev/apex_1:/dev/apex_1 # passes the USB Coral, needs to be modified for other versions
      - /dev/bus/usb:/dev/bus/usb
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/xxx/docker-apps/frigate/config.yml:/config/config.yml:ro
      - /mnt/smb/frigate-media:/media/frigate
      - /home/xxx/docker-apps/frigate/database:/database
      - /var/run/docker.sock:/var/run/docker.sock

    ports:
      - "5000:5000"
      - "1936:1935" # RTMP feeds
    environment:
      FRIGATE_RTSP_PASSWORD: "password"
      TZ: US/Detroit
      PGID: 1000
      PUID: 1000
      UMASK: 002
    networks:
     - web
    labels:
     - "traefik.enable=true"
     - "traefik.http.routers.frigate.rule=Host(`frigate.xx.xx.yy`)"
     - "traefik.http.routers.frigate.entrypoints=https"
     - "traefik.http.routers.frigate.tls.certResolver=cloudflare"
     - "traefik.http.services.frigate.loadbalancer.server.port=5000"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

networks:
  web:
      external: true
hevel86 commented 1 year ago

Much thanks to @mrlt8 and @mitchross!

Here's my wyze-bridge docker compose file:

wyze_bridge:
    image: mrlt8/wyze-bridge:latest-hw
    privileged: true
    container_name: wyze_bridge
    restart: unless-stopped
    ports:
      - 1935:1935
      - 8554:8554
      - 8888:8888
      - 5001:5000
    devices:
      - /dev:/dev
    environment:
      - WYZE_EMAIL=
      - WYZE_PASSWORD=
      - QUALITY_OFFICE_CAM=HD120
      - QUALITY_FRONT_DOOR=HD180
      - TOTP_KEY=
      - ROTATE_DOOR=True
      - H264_ENC=h264_nvenc
      - NET_MODE=LAN
      - ENABLE_AUDIO_FRONT_DOOR=True
      - NVIDIA_VISIBLE_DEVICES=all
      - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
#      - DEBUG_FFMPEG=true
        # Working ffmpeg command
      - FFMPEG_CMD_FRONT_DOOR=ffmpeg -loglevel verbose -fflags +genpts+flush_packets+nobuffer+bitexact -flags +low_delay -thread_queue_size 64 -threads 1 -analyzeduration 50 -probesize 50 -f h264 -i - -f s16le -ar 8000 -i /tmp/{cam_name}.wav -flags +global_header -c:v h264_nvenc -filter:v transpose=clock -b:v 3000k -coder 1 -bufsize 1000k -profile:v main -preset fast -forced-idr 1 -force_key_frames expr:gte(t,n_forced*2) -c:a aac -filter:a volume=5 -movflags +empty_moov+default_base_moof+frag_keyframe -map 0:v -map 1:a -shortest -f tee [f=rtsp:rtsp_transport=tcp:bsfs/v=dump_extra=freq=keyframe]rtsp://0.0.0.0:8554/{cam_name}
    deploy:
      resources:
        reservations:
          devices:
            - capabilities:
              - gpu
Here's my frigate compose file:
  frigate:
    container_name: frigate
    privileged: true
    restart: unless-stopped
    depends_on:
      - wyze_bridge
    image: blakeblackshear/frigate:stable
    #(width * height * 1.5 * 9 + 270480)/1048576 = 
    shm_size: "128mb"
    #devices:
    #  - /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /tank1/frigate/config/frigate.yml:/config/config.yml:ro
      - /tank1/frigate/storage:/media/frigate
      - /tank1/frigate/db:/db
    devices:
      # Coral
      - /dev/apex_0:/dev/apex_0
      # Nvidia
      - /dev:/dev
      - /dev/dri:/dev/dri
      - /dev/nvidiactl:/dev/nvidiactl
      - /dev/nvidia0:/dev/nvidia0
      - /dev/nvidia-modeset:/dev/nvidia-modeset
      - /dev/nvidia-uvm:/dev/nvidia-uvm
      - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
    ports:
      - "5002:5000"
      - "1936:1935" # RTMP feeds
    environment:
      FRIGATE_RTSP_PASSWORD: ""    
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
Here's my frigate config:
mqtt:
  host: 
  user: 
  password: 

ffmpeg:
  output_args:
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac

cameras:
  office:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.1.10:8554/office-cam
          roles:
            - detect
            - clips
    detect:
      width: 1920
      height: 1080
      fps: 5 #detection rate, not camera fps

    objects:
      track:
        - person

    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 2

    record:
      enabled: true
      events:
        objects:
          - person
        retain:
          default: 2

  doorbell:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - cuda
        - -c:v 
        - h264_cuvid
      inputs:
        - path: rtsp://192.168.1.10:8554/front-door
          roles:
            - detect
            - clips

    zones:
      front_porch:
        coordinates: 345,1363,387,1511,88,1623,146,1728,1048,1728,1190,1180,814,1133
        objects:
          - person
      driveway:
        coordinates: 803,983,1117,1008,343,1352,295,1031,630,1006
        objects:
          - person
          - car
          - dog
          - cat

    detect:
      width: 1296
      height: 1728
      fps: 5 #detection rate, not camera fps

    objects:
      track:
        - person
        - dog
        - cat
        - car

    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 2

    record:
      enabled: true
      events:
        objects:
          - person
        retain:
          default: 2

detectors:
  coral_pci:
    type: edgetpu
    device: pci

  #CPU Detector 2700x
#  cpu1:
#    type: cpu
#    num_threads: 16
Here's the processes running in nvtop: ![WindowsTerminal_bWGwDaPGJS](https://user-images.githubusercontent.com/2089595/200952367-44350baf-bf6a-4259-9ad5-859fdedc971c.png)
mrlt8 commented 1 year ago

Hey @hevel86 does the hardware acceleration still work if you comment out the FFMPEG_CMD_FRONT_DOOR?

Could you try the latest :dev-hw branch?

hevel86 commented 1 year ago

Hey @hevel86 does the hardware acceleration still work if you comment out the FFMPEG_CMD_FRONT_DOOR?

I'll be able to check if it still works later this evening without the FFMPEG command.

Could you try the latest :dev-hw branch?

I'm not sure if I can try the latest just yet. Today, I had to tag the docker image to 1.8.13-hw as I have Nvidia drivers 5.15 installed which only supports NVENC 11 instead of 5.20/NVENC12 in the latest-hw tag.

mrlt8 commented 1 year ago

Would it help if we switch from thee master builds of ffmpeg to the the 5.1 branch?