Open gregtakacs opened 5 months ago
Logs from 1.6.2:
2024-01-31 20:36:56.976873575 [INFO] Preparing new go2rtc config...
2024-01-31 20:36:57.183188807 [INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually
2024-01-31 20:36:57.204276861 [WARN] Using go2rtc binary from '/config/go2rtc' instead of the embedded one
2024-01-31 20:36:57.204281681 [INFO] Starting go2rtc...
2024-01-31 20:36:57.275975873 20:36:57.275 INF go2rtc version 1.6.2 linux/amd64
2024-01-31 20:36:57.276003339 20:36:57.275 TRC [api] register path path=/
2024-01-31 20:36:57.276004576 20:36:57.275 TRC [api] register path path=/api
2024-01-31 20:36:57.276008153 20:36:57.276 TRC [api] register path path=/api/config
2024-01-31 20:36:57.276014145 20:36:57.276 TRC [api] register path path=/api/exit
2024-01-31 20:36:57.276158911 20:36:57.276 INF [api] listen addr=0.0.0.0:1984
2024-01-31 20:36:57.276230709 20:36:57.276 TRC [api] register path path=/api/ws
2024-01-31 20:36:57.276385697 20:36:57.276 TRC [api] register path path=/api/streams
2024-01-31 20:36:57.276514661 20:36:57.276 INF [rtsp] listen addr=0.0.0.0:8554
2024-01-31 20:36:57.277612330 20:36:57.277 INF [webrtc] listen addr=:8555
2024-01-31 20:36:57.277614757 20:36:57.277 TRC [api] register path path=/api/webrtc
2024-01-31 20:36:57.277616325 20:36:57.277 TRC [api] register path path=/api/frame.mp4
2024-01-31 20:36:57.277620395 20:36:57.277 TRC [api] register path path=/api/stream.mp4
2024-01-31 20:36:57.277621931 20:36:57.277 TRC [api] register path path=/api/stream.m3u8
2024-01-31 20:36:57.277623152 20:36:57.277 TRC [api] register path path=/api/hls/playlist.m3u8
2024-01-31 20:36:57.277634308 20:36:57.277 TRC [api] register path path=/api/hls/segment.ts
2024-01-31 20:36:57.277635704 20:36:57.277 TRC [api] register path path=/api/hls/init.mp4
2024-01-31 20:36:57.277636825 20:36:57.277 TRC [api] register path path=/api/hls/segment.m4s
2024-01-31 20:36:57.277637878 20:36:57.277 TRC [api] register path path=/api/frame.jpeg
2024-01-31 20:36:57.277654355 20:36:57.277 TRC [api] register path path=/api/stream.mjpeg
2024-01-31 20:36:57.277695469 20:36:57.277 TRC [api] register path path=/static
2024-01-31 20:36:57.277700918 20:36:57.277 TRC [api] register path path=/streams
2024-01-31 20:36:57.277703933 20:36:57.277 TRC [api] register path path=/stream/
2024-01-31 20:36:57.277714538 20:36:57.277 TRC [api] register path path=/api/hass
2024-01-31 20:36:57.277718518 20:36:57.277 TRC [api] register path path=/onvif/
2024-01-31 20:36:57.277725101 20:36:57.277 TRC [api] register path path=/api/onvif
2024-01-31 20:36:57.277836004 20:36:57.277 TRC [api] register path path=/api/webtorrent
2024-01-31 20:36:57.277838969 20:36:57.277 TRC [api] register path path=/api/stream.flv
2024-01-31 20:36:57.277949934 20:36:57.277 TRC [api] register path path=/api/ffmpeg/devices
2024-01-31 20:36:57.277954641 20:36:57.277 TRC [api] register path path=/api/ffmpeg/hardware
2024-01-31 20:36:57.277965892 20:36:57.277 TRC [api] register path path=/api/dvrip
2024-01-31 20:36:57.277971132 20:36:57.277 TRC [api] register path path=/api/stream.ts
2024-01-31 20:36:57.277976828 20:36:57.277 TRC [api] register path path=/api/roborock
2024-01-31 20:36:57.277981782 20:36:57.277 TRC [api] register path path=/api/homekit
2024-01-31 20:36:57.277984509 20:36:57.277 TRC [api] register path path=/api/nest
2024-01-31 20:36:57.278209665 20:36:57.278 INF [srtp] listen addr=0.0.0.0:8443
2024-01-31 20:36:57.278218795 20:36:57.278 TRC [api] register path path=/api/stack
2024-01-31 20:36:57.871953121 20:36:57.871 DBG [rtsp] new consumer stream=doorbell_sub
2024-01-31 20:36:57.875660640 20:36:57.875 DBG [rtsp] new consumer stream=family_room_sub
2024-01-31 20:36:57.875771983 20:36:57.875 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -i http://192.168.2.150/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=frigate&password=zdgYjK0i6eRuRfx8bDER -c copy -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
2024-01-31 20:36:57.879735156 20:36:57.879 DBG [rtsp] new consumer stream=entryway_sub
2024-01-31 20:36:57.879830274 20:36:57.879 DBG [rtsp] new consumer stream=doorbell
2024-01-31 20:36:57.884170296 20:36:57.884 DBG [rtsp] new consumer stream=family_room
2024-01-31 20:36:57.884239965 20:36:57.884 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -i http://192.168.2.150/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=frigate&password=zdgYjK0i6eRuRfx8bDER -map 0:v:0? -c:v:0 copy -map 0:a:0? -c:a:0 copy -map 0:a:0? -c:a:1 libopus -ar:a:1 48000 -ac:a:1 2 -application:a:1 voip -min_comp 0 -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
2024-01-31 20:36:57.889250087 20:36:57.889 DBG [rtsp] new consumer stream=entryway
2024-01-31 20:36:57.889266855 20:36:57.889 DBG [rtsp] new consumer stream=patio_sub
2024-01-31 20:36:57.894689197 20:36:57.894 DBG [rtsp] new consumer stream=front_garage_sub
2024-01-31 20:36:57.899844289 20:36:57.899 DBG [rtsp] new consumer stream=patio
2024-01-31 20:36:57.903619150 20:36:57.903 DBG [rtsp] new consumer stream=rear_garage_sub
2024-01-31 20:36:57.907808628 20:36:57.907 DBG [rtsp] new consumer stream=front_garage
2024-01-31 20:36:57.908867830 20:36:57.908 DBG [rtsp] new consumer stream=driveway_sub
2024-01-31 20:36:57.911472501 20:36:57.911 DBG [rtsp] new consumer stream=rear_garage
2024-01-31 20:36:57.916711256 20:36:57.916 DBG [rtsp] new consumer stream=game_room_sub
2024-01-31 20:36:57.916841589 20:36:57.916 DBG [rtsp] new consumer stream=driveway
2024-01-31 20:36:57.921833839 20:36:57.921 DBG [rtsp] new consumer stream=front_yard_right_sub
2024-01-31 20:36:57.925701335 20:36:57.925 DBG [rtsp] new consumer stream=game_room
2024-01-31 20:36:57.927569027 20:36:57.927 DBG [rtsp] new consumer stream=front_yard_left_sub
2024-01-31 20:36:57.931539521 20:36:57.931 DBG [rtsp] new consumer stream=front_yard_right
2024-01-31 20:36:57.934395956 20:36:57.934 DBG [rtsp] new consumer stream=front_yard_left
2024-01-31 20:37:00.698435910 20:37:00.698 DBG [exec] run launch=2.822427813s
2024-01-31 20:37:01.124064622 20:37:01.123 DBG [exec] run launch=3.239532615s
2024-01-31 20:37:06.974458531 [INFO] Starting go2rtc healthcheck service...
2024-01-31 20:37:36.987589611 20:37:36.987 TRC [api] GET /api/streams 127.0.0.1:48464
2024-01-31 20:38:07.003901408 20:38:07.003 TRC [api] GET /api/streams 127.0.0.1:34412
2024-01-31 20:38:37.015769519 20:38:37.015 TRC [api] GET /api/streams 127.0.0.1:60448
2024-01-31 20:39:07.030552629 20:39:07.030 TRC [api] GET /api/streams 127.0.0.1:48836
2024-01-31 20:39:37.045023166 20:39:37.044 TRC [api] GET /api/streams 127.0.0.1:56264
2024-01-31 20:40:07.058048585 20:40:07.057 TRC [api] GET /api/streams 127.0.0.1:60772
2024-01-31 20:40:37.072601825 20:40:37.072 TRC [api] GET /api/streams 127.0.0.1:45348
2024-01-31 20:41:07.086659330 20:41:07.086 TRC [api] GET /api/streams 127.0.0.1:35336
2024-01-31 20:41:37.101477030 20:41:37.101 TRC [api] GET /api/streams 127.0.0.1:45808
2024-01-31 20:42:07.116659883 20:42:07.116 TRC [api] GET /api/streams 127.0.0.1:45876
2024-01-31 20:42:37.130854703 20:42:37.130 TRC [api] GET /api/streams 127.0.0.1:40468
2024-01-31 20:43:07.144997058 20:43:07.144 TRC [api] GET /api/streams 127.0.0.1:54876
2024-01-31 20:43:37.157642851 20:43:37.157 TRC [api] GET /api/streams 127.0.0.1:46246
2024-01-31 20:44:07.172861595 20:44:07.172 TRC [api] GET /api/streams 127.0.0.1:35430
2024-01-31 20:44:37.188483655 20:44:37.188 TRC [api] GET /api/streams 127.0.0.1:60810
2024-01-31 20:45:07.201999040 20:45:07.201 TRC [api] GET /api/streams 127.0.0.1:49914
2024-01-31 20:45:37.215174056 20:45:37.215 TRC [api] GET /api/streams 127.0.0.1:48282
2024-01-31 20:46:07.229934232 20:46:07.229 TRC [api] GET /api/streams 127.0.0.1:33886
My config:
go2rtc:
ffmpeg:
input_args: -rtsp_transport tcp
bin: ffmpeg
volume: "-af \"volume=20dB\""
streams:
# doorbell_2way:
# - rtsp://${{FRIGATE_CAMERA_USER}}:${{FRIGATE_CAMERA_PASSWORD}}@192.168.2.151:554/h264Preview_01_sub
# - ffmpeg:doorbell_2way#audio=pcm#audio=volume
family_room:
- "ffmpeg:http://192.168.2.150/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}#video=copy#audio=copy#audio=opus"
family_room_sub:
- "ffmpeg:http://192.168.2.150/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}"
doorbell:
- http://192.168.2.151/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:doorbell#audio=opus"
doorbell_sub:
- http://192.168.2.151/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
entryway:
- http://192.168.2.152/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:entryway#audio=opus"
entryway_sub:
- http://192.168.2.152/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
patio:
- http://192.168.2.153/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:patio#audio=opus"
patio_sub:
- http://192.168.2.153/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
rear_garage:
- http://192.168.2.154/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:rear_garage#audio=opus"
rear_garage_sub:
- http://192.168.2.154/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
front_garage:
- http://192.168.2.155/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:front-garage#audio=opus"
front_garage_sub:
- http://192.168.2.155/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
driveway:
- http://192.168.2.156/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:driveway#audio=opus"
driveway_sub:
- http://192.168.2.156/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
game_room:
- http://192.168.2.157/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:game_room#audio=opus"
game_room_sub:
- http://192.168.2.157/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
front_yard_right:
- http://192.168.2.158/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:front_yard_right#audio=opus"
front_yard_right_sub:
- http://192.168.2.158/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
front_yard_left:
- http://192.168.2.160/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
- "ffmpeg:front_yard_left#audio=opus"
front_yard_left_sub:
- http://192.168.2.160/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
log:
level: info # default level
api: trace
exec: debug
ngrok: info
rtsp: debug
stream: debug
webrtc: debug
webrtc:
candidates:
- 192.168.2.141:8555
- stun:8555
https://github.com/AlexxIT/go2rtc/releases/tag/v1.7.0
You can use ffmpeg source or old go2rtc version before this will be fixed
@gregtakacs see the recommended reolink config https://docs.frigate.video/configuration/camera_specific#reolink-cameras
@NickM-27 should this also fix reolink http-flv in go2rtc 1.8.4? As I cannot get http streams working on latest one. rtsp is much more stable than any http flv
not sure what you mean, but the docs I linked is recommended for anyone using frigate with a reolink camera
As this recommendation is not working anymore on latest go2tc in frigate 0.13, as this issue states
@henne49 incorrect, this issue is not using the recommended config. It is using native http-flv in go2rtc meanwhile the frigate recommendation is to use ffmpeg http-flv in go2rtc
Also as an additional point, in the last few days since 0.13 launch many users were not using the recommended config and were seeing issues. When they switched to it they confirmed it fixed their issues as well
apologies, if I did get it wrong, this is what I have:
since 0.13 this did not work anymore, I switched to 0.13 because I wanted to use https (httpx for selfsigned https):
Einfahrt:
- httpx://192.168.1.2/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=******min&password=******
- "ffmpeg:Einfahrt#video=copy#audio=copy#audio=opus"
Einfahrt_sub:
- httpx://192.168.1.2/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=******&password=******
- "ffmpeg:Einfahrt_sub"
but reading the documentation it should be now:
Einfahrt:
- "ffmpeg:httpx://192.168.1.2/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=******min&password=******#video=copy#audio=copy#audio=opus"
Einfahrt_sub:
- "ffmpeg:httpx://192.168.1.2/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=******&password=******"
Maybe I'm not getting it right and can you help me to clarify?
One addition this seems to work for me now best:
Einfahrt:
- rtsp://******:******0@192.168.1.2:554/h264Preview_01_main
- "ffmpeg:Einfahrt#video=copy#audio=copy#audio=opus"
Einfahrt_sub:
- rtsp://******:******0@192.168.1.2:554/h264Preview_01_sub
- "ffmpeg:Einfahrt_sub"
ffmpeg doesn't support httpx as far as I know
so this should still work:
Einfahrt:
- "ffmpeg:http://192.168.1.2/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=******min&password=******#video=copy#audio=copy#audio=opus"
Einfahrt_sub:
- "ffmpeg:http://192.168.1.2/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=******&password=******"
assuming something on the reolink camera side hasn't been messed with
mmh it does not for me:
2024-02-02 23:14:54.256394162 [2024-02-02 23:14:54] asyncio DEBUG : Using selector: EpollSelector
2024-02-02 23:14:54.319982282 [2024-02-02 23:14:54] asyncio DEBUG : Using selector: EpollSelector
2024-02-02 23:14:54.627539449 [2024-02-02 23:14:54] frigate.video ERROR : Einfahrt: Unable to read frames from ffmpeg process.
2024-02-02 23:14:54.628050088 [2024-02-02 23:14:54] frigate.video ERROR : Einfahrt: ffmpeg process is not running. exiting capture thread...
2024-02-02 23:14:54.695382300 [2024-02-02 23:14:54] frigate.video ERROR : Haustuer: Unable to read frames from ffmpeg process.
2024-02-02 23:14:54.695385891 [2024-02-02 23:14:54] frigate.video ERROR : Haustuer: ffmpeg process is not running. exiting capture thread...
2024-02-02 23:14:54.695718601 [2024-02-02 23:14:54] frigate.video ERROR : Kellertuer: Unable to read frames from ffmpeg process.
2024-02-02 23:14:54.695721031 [2024-02-02 23:14:54] frigate.video ERROR : Kellertuer: ffmpeg process is not running. exiting capture thread...
2024-02-02 23:14:59.256991435 [2024-02-02 23:14:59] asyncio DEBUG : Using selector: EpollSelector
2024-02-02 23:14:59.264605100 [2024-02-02 23:14:59] frigate.record.maintainer WARNING : Unable to keep up with recording segments in cache for Einfahrt. Keeping the 6 most recent segments out of 7 and discarding the rest...
2024-02-02 23:14:59.265291941 [2024-02-02 23:14:59] frigate.record.maintainer WARNING : Unable to keep up with recording segments in cache for Haustuer. Keeping the 6 most recent segments out of 7 and discarding the rest...
2024-02-02 23:14:59.266127274 [2024-02-02 23:14:59] frigate.record.maintainer WARNING : Unable to keep up with recording segments in cache for Kellertuer. Keeping the 6 most recent segments out of 7 and discarding the rest...
2024-02-02 23:14:59.519322043 [2024-02-02 23:14:59] watchdog.Einfahrt ERROR : Ffmpeg process crashed unexpectedly for Einfahrt.
2024-02-02 23:14:59.525181021 [2024-02-02 23:14:59] watchdog.Einfahrt ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-02 23:14:59.525186944 [2024-02-02 23:14:59] ffmpeg.Einfahrt.detect ERROR : rtsp://127.0.0.1:8554/Einfahrt_sub: Invalid data found when processing input
2024-02-02 23:14:59.593149118 [2024-02-02 23:14:59] watchdog.Haustuer ERROR : Ffmpeg process crashed unexpectedly for Haustuer.
2024-02-02 23:14:59.593152919 [2024-02-02 23:14:59] watchdog.Haustuer ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-02 23:14:59.593154867 [2024-02-02 23:14:59] ffmpeg.Haustuer.detect ERROR : rtsp://127.0.0.1:8554/Haustuer_sub: Invalid data found when processing input
2024-02-02 23:14:59.593156667 [2024-02-02 23:14:59] watchdog.Kellertuer ERROR : Ffmpeg process crashed unexpectedly for Kellertuer.
2024-02-02 23:14:59.593158378 [2024-02-02 23:14:59] watchdog.Kellertuer ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-02 23:14:59.593160132 [2024-02-02 23:14:59] ffmpeg.Kellertuer.detect ERROR : rtsp://127.0.0.1:8554/Kellertuer_sub: Invalid data found when processing input
2024-02-02 23:15:04.256477036 [2024-02-02 23:15:04] asyncio DEBUG : Using selector: EpollSelector
2024-02-02 23:15:04.319516283 [2024-02-02 23:15:04] asyncio DEBUG : Using selector: EpollSelector
apologies, found it :-( I used sub instead of ext in the url
Just to provide update: I did update to use the correct config, however 6 out of my 10 Reolink cameras would go dead and provide no data what-so-ever and no amount of reset fixed them. I noticed that the cameras that were not working were incidentally all the same kinds RLC-510WA while my E-10 Zoom indoors and my Door bell were still working.
So I dug a bit deeper and found that despite Reolink not providing an official firmware update for my 510WAs the Reolink firmware repository github did have newer firmwares that mimicked the setting that of my E10s (fixed bitrate, 1x frame interleave). Once I updated all 6 of my cameras to this firmware they all started working perfectly, even with the baked in 1.8.4 version of go2rtc.
This is my stream setup now, although the biggest difference was the latest firmware:
patio:
- ffmpeg:http://192.168.2.153/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}#video=copy#audio=copy#audio=opus
patio_sub:
- ffmpeg:http://192.168.2.153/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=${{FRIGATE_CAMERA_USER}}&password=${{FRIGATE_CAMERA_PASSWORD}}
Issue not fixed yet
Unfortunately, I can't replicate the problem on my camera. Everything works fine with no breaks.
I updated to the latest Frigate today which comes bundled with go2rtc 1.8.4 and my logs became atrocious dropping frames. I sideloaded 1.6.2 and things went back to working "fine" (I still miss recordings on occasion but nothing like the errors I got with 1.8.4).
I sideloaded 1.7.0 and the errors match that of 1.8.4 and 1.8.5 so whatever 1.7.0 introduced persists in all future versions.