AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
3.81k stars 309 forks source link

aqara g3 not work #764

Open lenodeCC opened 7 months ago

lenodeCC commented 7 months ago

I'm using go2rtc on synology nas and deploy with docker.

But it's always crashed and restart when I start the stream.

Here is the config.

hass:
  config: "/hass-config"

streams:
  aqara_g3: 
    - hass:Camera-Hub-G3-2DC7
    - ffmpeg:aqara_g3#audio=aac#audio=opus#async

Here is the log

17:10:29.801 DBG [hass] load config url=hass:Camera-Hub-G3-2DC7
17:10:54.974 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -use_wallclock_as_timestamps 1 -async 1 -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://127.0.0.1:8554/aqara_g3?audio -map 0:a:0? -c:a:0 aac -map 0:a:0? -c:a:1 libopus -application:a:1 lowdelay -frame_duration 20 -min_comp 0 -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
17:10:55.031 DBG [rtsp] new consumer stream=aqara_g3
17:10:55.031 DBG [streams] start producer url=hass:Camera-Hub-G3-2DC7
panic: interface conversion: interface {} is nil, not string

goroutine 37 [running]:
github.com/AlexxIT/go2rtc/pkg/hap.(*Character).ReadTLV8(...)
        github.com/AlexxIT/go2rtc/pkg/hap/character.go:129
github.com/AlexxIT/go2rtc/pkg/hap/camera.(*Stream).ExchangeEndpoints(0xc00007af60, 0xc0000368f0, 0xc0000369a0)
        github.com/AlexxIT/go2rtc/pkg/hap/camera/stream.go:129 +0x605
github.com/AlexxIT/go2rtc/pkg/hap/camera.NewStream(0xc000206500, 0xc00007f090, 0xc00007f0e0, 0xc0000368f0, 0xc0000369a0)
        github.com/AlexxIT/go2rtc/pkg/hap/camera/stream.go:29 +0x105
github.com/AlexxIT/go2rtc/pkg/homekit.(*Client).Start(0xc00018e340)
        github.com/AlexxIT/go2rtc/pkg/homekit/client.go:135 +0x5c5
github.com/AlexxIT/go2rtc/internal/streams.(*Producer).worker(0xc00012a2d0, {0xd27990?, 0xc00018e340?}, 0x1)
        github.com/AlexxIT/go2rtc/internal/streams/producer.go:162 +0x2f
created by github.com/AlexxIT/go2rtc/internal/streams.(*Producer).start in goroutine 26
        github.com/AlexxIT/go2rtc/internal/streams/producer.go:158 +0x1ae

Is there anything wrong and I need to fix?

AlexxIT commented 7 months ago

What's your camera exact model and firmware version?

lenodeCC commented 7 months ago

What's your camera exact model and firmware version?

Model: ZNSXJ13LM

Current firmware version:4.0.6_0011.0004 Current algorithm version:2.1.0

sdavides commented 4 months ago

I gave up with aqara g3 the video always freezes. I ran the hack and removed the rtsp authentication, now with the link rtsp://192.168.1.52:8554/360p /720p /1080p /1296p the video is Perfect

or you can see user and pass from agetprop sys.camera_rtsp_url command from telnet: user=26 pass=83 (change every boot) ~ # agetprop sys.camera_rtsp_url {"360p":"rtsp:\/\/26:83@192.168.1.4:8554\/360p","720p":"rtsp:\/\/26:83@192.168.1.4:8554\/720p","1080p":"rtsp:\/\/26:83@192.168.1.4:8554\/1080p","1296p":"rtsp:\/\/26:83@192.168.1.4:8554\/1296p"}