blakeblackshear / frigate

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

[Support]: Not able to see my cameras in Live #8302

Closed Solarflor closed 1 year ago

Solarflor commented 1 year ago

Hello, I'm not able to see my camera in Live mode in UI image

But it is ok in Debug mode in UI image

Version

0.12.1-367d724

Frigate config file

mqtt:
 host: 192.168.1.13 #core-mosquitto
 port: 1883
 user: xxxx
 password: xxxxx

detectors:
  coral:
    type: edgetpu
    device: usb
# Optional: birdseye configuration
# NOTE: Can (enabled, mode) be overridden at the camera level
birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Restream birdseye via RTSP (default: shown below)
  # NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.
  restream: false
  # Optional: Width of the output resolution (default: shown below)
  width: 1280
  # Optional: Height of the output resolution (default: shown below)
  height: 720
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 5
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: motion
#ffmpeg:
#  hwaccel_args: preset-rpi-64-h264
motion:
record:
  # Optional: Enable recording (default: shown below)
  # WARNING: If recording is disabled in the config, turning it on via
  #          the UI or MQTT later will have no effect.
  enabled: true
  # Optional: Number of minutes to wait between cleanup runs (default: shown below)
  # This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
  expire_interval: 60
  # Optional: Retention settings for recording
  retain:
    # Optional: Number of days to retain recordings regardless of events (default: shown below)
    # NOTE: This should be set to 0 and retention should be defined in events section below
    #       if you only want to retain recordings of events.
    days: 0
    # Optional: Mode for retention. Available options are: all, motion, and active_objects
    #   all - save all recording segments regardless of activity
    #   motion - save all recordings segments with any detected motion
    #   active_objects - save all recording segments with active/moving objects
    # NOTE: this mode only applies when the days setting above is greater than 0
    mode: all
  # Optional: Event recording settings
  events:
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 3
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 3
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
      - dog
      - cat
    # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
    required_zones: []
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 10
      # Optional: Mode for retention. (default: shown below)
      #   all - save all recording segments for events regardless of activity
      #   motion - save all recordings segments for events with any detected motion
      #   active_objects - save all recording segments for event with active/moving objects
      #
      # NOTE: If the retain mode for the camera is more restrictive than the mode configured
      #       here, the segments will already be gone by the time this mode is applied.
      #       For example, if the camera retain mode is "motion", the segments without motion are
      #       never stored, so setting the mode to "all" here won't bring them back.
      mode: motion
      # Optional: Per object retention days
      objects:
        person: 10
        car: 2
        truck: 2
        bicycle: 2
        motorcycle: 2
        dog: 5
        cat: 5
go2rtc:
#  ngrok:
#    command: /config/ngrok tcp 8555 --authtoken 2XD3qmVr9nIYkxt5lW7F6E40IkT_4mXTWbNMAsFqbhbfBgRLC
  streams:
    Piazzale_1:
      - rtsp://admin:passw@192.168.1.209:554/cam/realmonitor?channel=1&subtype=2 # <----- The stream you want to use for detection
cameras:
  Piazzale_1: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:passwd@192.168.1.209:554/cam/realmonitor?channel=1&subtype=0 # <----- The stream you want to use for detection
          roles:
            - record
        - path: rtsp://admin:Antonio1628@192.168.1.209:554/cam/realmonitor?channel=1&subtype=2 # <----- The stream you want to use for detection
          roles:
            - detect
#            - rtmp
    detect:
      width: 1280
      height: 720
    objects:
      track:
        - person
        - cat
        - dog
    record: # <----- Enable recording
      enabled: True
    snapshots: # <----- Enable snapshots
      enabled: True
    zones:
      zone_1:
        coordinates: 239,647,146,392,342,326,327,225,571,162,1240,358,1102,720,267,720

Relevant log output

2023-10-24 16:47:22.713297453  [INFO] Starting Frigate...
2023-10-24 16:47:24.126761065  [2023-10-24 16:47:24] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-10-24 16:47:24.229889505  [2023-10-24 16:47:24] peewee_migrate                 INFO    : Starting migrations
2023-10-24 16:47:24.236193852  [2023-10-24 16:47:24] peewee_migrate                 INFO    : There is nothing to migrate
2023-10-24 16:47:24.258210029  [2023-10-24 16:47:24] frigate.app                    INFO    : Output process started: 290
2023-10-24 16:47:24.276782969  [2023-10-24 16:47:24] frigate.app                    INFO    : Camera processor started for Piazzale_1: 298
2023-10-24 16:47:24.276790950  [2023-10-24 16:47:24] frigate.app                    INFO    : Camera processor started for Ingresso: 299
2023-10-24 16:47:24.286134979  [2023-10-24 16:47:24] frigate.app                    INFO    : Camera processor started for Cancello: 300
2023-10-24 16:47:24.291541234  [2023-10-24 16:47:24] frigate.app                    INFO    : Camera processor started for Interno: 302
2023-10-24 16:47:24.297581795  [2023-10-24 16:47:24] frigate.app                    INFO    : Camera processor started for Interno_2: 303
2023-10-24 16:47:24.303807702  [2023-10-24 16:47:24] frigate.app                    INFO    : Camera processor started for Esterno: 304
2023-10-24 16:47:24.309238067  [2023-10-24 16:47:24] frigate.app                    INFO    : Camera processor started for Esterno_2: 306
2023-10-24 16:47:24.317696625  [2023-10-24 16:47:24] frigate.app                    INFO    : Capture process started for Piazzale_1: 307
2023-10-24 16:47:24.328584922  [2023-10-24 16:47:24] frigate.app                    INFO    : Capture process started for Ingresso: 310
2023-10-24 16:47:24.335987270  [2023-10-24 16:47:24] frigate.app                    INFO    : Capture process started for Cancello: 313
2023-10-24 16:47:24.342977674  [2023-10-24 16:47:24] frigate.app                    INFO    : Capture process started for Interno: 315
2023-10-24 16:47:24.350167207  [2023-10-24 16:47:24] frigate.app                    INFO    : Capture process started for Interno_2: 318
2023-10-24 16:47:24.357028445  [2023-10-24 16:47:24] frigate.app                    INFO    : Capture process started for Esterno: 321
2023-10-24 16:47:24.379438366  [2023-10-24 16:47:24] frigate.app                    INFO    : Capture process started for Esterno_2: 329
2023-10-24 16:47:26.874579808  [2023-10-24 16:47:24] detector.coral                 INFO    : Starting detection process: 289
2023-10-24 16:47:26.879678921  [2023-10-24 16:47:24] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-10-24 16:47:26.879804726  [2023-10-24 16:47:26] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
2023-10-24 16:48:18.512495716  Traceback (most recent call last):
2023-10-24 16:48:18.512828078    File "/usr/lib/python3.9/wsgiref/handlers.py", line 137, in run
2023-10-24 16:48:18.512832583      self.result = application(self.environ, self.start_response)
2023-10-24 16:48:18.512834730    File "/usr/local/lib/python3.9/dist-packages/ws4py/server/wsgiutils.py", line 101, in __call__
2023-10-24 16:48:18.512838346      raise HandshakeError('Header %s is not defined' % key)
2023-10-24 16:48:18.512840180  ws4py.exc.HandshakeError: Header HTTP_UPGRADE is not defined
2023-10-24 16:48:23.849526333  Traceback (most recent call last):
2023-10-24 16:48:23.849533366    File "/usr/lib/python3.9/wsgiref/handlers.py", line 137, in run
2023-10-24 16:48:23.849535355      self.result = application(self.environ, self.start_response)
2023-10-24 16:48:23.849537435    File "/usr/local/lib/python3.9/dist-packages/ws4py/server/wsgiutils.py", line 101, in __call__
2023-10-24 16:48:23.849539146      raise HandshakeError('Header %s is not defined' % key)
2023-10-24 16:48:23.849540958  ws4py.exc.HandshakeError: Header HTTP_UPGRADE is not defined

2023-10-24 16:47:22.701044000  [INFO] Preparing go2rtc config...
2023-10-24 16:47:23.089588574  [WARN] Using go2rtc binary from '/config/go2rtc' instead of the embedded one
2023-10-24 16:47:23.089596185  [INFO] Starting go2rtc...
2023-10-24 16:47:23.205385211  16:47:23.205 INF go2rtc version 1.7.1 linux/amd64
2023-10-24 16:47:23.205653569  16:47:23.205 INF [api] listen addr=0.0.0.0:1984
2023-10-24 16:47:23.205930691  16:47:23.205 INF [rtsp] listen addr=0.0.0.0:8554
2023-10-24 16:47:23.206141483  16:47:23.206 INF [webrtc] listen addr=0.0.0.0:8555/tcp
2023-10-24 16:47:32.703031098  [INFO] Starting go2rtc healthcheck service...

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"15/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1520,"width":2688}]}},{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"5/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":720,"width":1280}]}}]

Frigate stats

{"return_code":0,"stderr":"","stdout":"vainfo:VA-APIversion:1.17(libva2.10.0)nvainfo:Driverversion:InteliHDdriverforIntel(R)GenGraphics-23.1.1()nvainfo:SupportedprofileandentrypointsnVAProfileNone:tVAEntrypointVideoProcnVAProfileNone:tVAEntrypointStatsnVAProfileMPEG2Simple:tVAEntrypointVLDnVAProfileMPEG2Main:tVAEntrypointVLDnVAProfileH264Main:tVAEntrypointVLDnVAProfileH264Main:tVAEntrypointEncSlicenVAProfileH264Main:tVAEntrypointFEInVAProfileH264Main:tVAEntrypointEncSliceLPnVAProfileH264High:tVAEntrypointVLDnVAProfileH264High:tVAEntrypointEncSlicenVAProfileH264High:tVAEntrypointFEInVAProfileH264High:tVAEntrypointEncSliceLPnVAProfileVC1Simple:tVAEntrypointVLDnVAProfileVC1Main:tVAEntrypointVLDnVAProfileVC1Advanced:tVAEntrypointVLDnVAProfileJPEGBaseline:tVAEntrypointVLDnVAProfileJPEGBaseline:tVAEntrypointEncPicturenVAProfileH264ConstrainedBaseline:tVAEntrypointVLDnVAProfileH264ConstrainedBaseline:tVAEntrypointEncSlicenVAProfileH264ConstrainedBaseline:tVAEntrypointFEInVAProfileH264ConstrainedBaseline:tVAEntrypointEncSliceLPnVAProfileVP8Version0_3:tVAEntrypointVLDnVAProfileVP8Version0_3:tVAEntrypointEncSlicenVAProfileHEVCMain:tVAEntrypointVLDnVAProfileHEVCMain:tVAEntrypointEncSlicenVAProfileHEVCMain:tVAEntrypointFEInVAProfileHEVCMain10:tVAEntrypointVLDnVAProfileHEVCMain10:tVAEntrypointEncSlicenVAProfileVP9Profile0:tVAEntrypointVLDnVAProfileVP9Profile2:tVAEntrypointVLD"}

Operating system

Other

Install method

Docker Compose

Coral version

USB

Network connection

Mixed

Camera make and model

Dahua IPC-HFW3441T-ZS

Any other information that may be helpful

I have also tried to use ngrok

go2rtc:
   ngrok:
     command: /config/ngrok tcp 8555 --authtoken xxxxxxxxxxxxxxxxxxxx

downloading the ngrok binary in the same folder where I have config file of frigate but it doesn't work and I have the following error in Go2rtc

2023-10-24 17:02:20.325673669  [INFO] Preparing go2rtc config...
2023-10-24 17:02:20.718095458  [WARN] Using go2rtc binary from '/config/go2rtc' instead of the embedded one
2023-10-24 17:02:20.718103074  [INFO] Starting go2rtc...
2023-10-24 17:02:20.832788025  17:02:20.832 INF go2rtc version 1.7.1 linux/amd64
2023-10-24 17:02:20.833061389  17:02:20.833 INF [api] listen addr=0.0.0.0:1984
2023-10-24 17:02:20.833403709  17:02:20.833 INF [rtsp] listen addr=0.0.0.0:8554
2023-10-24 17:02:20.833615680  17:02:20.833 INF [webrtc] listen addr=0.0.0.0:8555/tcp
2023-10-24 17:02:20.835350859  17:02:20.835 ERR [ngrok] start error="fork/exec /config/ngrok: exec format error"
2023-10-24 17:02:20.837486924  panic: runtime error: invalid memory address or nil pointer dereference
2023-10-24 17:02:20.837492184  [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xa30e3f]
2023-10-24 17:02:20.837499042
NickM-27 commented 1 year ago

it looks like your proxy or other is blocking the websocket from running.

I'd suggest using the dropdown to choose MSE or WebRTC for live view

Solarflor commented 1 year ago

unfortunately the results is the same image

image

NickM-27 commented 1 year ago

What are the browser logs in the MSE case?

Solarflor commented 1 year ago

How/where to see it?

NickM-27 commented 1 year ago

I just realized it is going to be the same problem because the a websocket is used to establish the mse connection.

Solarflor commented 1 year ago

Solved. I have activated websocket on frigate container and now it working perfectly

https://mariushosting.com/synology-some-docker-containers-need-websocket/

NickM-27 commented 1 year ago

thanks for updating with the solution