blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.21k stars 1.76k forks source link

[Config Support]: go2rtc i/o timeout for candidate #6176

Closed smoksnes closed 1 year ago

smoksnes commented 1 year ago

Describe the problem you are having

I have two Annke C800, which normally works well. But I can't seem to get it to work with go2rtc. Whenever a stream is requested I get this error:

WRN github.com/AlexxIT/go2rtc/cmd/webrtc/candidates.go:20 > error="write udp 10.10.0.8:50470->108.XXX.14.XXX:19302: i/o timeout"

IP is semi-obfuscated by me. I don't know if it's a network error, or because of H.265. I don't use H.265+ at the moment. The video image is black only.

I tried adding ffmpeg:rtsp: to my webrtc settings but it didn't help.

Here's my compose:


  frigate:
    container_name: frigate
    depends_on:
      - homeassistant
      - mosquitto
    networks:
      local:
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable #blakeblackshear/frigate:stable
    shm_size: "64mb" # update for your cameras based on calculation above
    devices:
      - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./Frigate/config.yml:/config/config.yml:ro
      - /media/smoksnes/Frigate/Frigate:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5050:5000"
      - "1935:1935" # RTMP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      FRIGATE_RTSP_PASSWORD: "password"

networks:
  local:
    driver: bridge
    ipam:
     config:
       - subnet: 10.10.0.0/16
         gateway: 10.10.0.1

Version

0.12.0-DA3E197

Frigate config file

# yaml-language-server: $schema=http://localhost:5050/api/config/schema
detectors:
  coral:
    type: edgetpu
    device: usb
record:
  enabled: True
  events:
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 5
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 5
    # Optional: Objects to save recordings for. (default: all tracked objects)
    # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
    required_zones:
      - house
      - driveway
      - pateo
    retain:
      default: 1
snapshots:
  # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True
  # Optional: save a clean PNG copy of the snapshot image (default: shown below)
  clean_copy: False
  # Optional: print a timestamp on the snapshots (default: shown below)
  timestamp: True
  # Optional: draw bounding box on the snapshots (default: shown below)
  bounding_box: True
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: True

mqtt:
  host: mosquitto
objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - cat
    - dog
    - person
    - motorcycle
    - bicycle
    - car
  # Optional: Delay when updating camera motion through MQTT from ON -> OFF (default: shown below).
  mqtt_off_delay: 30
go2rtc:
  log:
    level: debug
  webrtc:
    candidates:
      - 192.168.1.220:8555
      - stun:8555
  streams:
    carport:
      - ffmpeg:rtsp://admin:some_password@192.168.60.30:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
    altan:
      - ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 
cameras:
  carport: # <------ Name the camera
    zones:
      driveway:
        coordinates: 196,0,363,0,469,0,453,263,247,412,0,480,0,0
        objects:
          - cat
          - dog
          - person
          - motorcycle
          - bicycle
          - car
      house:
        coordinates: 640,480,113,480,225,450,294,399,456,286,466,0,640,0
        objects:
          - cat
          - dog
          - person

    # objects:
    #   filters:
    #     car:
    #       mask:
    #       - 640,480,174,480,436,239,640,393
        # bicycle:
        #   mask:
        #   - 464,302,602,369,640,161,511,136
    motion:
      mask:
        - 496,0,498,64,497,117,460,112,416,95,410,0
        - 0,25,0,0,185,0,186,23

    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
        rtmp: -c:v copy -c:a aac -f flv
      inputs:
        - path: rtsp://admin:some_password@192.168.60.30:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 # <----- Update for your camera
          roles:
            - rtmp
            - record
        - path: rtsp://admin:some_password@192.168.60.30:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2 # <----- Update for your camera
          roles:
            - detect
    rtmp:
      enabled: False # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution
  altan: # <------ Name the camera
    zones:
      pateo:
        coordinates: 640,0,0,24,0,210,23,480,596,480
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
        rtmp: -c:v copy -c:a aac -f flv
      inputs:
        - path: rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 # <----- Update for your camera
          roles:
            - rtmp
            - record
        - path: rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2 # <----- Update for your camera
          roles:
            - detect
    motion:
      mask:
        - 336,77,337,196,300,230,294,136,289,62,318,22
        - 237,190,238,233,236,299,193,309,190,129,242,121
    rtmp:
      enabled: False # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution

Relevant log output

Log from Frigate:


2023-04-20 15:03:07.695335529  [INFO] Starting Frigate...
2023-04-20 15:03:08.705607060  [2023-04-20 15:03:08] frigate.app                    INFO    : Starting Frigate (0.12.0-da3e197)
2023-04-20 15:03:08.729885968  [2023-04-20 15:03:08] peewee_migrate                 INFO    : Starting migrations
2023-04-20 15:03:08.758480568  [2023-04-20 15:03:08] peewee_migrate                 INFO    : There is nothing to migrate
2023-04-20 15:03:08.776515858  [2023-04-20 15:03:08] frigate.app                    INFO    : Output process started: 436
2023-04-20 15:03:08.776842301  [2023-04-20 15:03:08] detector.coral                 INFO    : Starting detection process: 435
2023-04-20 15:03:11.431224136  [2023-04-20 15:03:08] frigate.app                    INFO    : Camera processor started for carport: 441
2023-04-20 15:03:11.431410492  [2023-04-20 15:03:08] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-04-20 15:03:11.431597149  [2023-04-20 15:03:08] frigate.app                    INFO    : Camera processor started for altan: 445
2023-04-20 15:03:11.431811896  [2023-04-20 15:03:08] frigate.app                    INFO    : Capture process started for carport: 446
2023-04-20 15:03:11.432000644  [2023-04-20 15:03:08] frigate.app                    INFO    : Capture process started for altan: 450
2023-04-20 15:03:11.432196049  [2023-04-20 15:03:08] frigate.comms.dispatcher       INFO    : Turning off detection for carport
2023-04-20 15:03:11.432384793  [2023-04-20 15:03:08] frigate.comms.dispatcher       INFO    : Turning off detection for altan
2023-04-20 15:03:11.441338193  [2023-04-20 15:03:11] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found

Log from go2rtc:

2023-04-20 15:03:07.688280767 [INFO] Preparing go2rtc config... 
2023-04-20 15:03:07.956546211 [INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually 2023-04-20 15:03:07.980620593 [INFO] Starting go2rtc...
2023-04-20 15:03:08.104039424 15:03:08.103 INF go2rtc version 1.2.0 linux/amd64 
2023-04-20 15:03:08.104513283 15:03:08.104 INF [api] listen addr=:1984 
2023-04-20 15:03:08.104921454 15:03:08.104 INF [rtsp] listen addr=:8554
2023-04-20 15:03:08.105457152 15:03:08.105 INF [srtp] listen addr=:8443 
2023-04-20 15:03:08.105767422 15:03:08.105 INF [webrtc] listen addr=:8555 
2023-04-20 15:03:17.700616042 [INFO] Starting go2rtc healthcheck service...
2023-04-20 15:03:54.732819104 15:03:54.732 DBG [streams] probe producer url=ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 
2023-04-20 15:03:54.733034426 15:03:54.732 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -c copy -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/17d168f0e3d57ae8548e194a7353e684"
2023-04-20 15:03:56.742744510 15:03:56.742 DBG [exec] run launch=2.009632956s 2023-04-20 15:03:56.742859098 15:03:56.742 DBG [streams] start producer url=ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 
2023-04-20 15:03:56.899019739 15:03:56.898 DBG [streams] stop producer url=ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 2023-04-20 15:03:56.977034900 av_interleaved_write_frame(): Broken pipe 
2023-04-20 15:03:56.977076036 Error writing trailer of rtsp://localhost:8554/17d168f0e3d57ae8548e194a7353e684: Broken pipe 
2023-04-20 15:03:56.980179075 15:03:56.980 DBG [webrtc] new consumer url=altan 2023-04-20 15:03:57.000785972 15:03:57.000 DBG [streams] probe producer url=ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 
2023-04-20 15:03:57.000941020 15:03:57.000 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -c copy -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/17d168f0e3d57ae8548e194a7353e684" 
2023-04-20 15:03:58.910852493 15:03:58.910 DBG [exec] run launch=1.909747274s 2023-04-20 15:03:58.911275796 15:03:58.911 DBG [streams] start producer url=ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 
2023-04-20 15:04:01.935971854 15:04:01.935 WRN github.com/AlexxIT/go2rtc/cmd/webrtc/candidates.go:20 > error="write udp 10.10.0.8:48102->108.177.14.127:19302: i/o timeout" 
2023-04-20 15:04:29.136158949 15:04:29.135 DBG [streams] stop producer url=ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 
2023-04-20 15:04:29.174027988 av_interleaved_write_frame(): Broken pipe 
2023-04-20 15:04:29.174091473 Error writing trailer of rtsp://localhost:8554/17d168f0e3d57ae8548e194a7353e684: Broken pipe

Log from go2rtc dashboard:


{
  "producers": [
    {
      "type": "RTSP source",
      "url": "rtsp://localhost:8554/17d168f0e3d57ae8548e194a7353e684",
      "remote_addr": "127.0.0.1:58454",
      "user_agent": "ffmpeg/go2rtc",
      "medias": [
        "video, sendonly, 96 H265/90000",
        "audio, sendonly, 0 PCMU/8000"
      ],
      "tracks": [
        "96 H265/90000, sinks=0",
        "0 PCMU/8000, sinks=1"
      ],
      "recv": 5984188
    }
  ],
  "consumers": [
    {
      "type": "WebRTC client",
      "remote_addr": "udp4 prflx 192.168.1.150:52926 related :0",
      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1",
      "send": 101592
    }
  ]
}

Logs from nginx

2023-04-20 15:03:07.709909448  [INFO] Starting NGINX...
2023-04-20 15:03:09.852601014  10.10.0.1 - - [20/Apr/2023:15:03:09 +0200] "GET /api/config HTTP/1.1" 200 10860 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:09.860638323  10.10.0.1 - - [20/Apr/2023:15:03:09 +0200] "GET /api/logs/frigate HTTP/1.1" 200 258 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:09.861716220  10.10.0.1 - - [20/Apr/2023:15:03:09 +0200] "GET /api/logs/go2rtc HTTP/1.1" 200 296 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:09.861932982  10.10.0.1 - - [20/Apr/2023:15:03:09 +0200] "GET /api/logs/nginx HTTP/1.1" 200 309 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:12.187173302  10.10.0.1 - - [20/Apr/2023:15:03:12 +0200] "GET /api/stats HTTP/1.1" 200 2519 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:03:20.218055784  10.10.0.1 - - [20/Apr/2023:15:03:20 +0200] "GET /api/stats HTTP/1.1" 200 2557 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:03:21.384730382  10.10.0.1 - - [20/Apr/2023:15:03:21 +0200] "GET /logs HTTP/1.1" 200 6641 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:21.434741491  10.10.0.1 - - [20/Apr/2023:15:03:21 +0200] "GET /api/config HTTP/1.1" 200 10860 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:21.492586714  10.10.0.1 - - [20/Apr/2023:15:03:21 +0200] "GET /api/logs/frigate HTTP/1.1" 200 456 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:21.493968127  10.10.0.1 - - [20/Apr/2023:15:03:21 +0200] "GET /api/logs/go2rtc HTTP/1.1" 200 324 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:21.495510665  10.10.0.1 - - [20/Apr/2023:15:03:21 +0200] "GET /api/logs/nginx HTTP/1.1" 200 484 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:03:28.184745755  10.10.0.1 - - [20/Apr/2023:15:03:28 +0200] "GET /api/stats HTTP/1.1" 200 2521 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:03:36.196307013  10.10.0.1 - - [20/Apr/2023:15:03:36 +0200] "GET /api/stats HTTP/1.1" 200 2521 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:03:44.196153605  10.10.0.1 - - [20/Apr/2023:15:03:44 +0200] "GET /api/stats HTTP/1.1" 200 2521 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:03:50.454349560  192.168.1.250 - - [20/Apr/2023:15:03:50 +0200] "GET / HTTP/1.1" 200 6641 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:50.525209807  192.168.1.250 - - [20/Apr/2023:15:03:50 +0200] "GET /api/config HTTP/1.1" 200 10860 "http://192.168.1.220:5050/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:50.617730049  192.168.1.250 - - [20/Apr/2023:15:03:50 +0200] "GET //api/altan/latest.jpg?h=385 HTTP/1.1" 200 37295 "http://192.168.1.220:5050/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:50.620094294  192.168.1.250 - - [20/Apr/2023:15:03:50 +0200] "GET //api/carport/latest.jpg?h=385 HTTP/1.1" 200 35791 "http://192.168.1.220:5050/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:52.203525950  10.10.0.1 - - [20/Apr/2023:15:03:52 +0200] "GET /api/stats HTTP/1.1" 200 2521 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:03:54.734141690  192.168.1.250 - - [20/Apr/2023:15:03:54 +0200] "GET /api/config HTTP/1.1" 200 10860 "http://192.168.1.220:5050/cameras/altan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:54.757304713  192.168.1.250 - - [20/Apr/2023:15:03:54 +0200] "GET //api/altan/cat/thumbnail.jpg HTTP/1.1" 200 1111 "http://192.168.1.220:5050/cameras/altan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:54.757994906  192.168.1.250 - - [20/Apr/2023:15:03:54 +0200] "GET //api/altan/dog/thumbnail.jpg HTTP/1.1" 200 1111 "http://192.168.1.220:5050/cameras/altan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:54.763409582  192.168.1.250 - - [20/Apr/2023:15:03:54 +0200] "GET //api/altan/motorcycle/thumbnail.jpg HTTP/1.1" 200 1111 "http://192.168.1.220:5050/cameras/altan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:54.765743096  192.168.1.250 - - [20/Apr/2023:15:03:54 +0200] "GET //api/altan/bicycle/thumbnail.jpg HTTP/1.1" 200 1111 "http://192.168.1.220:5050/cameras/altan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:54.767306348  192.168.1.250 - - [20/Apr/2023:15:03:54 +0200] "GET //api/altan/person/thumbnail.jpg HTTP/1.1" 200 6999 "http://192.168.1.220:5050/cameras/altan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:54.770117667  192.168.1.250 - - [20/Apr/2023:15:03:54 +0200] "GET //api/altan/car/thumbnail.jpg HTTP/1.1" 200 1111 "http://192.168.1.220:5050/cameras/altan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:03:56.898815803  192.168.1.250 - - [20/Apr/2023:15:03:56 +0200] "GET /live/mse/api/ws?src=altan HTTP/1.1" 101 803 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:04:00.200889191  10.10.0.1 - - [20/Apr/2023:15:04:00 +0200] "GET /api/stats HTTP/1.1" 200 2553 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:04:06.721885887  10.10.0.1 - - [20/Apr/2023:15:04:06 +0200] "GET /logs HTTP/1.1" 200 6641 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:04:06.733190922  10.10.0.1 - - [20/Apr/2023:15:04:06 +0200] "GET /ws HTTP/1.1" 101 44 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:04:06.780898056  10.10.0.1 - - [20/Apr/2023:15:04:06 +0200] "GET /api/config HTTP/1.1" 200 10860 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:04:06.823326429  10.10.0.1 - - [20/Apr/2023:15:04:06 +0200] "GET /api/logs/frigate HTTP/1.1" 200 456 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:04:06.823353816  10.10.0.1 - - [20/Apr/2023:15:04:06 +0200] "GET /api/logs/go2rtc HTTP/1.1" 200 942 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:04:06.823843509  10.10.0.1 - - [20/Apr/2023:15:04:06 +0200] "GET /api/logs/nginx HTTP/1.1" 200 959 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:04:08.220895780  10.10.0.1 - - [20/Apr/2023:15:04:08 +0200] "GET /api/stats HTTP/1.1" 200 2553 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:04:16.216476451  10.10.0.1 - - [20/Apr/2023:15:04:16 +0200] "GET /api/stats HTTP/1.1" 200 2553 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:04:24.025411915  192.168.1.250 - - [20/Apr/2023:15:04:24 +0200] "GET /live/webrtc/api/ws?src=altan HTTP/1.1" 101 2384 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:04:24.026827811  192.168.1.250 - - [20/Apr/2023:15:04:24 +0200] "GET /ws HTTP/1.1" 101 3672 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" "-"
2023-04-20 15:04:24.203429225  10.10.0.1 - - [20/Apr/2023:15:04:24 +0200] "GET /api/stats HTTP/1.1" 200 2585 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:04:32.226033513  10.10.0.1 - - [20/Apr/2023:15:04:32 +0200] "GET /api/stats HTTP/1.1" 200 2521 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:04:40.195601406  10.10.0.1 - - [20/Apr/2023:15:04:40 +0200] "GET /api/stats HTTP/1.1" 200 2521 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:04:48.210823545  10.10.0.1 - - [20/Apr/2023:15:04:48 +0200] "GET /api/stats HTTP/1.1" 200 2554 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:04:56.222488752  10.10.0.1 - - [20/Apr/2023:15:04:56 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:05:04.215690915  10.10.0.1 - - [20/Apr/2023:15:05:04 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:05:12.182614486  10.10.0.1 - - [20/Apr/2023:15:05:12 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:05:20.215048882  10.10.0.1 - - [20/Apr/2023:15:05:20 +0200] "GET /api/stats HTTP/1.1" 200 2554 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:05:28.210426794  10.10.0.1 - - [20/Apr/2023:15:05:28 +0200] "GET /api/stats HTTP/1.1" 200 2554 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:05:36.179716535  10.10.0.1 - - [20/Apr/2023:15:05:36 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:05:44.186827884  10.10.0.1 - - [20/Apr/2023:15:05:44 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:05:52.189504092  10.10.0.1 - - [20/Apr/2023:15:05:52 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:00.221222299  10.10.0.1 - - [20/Apr/2023:15:06:00 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:08.195325288  10.10.0.1 - - [20/Apr/2023:15:06:08 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:16.217651622  10.10.0.1 - - [20/Apr/2023:15:06:16 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:24.212375674  10.10.0.1 - - [20/Apr/2023:15:06:24 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:32.207593344  10.10.0.1 - - [20/Apr/2023:15:06:32 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:40.179109744  10.10.0.1 - - [20/Apr/2023:15:06:40 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:48.178680732  10.10.0.1 - - [20/Apr/2023:15:06:48 +0200] "GET /api/stats HTTP/1.1" 200 2554 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:06:56.188097737  10.10.0.1 - - [20/Apr/2023:15:06:56 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:07:04.194944282  10.10.0.1 - - [20/Apr/2023:15:07:04 +0200] "GET /api/stats HTTP/1.1" 200 2522 "-" "HomeAssistant/2022.11.1 aiohttp/3.8.1 Python/3.10" "-"
2023-04-20 15:07:06.323138500  10.10.0.1 - - [20/Apr/2023:15:07:06 +0200] "GET /api/config HTTP/1.1" 200 10860 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"
2023-04-20 15:07:06.328201427  10.10.0.1 - - [20/Apr/2023:15:07:06 +0200] "GET /api/logs/frigate HTTP/1.1" 200 456 "http://localhost:5050/logs" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" "-"

Frigate stats

{
   "altan":{
      "camera_fps":5.1,
      "capture_pid":449,
      "detection_enabled":0,
      "detection_fps":0.0,
      "ffmpeg_pid":459,
      "pid":444,
      "process_fps":5.1,
      "skipped_fps":0.0
   },
   "carport":{
      "camera_fps":5.0,
      "capture_pid":446,
      "detection_enabled":0,
      "detection_fps":0.0,
      "ffmpeg_pid":458,
      "pid":442,
      "process_fps":5.0,
      "skipped_fps":0.0
   },
   "cpu_usages":{
      "%Cpu(s):":{
         "cpu":"id,",
         "mem":"0.2"
      },
      "1":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "105":{
         "cpu":"2.3",
         "mem":"1.0"
      },
      "1090":{
         "cpu":"2.3",
         "mem":"0.1"
      },
      "119":{
         "cpu":"0.0",
         "mem":"0.1"
      },
      "126":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "127":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "128":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "129":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "130":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "136":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "15":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "154":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "16":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "170":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "24":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "25":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "26":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "27":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "2731":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "2743":{
         "cpu":"0.3",
         "mem":"0.0"
      },
      "2746":{
         "cpu":"0.3",
         "mem":"0.0"
      },
      "28":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "29":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "30":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "31":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "32":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "41":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "42":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "427":{
         "cpu":"0.3",
         "mem":"0.5"
      },
      "433":{
         "cpu":"0.3",
         "mem":"0.1"
      },
      "434":{
         "cpu":"0.0",
         "mem":"0.6"
      },
      "436":{
         "cpu":"0.7",
         "mem":"0.6"
      },
      "442":{
         "cpu":"0.7",
         "mem":"0.6"
      },
      "443":{
         "cpu":"0.0",
         "mem":"0.3"
      },
      "444":{
         "cpu":"0.7",
         "mem":"0.6"
      },
      "445":{
         "cpu":"0.0",
         "mem":"0.1"
      },
      "446":{
         "cpu":"1.3",
         "mem":"0.5"
      },
      "449":{
         "cpu":"1.7",
         "mem":"0.5"
      },
      "450":{
         "cpu":"0.0",
         "mem":"0.1"
      },
      "458":{
         "cpu":"7.3",
         "mem":"0.2"
      },
      "459":{
         "cpu":"7.3",
         "mem":"0.2"
      },
      "464":{
         "cpu":"5.0",
         "mem":"0.2"
      },
      "465":{
         "cpu":"5.0",
         "mem":"0.2"
      },
      "80":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "81":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "82":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "89":{
         "cpu":"2.0",
         "mem":"0.1"
      },
      "98":{
         "cpu":"0.0",
         "mem":"0.0"
      },
      "MiB":{
         "cpu":"7012.4",
         "mem":"avail"
      },
      "PID":{
         "cpu":"%CPU",
         "mem":"%MEM"
      },
      "Tasks:":{
         "cpu":"stopped,",
         "mem":"0"
      },
      "top":{
         "cpu":"users,",
         "mem":"load"
      }
   },
   "detection_fps":0.0,
   "detectors":{
      "coral":{
         "detection_start":0.0,
         "inference_speed":10.0,
         "pid":434
      }
   },
   "service":{
      "last_updated":1681990723,
      "latest_version":"0.12.0",
      "storage":{
         "/dev/shm":{
            "free":65.6,
            "mount_type":"tmpfs",
            "total":67.1,
            "used":1.5
         },
         "/media/frigate/clips":{
            "free":3735781.8,
            "mount_type":"ext4",
            "total":3936613.3,
            "used":785.9
         },
         "/media/frigate/recordings":{
            "free":3735781.8,
            "mount_type":"ext4",
            "total":3936613.3,
            "used":785.9
         },
         "/tmp/cache":{
            "free":981.1,
            "mount_type":"tmpfs",
            "total":1000.0,
            "used":18.9
         }
      },
      "temperatures":{

      },
      "uptime":3020,
      "version":"0.12.0-da3e197"
   }
}

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

the logs you have provided are not helpful and unrelated, you need to provide ALL of the logs from frigate and go2rtc

smoksnes commented 1 year ago

the logs you have provided are not helpful and unrelated, you need to provide ALL of the logs from frigate and go2rtc

I copied the logs from within frigate and pasted them, but I excluded the nginx-logs, which I have now included. Earlier I also just copied parts of go2rtc-logs before they started repeating. Now they are all included. What logs am I missing?

NickM-27 commented 1 year ago

The go2rtc logs were pasted without any newlines, so they were not visible in the post

smoksnes commented 1 year ago

I'll manually fix it. Give me one sec.

smoksnes commented 1 year ago

The go2rtc logs were pasted without any newlines, so they were not visible in the post

Now they are more readable.

NickM-27 commented 1 year ago

there's no reason to set debug logs for go2rtc across the board. I would suggest doing

go2rtc:
  streams:
    ...
  log:
    exec: trace

and that will give helpful info to seeing what is going on

smoksnes commented 1 year ago

there's no reason to set debug logs for go2rtc across the board. I would suggest doing

go2rtc:
  streams:
    ...
  log:
    exec: trace

and that will give helpful info to seeing what is going on

I try to access it from an iPhone on the same LAN, and from another (Windows) computer on the same LAN.

2023-04-20 15:36:59.695169561  [INFO] Preparing go2rtc config...
2023-04-20 15:36:59.911841980  [INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually
2023-04-20 15:36:59.935793042  [INFO] Starting go2rtc...
2023-04-20 15:37:00.093915053  15:37:00.093 INF go2rtc version 1.2.0 linux/amd64
2023-04-20 15:37:00.094258242  15:37:00.094 INF [api] listen addr=:1984
2023-04-20 15:37:00.094524933  15:37:00.094 INF [rtsp] listen addr=:8554
2023-04-20 15:37:00.094873855  15:37:00.094 INF [srtp] listen addr=:8443
2023-04-20 15:37:00.095097227  15:37:00.095 INF [webrtc] listen addr=:8555
2023-04-20 15:37:05.359608519  15:37:05.359 DBG [exec] run url="exec:ffmpeg -hide_banner -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -c copy -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/994d3e1dd2f36a670cb80ae094987cae"
2023-04-20 15:37:07.372416062  Input #0, rtsp, from 'rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1':
2023-04-20 15:37:07.372424966    Metadata:
2023-04-20 15:37:07.372429862      title           : Media Presentation
2023-04-20 15:37:07.372484903    Duration: N/A, start: 0.000000, bitrate: N/A
2023-04-20 15:37:07.372567271    Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], 12.50 tbr, 90k tbn
2023-04-20 15:37:07.372736600    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
2023-04-20 15:37:07.378427760  15:37:07.378 DBG [exec] run launch=2.018780064s
2023-04-20 15:37:07.378743804  Output #0, rtsp, to 'rtsp://localhost:8554/994d3e1dd2f36a670cb80ae094987cae':
2023-04-20 15:37:07.378753828    Metadata:
2023-04-20 15:37:07.378809579      title           : Media Presentation
2023-04-20 15:37:07.378816473      encoder         : Lavf59.27.100
2023-04-20 15:37:07.378938918    Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 12.50 tbr, 90k tbn
2023-04-20 15:37:07.379097514    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
2023-04-20 15:37:07.379106751  Stream mapping:
2023-04-20 15:37:07.379168878    Stream #0:0 -> #0:0 (copy)
2023-04-20 15:37:07.379174905    Stream #0:1 -> #0:1 (copy)
2023-04-20 15:37:07.379180896  Press [q] to stop, [?] for help
2023-04-20 15:37:09.703873698  frame=    0 fps=0.0 q=-1.0 size=N/A time=00:00:01.84 bitrate=N/A speed=N/A    
frame=    3 fps=0.0 q=-1.0 size=N/A time=00:00:02.36 bitrate=N/A speed=4.44x    
frame=   10 fps=9.7 q=-1.0 size=N/A time=00:00:02.84 bitrate=N/A speed=2.75x    
frame=   16 fps= 10 q=-1.0 size=N/A time=00:00:03.40 bitrate=N/A speed=2.19x    
frame=   22 fps= 11 q=-1.0 size=N/A time=00:00:03.92 bitrate=N/A speed=1.89x    
[INFO] Starting go2rtc healthcheck service...
2023-04-20 15:37:10.404964418  frame=   28 fps= 11 q=-1.0 size=N/A time=00:00:04.44 bitrate=N/A speed=1.71x    
15:37:10.404 WRN github.com/AlexxIT/go2rtc/cmd/webrtc/candidates.go:20 > error="write udp 10.10.0.8:59585->108.177.14.127:19302: i/o timeout"
2023-04-20 15:38:01.756173065  frame=   34 fps= 11 q=-1.0 size=N/A time=00:00:04.96 bitrate=N/A speed= 1.6x    
frame=   41 fps= 11 q=-1.0 size=N/A time=00:00:05.44 bitrate=N/A speed=1.51x    
frame=   47 fps= 11 q=-1.0 size=N/A time=00:00:05.96 bitrate=N/A speed=1.45x    
frame=   52 fps= 11 q=-1.0 size=N/A time=00:00:06.48 bitrate=N/A speed= 1.4x    
frame=   59 fps= 11 q=-1.0 size=N/A time=00:00:07.00 bitrate=N/A speed=1.36x    
frame=   65 fps= 11 q=-1.0 size=N/A time=00:00:07.48 bitrate=N/A speed=1.32x    
frame=   71 fps= 11 q=-1.0 size=N/A time=00:00:08.00 bitrate=N/A speed=1.29x    
frame=   77 fps= 12 q=-1.0 size=N/A time=00:00:08.52 bitrate=N/A speed=1.28x    
frame=   83 fps= 12 q=-1.0 size=N/A time=00:00:09.04 bitrate=N/A speed=1.25x    
frame=   90 fps= 12 q=-1.0 size=N/A time=00:00:09.56 bitrate=N/A speed=1.24x    
frame=   97 fps= 12 q=-1.0 size=N/A time=00:00:10.12 bitrate=N/A speed=1.23x    
frame=  103 fps= 12 q=-1.0 size=N/A time=00:00:10.64 bitrate=N/A speed=1.21x    
frame=  110 fps= 12 q=-1.0 size=N/A time=00:00:11.16 bitrate=N/A speed=1.19x    
frame=  118 fps= 12 q=-1.0 size=N/A time=00:00:11.76 bitrate=N/A speed=1.19x    
frame=  123 fps= 12 q=-1.0 size=N/A time=00:00:12.32 bitrate=N/A speed=1.17x    
frame=  129 fps= 12 q=-1.0 size=N/A time=00:00:12.88 bitrate=N/A speed=1.17x    
frame=  136 fps= 12 q=-1.0 size=N/A time=00:00:13.40 bitrate=N/A speed=1.16x    
frame=  142 fps= 12 q=-1.0 size=N/A time=00:00:13.92 bitrate=N/A speed=1.16x    
frame=  148 fps= 12 q=-1.0 size=N/A time=00:00:14.36 bitrate=N/A speed=1.14x    
frame=  155 fps= 12 q=-1.0 size=N/A time=00:00:14.96 bitrate=N/A speed=1.14x    
frame=  160 fps= 12 q=-1.0 size=N/A time=00:00:15.44 bitrate=N/A speed=1.14x    
frame=  167 fps= 12 q=-1.0 size=N/A time=00:00:15.92 bitrate=N/A speed=1.13x    
frame=  172 fps= 12 q=-1.0 size=N/A time=00:00:16.44 bitrate=N/A speed=1.13x    
frame=  179 fps= 12 q=-1.0 size=N/A time=00:00:16.92 bitrate=N/A speed=1.12x    
frame=  186 fps= 12 q=-1.0 size=N/A time=00:00:17.56 bitrate=N/A speed=1.12x    
frame=  192 fps= 12 q=-1.0 size=N/A time=00:00:18.08 bitrate=N/A speed=1.11x    
frame=  198 fps= 12 q=-1.0 size=N/A time=00:00:18.64 bitrate=N/A speed=1.11x    
frame=  205 fps= 12 q=-1.0 size=N/A time=00:00:19.16 bitrate=N/A speed=1.11x    
frame=  211 fps= 12 q=-1.0 size=N/A time=00:00:19.64 bitrate=N/A speed= 1.1x    
frame=  217 fps= 12 q=-1.0 size=N/A time=00:00:20.12 bitrate=N/A speed= 1.1x    
frame=  225 fps= 12 q=-1.0 size=N/A time=00:00:20.72 bitrate=N/A speed= 1.1x    
frame=  231 fps= 12 q=-1.0 size=N/A time=00:00:21.28 bitrate=N/A speed=1.09x    
frame=  237 fps= 12 q=-1.0 size=N/A time=00:00:21.84 bitrate=N/A speed=1.09x    
frame=  243 fps= 12 q=-1.0 size=N/A time=00:00:22.36 bitrate=N/A speed=1.09x    
frame=  249 fps= 12 q=-1.0 size=N/A time=00:00:22.84 bitrate=N/A speed=1.09x    
frame=  255 fps= 12 q=-1.0 size=N/A time=00:00:23.36 bitrate=N/A speed=1.08x    
frame=  262 fps= 12 q=-1.0 size=N/A time=00:00:23.88 bitrate=N/A speed=1.08x    
frame=  267 fps= 12 q=-1.0 size=N/A time=00:00:24.40 bitrate=N/A speed=1.08x    
frame=  274 fps= 12 q=-1.0 size=N/A time=00:00:24.92 bitrate=N/A speed=1.08x    
frame=  280 fps= 12 q=-1.0 size=N/A time=00:00:25.40 bitrate=N/A speed=1.08x    
frame=  286 fps= 12 q=-1.0 size=N/A time=00:00:25.92 bitrate=N/A speed=1.08x    
frame=  293 fps= 12 q=-1.0 size=N/A time=00:00:26.52 bitrate=N/A speed=1.08x    
frame=  300 fps= 12 q=-1.0 size=N/A time=00:00:27.04 bitrate=N/A speed=1.07x    
frame=  306 fps= 12 q=-1.0 size=N/A time=00:00:27.60 bitrate=N/A speed=1.07x    
frame=  311 fps= 12 q=-1.0 size=N/A time=00:00:28.12 bitrate=N/A speed=1.07x    
frame=  318 fps= 12 q=-1.0 size=N/A time=00:00:28.60 bitrate=N/A speed=1.07x    
frame=  325 fps= 12 q=-1.0 size=N/A time=00:00:29.08 bitrate=N/A speed=1.07x    
frame=  332 fps= 12 q=-1.0 size=N/A time=00:00:29.72 bitrate=N/A speed=1.07x    
frame=  338 fps= 12 q=-1.0 size=N/A time=00:00:30.24 bitrate=N/A speed=1.06x    
frame=  344 fps= 12 q=-1.0 size=N/A time=00:00:30.80 bitrate=N/A speed=1.06x    
frame=  350 fps= 12 q=-1.0 size=N/A time=00:00:31.32 bitrate=N/A speed=1.06x    
frame=  357 fps= 12 q=-1.0 size=N/A time=00:00:31.84 bitrate=N/A speed=1.06x    
frame=  362 fps= 12 q=-1.0 size=N/A time=00:00:32.32 bitrate=N/A speed=1.06x    
frame=  369 fps= 12 q=-1.0 size=N/A time=00:00:32.80 bitrate=N/A speed=1.06x    
frame=  375 fps= 12 q=-1.0 size=N/A time=00:00:33.36 bitrate=N/A speed=1.06x    
frame=  381 fps= 12 q=-1.0 size=N/A time=00:00:33.88 bitrate=N/A speed=1.06x    
frame=  387 fps= 12 q=-1.0 size=N/A time=00:00:34.36 bitrate=N/A speed=1.06x    
frame=  393 fps= 12 q=-1.0 size=N/A time=00:00:34.88 bitrate=N/A speed=1.06x    
frame=  400 fps= 12 q=-1.0 size=N/A time=00:00:35.40 bitrate=N/A speed=1.05x    
frame=  406 fps= 12 q=-1.0 size=N/A time=00:00:35.92 bitrate=N/A speed=1.05x    
frame=  413 fps= 12 q=-1.0 size=N/A time=00:00:36.48 bitrate=N/A speed=1.05x    
frame=  419 fps= 12 q=-1.0 size=N/A time=00:00:37.04 bitrate=N/A speed=1.05x    
frame=  426 fps= 12 q=-1.0 size=N/A time=00:00:37.52 bitrate=N/A speed=1.05x    
frame=  431 fps= 12 q=-1.0 size=N/A time=00:00:38.08 bitrate=N/A speed=1.05x    
frame=  438 fps= 12 q=-1.0 size=N/A time=00:00:38.60 bitrate=N/A speed=1.05x    
frame=  444 fps= 12 q=-1.0 size=N/A time=00:00:39.12 bitrate=N/A speed=1.05x    
frame=  452 fps= 12 q=-1.0 size=N/A time=00:00:39.72 bitrate=N/A speed=1.05x    
frame=  457 fps= 12 q=-1.0 size=N/A time=00:00:40.28 bitrate=N/A speed=1.05x    
frame=  464 fps= 12 q=-1.0 size=N/A time=00:00:40.76 bitrate=N/A speed=1.05x    
frame=  470 fps= 12 q=-1.0 size=N/A time=00:00:41.28 bitrate=N/A speed=1.05x    
frame=  478 fps= 12 q=-1.0 size=N/A time=00:00:41.84 bitrate=N/A speed=1.05x    
frame=  482 fps= 12 q=-1.0 size=N/A time=00:00:42.32 bitrate=N/A speed=1.05x    
frame=  488 fps= 12 q=-1.0 size=N/A time=00:00:42.84 bitrate=N/A speed=1.05x    
frame=  495 fps= 12 q=-1.0 size=N/A time=00:00:43.32 bitrate=N/A speed=1.04x    
frame=  501 fps= 12 q=-1.0 size=N/A time=00:00:43.84 bitrate=N/A speed=1.04x    
frame=  507 fps= 12 q=-1.0 size=N/A time=00:00:44.32 bitrate=N/A speed=1.04x    
frame=  514 fps= 12 q=-1.0 size=N/A time=00:00:44.96 bitrate=N/A speed=1.04x    
frame=  521 fps= 12 q=-1.0 size=N/A time=00:00:45.48 bitrate=N/A speed=1.04x    
frame=  527 fps= 12 q=-1.0 size=N/A time=00:00:46.04 bitrate=N/A speed=1.04x    
frame=  534 fps= 12 q=-1.0 size=N/A time=00:00:46.64 bitrate=N/A speed=1.04x    
frame=  541 fps= 12 q=-1.0 size=N/A time=00:00:47.12 bitrate=N/A speed=1.04x    
frame=  547 fps= 12 q=-1.0 size=N/A time=00:00:47.68 bitrate=N/A speed=1.04x    
frame=  553 fps= 12 q=-1.0 size=N/A time=00:00:48.16 bitrate=N/A speed=1.04x    
frame=  559 fps= 12 q=-1.0 size=N/A time=00:00:48.72 bitrate=N/A speed=1.04x    
frame=  565 fps= 12 q=-1.0 size=N/A time=00:00:49.24 bitrate=N/A speed=1.04x    
frame=  573 fps= 12 q=-1.0 size=N/A time=00:00:49.84 bitrate=N/A speed=1.04x    
frame=  579 fps= 12 q=-1.0 size=N/A time=00:00:50.32 bitrate=N/A speed=1.04x    
frame=  585 fps= 12 q=-1.0 size=N/A time=00:00:50.88 bitrate=N/A speed=1.04x    
frame=  592 fps= 12 q=-1.0 size=N/A time=00:00:51.44 bitrate=N/A speed=1.04x    
frame=  598 fps= 12 q=-1.0 size=N/A time=00:00:51.92 bitrate=N/A speed=1.04x    
frame=  603 fps= 12 q=-1.0 size=N/A time=00:00:52.44 bitrate=N/A speed=1.04x    
frame=  611 fps= 12 q=-1.0 size=N/A time=00:00:53.00 bitrate=N/A speed=1.04x    
frame=  616 fps= 12 q=-1.0 size=N/A time=00:00:53.44 bitrate=N/A speed=1.04x    
frame=  622 fps= 12 q=-1.0 size=N/A time=00:00:53.96 bitrate=N/A speed=1.04x    
frame=  628 fps= 12 q=-1.0 size=N/A time=00:00:54.48 bitrate=N/A speed=1.03x    
frame=  634 fps= 12 q=-1.0 size=N/A time=00:00:55.00 bitrate=N/A speed=1.03x    
frame=  641 fps= 12 q=-1.0 size=N/A time=00:00:55.52 bitrate=N/A speed=1.03x    
frame=  647 fps= 12 q=-1.0 size=N/A time=00:00:56.00 bitrate=N/A speed=1.03x    
av_interleaved_write_frame(): Broken pipe
2023-04-20 15:38:01.756264937  Error writing trailer of rtsp://localhost:8554/994d3e1dd2f36a670cb80ae094987cae: Broken pipe
2023-04-20 15:38:01.756268420  frame=  649 fps= 12 q=-1.0 Lsize=N/A time=00:00:56.20 bitrate=N/A speed=1.03x    
2023-04-20 15:38:01.756271646  video:26372kB audio:425kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
2023-04-20 15:38:01.756724316  Conversion failed!
2023-04-20 15:38:01.758125728  15:38:01.757 TRC [exec] close url="exec:ffmpeg -hide_banner -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -c copy -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/994d3e1dd2f36a670cb80ae094987cae"
NickM-27 commented 1 year ago

So I notice you have some args in the output for recordings, I imagine similar may be needed for go2rtc, I would suggest trying a config like this:

go2rtc:
  streams:
    carport:
      - ffmpeg:rtsp://admin:some_password@192.168.60.30:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb
    altan:
      - ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb
smoksnes commented 1 year ago

So I notice you have some args in the output for recordings, I imagine similar may be needed for go2rtc, I would suggest trying a config like this:

go2rtc:
  streams:
    carport:
      - ffmpeg:rtsp://admin:some_password@192.168.60.30:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb
    altan:
      - ffmpeg:rtsp://admin:some_password@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag´':v hvc1 -bsf:v hevc_mp4toannexb

Thanks for the reply. Unfortunately it didn't solve the issue.

Change config to this:

go2rtc:
  log:
    exec: trace
  webrtc:
    candidates:
      - 192.168.1.220:8555
      - stun:8555
  streams:
    carport:
      - ffmpeg:rtsp://admin:some_pass@192.168.60.30:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb
    altan:
      - ffmpeg:rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb

It resulted in this log:

2023-04-20 17:28:01.624568825  [INFO] Preparing go2rtc config...
2023-04-20 17:28:01.844434785  [INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually
2023-04-20 17:28:01.873007269  [INFO] Starting go2rtc...
2023-04-20 17:28:01.997419118  17:28:01.997 INF go2rtc version 1.2.0 linux/amd64
2023-04-20 17:28:01.997785324  17:28:01.997 INF [api] listen addr=:1984
2023-04-20 17:28:01.998068407  17:28:01.998 INF [rtsp] listen addr=:8554
2023-04-20 17:28:01.998417816  17:28:01.998 INF [srtp] listen addr=:8443
2023-04-20 17:28:01.998670201  17:28:01.998 INF [webrtc] listen addr=:8555
2023-04-20 17:28:11.623601108  [INFO] Starting go2rtc healthcheck service...
2023-04-20 17:28:38.671914233  17:28:38.671 DBG [exec] run url="exec:ffmpeg -hide_banner -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -tag:v hvc1 -bsf:v hevc_mp4toannexb -vn -an -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c"
2023-04-20 17:28:40.790578208  Input #0, rtsp, from 'rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1':
2023-04-20 17:28:40.790587747    Metadata:
2023-04-20 17:28:40.790592776      title           : Media Presentation
2023-04-20 17:28:40.790653954    Duration: N/A, start: 0.000000, bitrate: N/A
2023-04-20 17:28:40.790762131    Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], 12.50 tbr, 90k tbn
2023-04-20 17:28:40.790864020    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
2023-04-20 17:28:40.791082419  Output #0, rtsp, to 'rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c':
2023-04-20 17:28:40.791091204  Output file #0 does not contain any stream
2023-04-20 17:28:40.794163416  17:28:40.793 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url="ffmpeg:rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb"
2023-04-20 17:28:40.794390406  17:28:40.794 DBG [exec] run url="exec:ffmpeg -hide_banner -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -tag:v hvc1 -bsf:v hevc_mp4toannexb -vn -an -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c"
2023-04-20 17:28:42.798047055  Input #0, rtsp, from 'rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1':
2023-04-20 17:28:42.798055978    Metadata:
2023-04-20 17:28:42.798060775      title           : Media Presentation
2023-04-20 17:28:42.798117387    Duration: N/A, start: 0.000000, bitrate: N/A
2023-04-20 17:28:42.798149633    Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], 12.50 tbr, 90k tbn
2023-04-20 17:28:42.798206336    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
2023-04-20 17:28:42.798338210  Output #0, rtsp, to 'rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c':
2023-04-20 17:28:42.798344602  Output file #0 does not contain any stream
2023-04-20 17:28:42.801153652  17:28:42.800 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url="ffmpeg:rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb"
2023-04-20 17:28:42.801562481  17:28:42.801 DBG [exec] run url="exec:ffmpeg -hide_banner -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -tag:v hvc1 -bsf:v hevc_mp4toannexb -vn -an -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c"
2023-04-20 17:28:44.958833725  Input #0, rtsp, from 'rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1':
2023-04-20 17:28:44.958842854    Metadata:
2023-04-20 17:28:44.958848013      title           : Media Presentation
2023-04-20 17:28:44.958905081    Duration: N/A, start: 0.000000, bitrate: N/A
2023-04-20 17:28:44.958938248    Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], 12.50 tbr, 90k tbn
2023-04-20 17:28:44.959002826    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
2023-04-20 17:28:44.959224198  Output #0, rtsp, to 'rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c':
2023-04-20 17:28:44.959230228  Output file #0 does not contain any stream
2023-04-20 17:28:44.962078082  17:28:44.961 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url="ffmpeg:rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb"
2023-04-20 17:28:44.962260031  17:28:44.962 DBG [exec] run url="exec:ffmpeg -hide_banner -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -tag:v hvc1 -bsf:v hevc_mp4toannexb -vn -an -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c"
2023-04-20 17:28:46.969143575  Input #0, rtsp, from 'rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1':
2023-04-20 17:28:46.969152661    Metadata:
2023-04-20 17:28:46.969157375      title           : Media Presentation
2023-04-20 17:28:46.969237098    Duration: N/A, start: 0.000000, bitrate: N/A
2023-04-20 17:28:46.969415264    Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], 12.50 tbr, 90k tbn
2023-04-20 17:28:46.969519857    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
2023-04-20 17:28:46.969811364  Output #0, rtsp, to 'rtsp://localhost:8554/d13f5af3ac83849967d4daa55ec5b81c':
2023-04-20 17:28:46.969819953  Output file #0 does not contain any stream
2023-04-20 17:28:46.973012849  17:28:46.972 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url="ffmpeg:rtsp://admin:some_pass@192.168.60.20:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1#raw=-tag:v hvc1 -bsf:v hevc_mp4toannexb"

Does it have anything with my h.265 codec to do? Or the fact that I'm running it in docker with a bridge netword? The IP is the IP for the host running docker. The container itself has another IP since it has another gateway.

NickM-27 commented 1 year ago

Not sure what the issue is tbh, but you'll likely want to make an issue on go2rtc instead seeing as it works in frigate

smoksnes commented 1 year ago

Not sure what the issue is tbh, but you'll likely want to make an issue on go2rtc instead seeing as it works in frigate

Ok, thanks for you help anyway. And nice work with the 0.12 release!