Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Config Support]: RTMP stream nog working #5002

Closed
MDLefevere opened this issue Jan 10, 2023 · 31 comments
Closed

[Config Support]: RTMP stream nog working #5002

MDLefevere opened this issue Jan 10, 2023 · 31 comments

Comments

@MDLefevere
Copy link

MDLefevere commented Jan 10, 2023

Describe the problem you are having

The RTMP stream has always been working fine.
Recently i updated Frigate to the latest version and added a second camera.

After one of those changes the Home Assistant stream is just a still image. Even after restarting everything.

Version

0.11.1-2eada21

Frigate config file

cameras:
  voortuin:
    ffmpeg:
      inputs:
        - path: rtsp://name:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
        - path: rtsp://name:[email protected]:554/h264Preview_01_main
          roles:
            - record
            - rtmp
    detect:
      width: 3840
      height: 2160
      fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: False
      retain:
        default: 7
        objects:
          person: 7
    rtmp:
      enabled: True
    record:
      enabled: True
      events:
        retain:
          default: 7
  achtertuin:
    ffmpeg:
      inputs:
        - path: rtsp://name:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
        - path: rtsp://name:[email protected]:554/h264Preview_01_main
          roles:
            - record
            - rtmp
    objects:
      track:
        - person
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: False
      retain:
        default: 7
        objects:
          person: 7
    rtmp:
      enabled: True
    record:
      enabled: True
      events:
        retain:
          default: 7

Relevant log output

Config from Debug Page:

  achtertuin:
    ffmpeg:
      inputs:
        - path: rtsp://name:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
        - path: rtsp://name:[email protected]:554/h264Preview_01_main
          roles:
            - record
            - rtmp
    objects:
      track:
        - person
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: False
      retain:
        default: 7
        objects:
          person: 7
    rtmp:
      enabled: True
    record:
      enabled: True
      events:
        retain:
          default: 7

Frigate stats

No response

Operating system

Proxmox

Install method

HassOS Addon

Coral version

USB

Any other information that may be helpful

No response

@NickM-27
Copy link
Collaborator

Your config looks incorrect

cameras:
  voortuin:
    ffmpeg:
      inputs:
        - path: rtsp://name:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
        - path: rtsp://name:[email protected]:554/h264Preview_01_main
          roles:
            - record
            - rtmp
    detect:
      width: 3840
      height: 2160
      fps: 5

you are using the sub stream and yet you are telling frigate to scale that stream up to 4k, that is entirely incorrect.

also for the RTMP issue we need logs otherwise there is no way to help

@MDLefevere
Copy link
Author

My bad. I corrected this.
The strange thing is. In Home Assistant, the 'achtertuin' camera is showing me live feed, while the 'voortuin' camera is a still image that refreshes when i reload the page.
The camera's are both configured the same. I just compared them.

cameras:
  voortuin:
    ffmpeg:
      inputs:
        - path: rtsp://name:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
        - path: rtsp://name:[email protected]:554/h264Preview_01_main
          roles:
            - record
            - rtmp
    objects:
      track:
        - person
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: False
      retain:
        default: 7
        objects:
          person: 7
    rtmp:
      enabled: True
    record:
      enabled: True
      events:
        retain:
          default: 7
  achtertuin:
    ffmpeg:
      inputs:
        - path: rtsp://name:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
        - path: rtsp://name:[email protected]:554/h264Preview_01_main
          roles:
            - record
            - rtmp
    objects:
      track:
        - person
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: False
      retain:
        default: 7
        objects:
          person: 7
    rtmp:
      enabled: True
    record:
      enabled: True
      events:
        retain:
          default: 7

@NickM-27
Copy link
Collaborator

Please provide frigate logs

@MDLefevere
Copy link
Author

Quite new here so need some help.

logger
  default: error

were can i find these logs?, or do you mean something else?

@NickM-27
Copy link
Collaborator

Your config post says you're running the addon so just go to the add on and there will be a button to view logs.

@MDLefevere
Copy link
Author

Thanks. Found it i ques.

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.1.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Amsterdam",
    "os_name": "Linux",
    "os_version": "5.15.80",
    "supervisor": "2022.12.1",
    "host_os": "Home Assistant OS 9.4",
    "docker_version": "20.10.19",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "browser_mod": {
      "version": "2.2.0",
      "requirements": []
    },
    "nodered": {
      "version": "1.1.2",
      "requirements": []
    },
    "frigate": {
      "version": "3.0.0",
      "requirements": []
    },
    "watchman": {
      "version": "0.5.1",
      "requirements": [
        "prettytable==3.0.0"
      ]
    },
    "nest_protect": {
      "version": "0.3.8",
      "requirements": []
    },
    "hacs": {
      "version": "1.29.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "frigate",
    "documentation": "https://github.com/blakeblackshear/frigate",
    "name": "Frigate",
    "version": "3.0.0",
    "issue_tracker": "https://github.com/blakeblackshear/frigate-hass-integration/issues",
    "dependencies": [
      "http",
      "media_source",
      "mqtt"
    ],
    "config_flow": true,
    "codeowners": [
      "@blakeblackshear"
    ],
    "requirements": [],
    "iot_class": "local_push",
    "is_built_in": false
  },
  "data": {
    "frigate_config": {
      "birdseye": {
        "enabled": true,
        "height": 720,
        "mode": "objects",
        "quality": 8,
        "width": 1280
      },
      "cameras": {
        "achtertuin": {
          "best_image_timeout": 60,
          "birdseye": {
            "enabled": true,
            "mode": "objects"
          },
          "detect": {
            "enabled": true,
            "fps": 5,
            "height": 720,
            "max_disappeared": 25,
            "stationary": {
              "interval": 0,
              "max_frames": {
                "default": null,
                "objects": {}
              },
              "threshold": 50
            },
            "width": 1280
          },
          "ffmpeg": {
            "global_args": [
              "-hide_banner",
              "-loglevel",
              "warning"
            ],
            "hwaccel_args": [],
            "input_args": [
              "-avoid_negative_ts",
              "make_zero",
              "-fflags",
              "+genpts+discardcorrupt",
              "-rtsp_transport",
              "tcp",
              "-timeout",
              "5000000",
              "-use_wallclock_as_timestamps",
              "1"
            ],
            "inputs": [
              {
                "global_args": [],
                "hwaccel_args": [],
                "input_args": [],
                "path": "**REDACTED**",
                "roles": [
                  "detect"
                ]
              },
              {
                "global_args": [],
                "hwaccel_args": [],
                "input_args": [],
                "path": "**REDACTED**",
                "roles": [
                  "record"
                ]
              }
            ],
            "output_args": {
              "detect": [
                "-f",
                "rawvideo",
                "-pix_fmt",
                "yuv420p"
              ],
              "record": [
                "-f",
                "segment",
                "-segment_time",
                "10",
                "-segment_format",
                "mp4",
                "-reset_timestamps",
                "1",
                "-strftime",
                "1",
                "-c",
                "copy",
                "-an"
              ],
              "rtmp": [
                "-c",
                "copy",
                "-f",
                "flv"
              ]
            }
          },
          "ffmpeg_cmds": [
            {
              "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://rtsp:[email protected]:554/h264Preview_01_sub -r 5 -s 1280x720 -f rawvideo -pix_fmt yuv420p pipe:",
              "roles": [
                "detect"
              ]
            },
            {
              "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://rtsp:[email protected]:554/h264Preview_01_main -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/achtertuin-%Y%m%d%H%M%S.mp4",
              "roles": [
                "record"
              ]
            }
          ],
          "live": {
            "height": 720,
            "quality": 8
          },
          "motion": {
            "contour_area": 30,
            "delta_alpha": 0.2,
            "frame_alpha": 0.2,
            "frame_height": 50,
            "improve_contrast": false,
            "mask": "",
            "mqtt_off_delay": 30,
            "threshold": 25
          },
          "mqtt": {
            "bounding_box": true,
            "crop": true,
            "enabled": true,
            "height": 270,
            "quality": 70,
            "required_zones": [],
            "timestamp": true
          },
          "name": "achtertuin",
          "objects": {
            "filters": {
              "person": {
                "mask": null,
                "max_area": 24000000,
                "max_ratio": 24000000,
                "min_area": 0,
                "min_ratio": 0,
                "min_score": 0.5,
                "threshold": 0.7
              }
            },
            "mask": "",
            "track": [
              "person"
            ]
          },
          "record": {
            "enabled": true,
            "events": {
              "objects": null,
              "post_capture": 5,
              "pre_capture": 5,
              "required_zones": [],
              "retain": {
                "default": 7.0,
                "mode": "motion",
                "objects": {}
              }
            },
            "expire_interval": 60,
            "retain": {
              "days": 0,
              "mode": "all"
            },
            "retain_days": null
          },
          "rtmp": {
            "enabled": false
          },
          "snapshots": {
            "bounding_box": false,
            "clean_copy": true,
            "crop": false,
            "enabled": true,
            "height": null,
            "quality": 70,
            "required_zones": [],
            "retain": {
              "default": 7.0,
              "mode": "motion",
              "objects": {
                "person": 7.0
              }
            },
            "timestamp": false
          },
          "timestamp_style": {
            "color": {
              "blue": 255,
              "green": 255,
              "red": 255
            },
            "effect": null,
            "format": "%m/%d/%Y %H:%M:%S",
            "position": "tl",
            "thickness": 2
          },
          "ui": {
            "dashboard": true,
            "order": 0
          },
          "zones": {}
        },
        "voortuin": {
          "best_image_timeout": 60,
          "birdseye": {
            "enabled": true,
            "mode": "objects"
          },
          "detect": {
            "enabled": true,
            "fps": 5,
            "height": 2160,
            "max_disappeared": 25,
            "stationary": {
              "interval": 0,
              "max_frames": {
                "default": null,
                "objects": {}
              },
              "threshold": 50
            },
            "width": 3840
          },
          "ffmpeg": {
            "global_args": [
              "-hide_banner",
              "-loglevel",
              "warning"
            ],
            "hwaccel_args": [],
            "input_args": [
              "-avoid_negative_ts",
              "make_zero",
              "-fflags",
              "+genpts+discardcorrupt",
              "-rtsp_transport",
              "tcp",
              "-timeout",
              "5000000",
              "-use_wallclock_as_timestamps",
              "1"
            ],
            "inputs": [
              {
                "global_args": [],
                "hwaccel_args": [],
                "input_args": [],
                "path": "**REDACTED**",
                "roles": [
                  "detect"
                ]
              },
              {
                "global_args": [],
                "hwaccel_args": [],
                "input_args": [],
                "path": "**REDACTED**",
                "roles": [
                  "record",
                  "rtmp"
                ]
              }
            ],
            "output_args": {
              "detect": [
                "-f",
                "rawvideo",
                "-pix_fmt",
                "yuv420p"
              ],
              "record": [
                "-f",
                "segment",
                "-segment_time",
                "10",
                "-segment_format",
                "mp4",
                "-reset_timestamps",
                "1",
                "-strftime",
                "1",
                "-c",
                "copy",
                "-an"
              ],
              "rtmp": [
                "-c",
                "copy",
                "-f",
                "flv"
              ]
            }
          },
          "ffmpeg_cmds": [
            {
              "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://rtsp:[email protected]:554/h264Preview_01_sub -r 5 -s 3840x2160 -f rawvideo -pix_fmt yuv420p pipe:",
              "roles": [
                "detect"
              ]
            },
            {
              "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://rtsp:[email protected]:554/h264Preview_01_main -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/voortuin-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/voortuin",
              "roles": [
                "record",
                "rtmp"
              ]
            }
          ],
          "live": {
            "height": 720,
            "quality": 8
          },
          "motion": {
            "contour_area": 30,
            "delta_alpha": 0.2,
            "frame_alpha": 0.2,
            "frame_height": 50,
            "improve_contrast": false,
            "mask": [
              "238,492,919,220,1211,0,91,0,0,0,0,621",
              "2033,875,2149,867,2179,616,1943,662",
              "0,2160,438,2160,175,1711,0,1708",
              "2499,2108,2501,2009,1314,2007,1314,2113",
              "0,2160,463,2160,463,2018,0,1898"
            ],
            "mqtt_off_delay": 30,
            "threshold": 25
          },
          "mqtt": {
            "bounding_box": true,
            "crop": true,
            "enabled": true,
            "height": 270,
            "quality": 70,
            "required_zones": [],
            "timestamp": true
          },
          "name": "voortuin",
          "objects": {
            "filters": {
              "person": {
                "mask": null,
                "max_area": 24000000,
                "max_ratio": 24000000,
                "min_area": 0,
                "min_ratio": 0,
                "min_score": 0.5,
                "threshold": 0.7
              }
            },
            "mask": "",
            "track": [
              "person"
            ]
          },
          "record": {
            "enabled": true,
            "events": {
              "objects": null,
              "post_capture": 5,
              "pre_capture": 5,
              "required_zones": [],
              "retain": {
                "default": 7.0,
                "mode": "motion",
                "objects": {}
              }
            },
            "expire_interval": 60,
            "retain": {
              "days": 0,
              "mode": "all"
            },
            "retain_days": null
          },
          "rtmp": {
            "enabled": true
          },
          "snapshots": {
            "bounding_box": false,
            "clean_copy": true,
            "crop": false,
            "enabled": true,
            "height": null,
            "quality": 70,
            "required_zones": [],
            "retain": {
              "default": 7.0,
              "mode": "motion",
              "objects": {
                "person": 7.0
              }
            },
            "timestamp": false
          },
          "timestamp_style": {
            "color": {
              "blue": 255,
              "green": 255,
              "red": 255
            },
            "effect": null,
            "format": "%m/%d/%Y %H:%M:%S",
            "position": "tl",
            "thickness": 2
          },
          "ui": {
            "dashboard": true,
            "order": 0
          },
          "zones": {}
        }
      },
      "database": {
        "path": "**REDACTED**"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 720,
        "max_disappeared": null,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": null
        },
        "width": 1280
      },
      "detectors": {
        "coral": {
          "device": "usb",
          "num_threads": 3,
          "type": "edgetpu"
        }
      },
      "environment_vars": {},
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "live": {
        "height": 720,
        "quality": 8
      },
      "logger": {
        "default": "info",
        "logs": {}
      },
      "model": {
        "height": 320,
        "labelmap": {},
        "labelmap_path": null,
        "path": null,
        "width": 320
      },
      "motion": null,
      "mqtt": {
        "client_id": "frigate",
        "host": "192.168.1.4",
        "password": "**REDACTED**",
        "port": 1883,
        "stats_interval": 60,
        "tls_ca_certs": null,
        "tls_client_cert": null,
        "tls_client_key": null,
        "tls_insecure": null,
        "topic_prefix": "frigate",
        "user": "mqtt"
      },
      "objects": {
        "filters": null,
        "mask": "",
        "track": [
          "person"
        ]
      },
      "plus": {
        "enabled": false
      },
      "record": {
        "enabled": false,
        "events": {
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "mode": "motion",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 0,
          "mode": "all"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": false,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {}
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "use_experimental": false
      }
    },
    "frigate_stats": {
      "achtertuin": {
        "camera_fps": 5.0,
        "capture_pid": 220,
        "detection_fps": 0.0,
        "pid": 217,
        "process_fps": 5.0,
        "skipped_fps": 0.0
      },
      "detection_fps": 4.5,
      "detectors": {
        "coral": {
          "detection_start": 0.0,
          "inference_speed": 8.09,
          "pid": 213
        }
      },
      "service": {
        "latest_version": "0.11.1",
        "storage": {
          "/dev/shm": {
            "free": 1069.9,
            "mount_type": "tmpfs",
            "total": 1073.7,
            "used": 3.8
          },
          "/media/frigate/clips": {
            "free": 8770.9,
            "mount_type": "ext4",
            "total": 15786.3,
            "used": 6193.3
          },
          "/media/frigate/recordings": {
            "free": 8770.9,
            "mount_type": "ext4",
            "total": 15786.3,
            "used": 6193.3
          },
          "/tmp/cache": {
            "free": 1000.0,
            "mount_type": "tmpfs",
            "total": 1000.0,
            "used": 0.0
          }
        },
        "temperatures": {},
        "uptime": 396,
        "version": "0.11.1-2eada21"
      },
      "voortuin": {
        "camera_fps": 5.0,
        "capture_pid": 218,
        "detection_fps": 4.5,
        "pid": 216,
        "process_fps": 5.0,
        "skipped_fps": 0.0
      }
    }
  }
}

@NickM-27
Copy link
Collaborator

No those are diagnostics from the integrations setting we are looking for logs from the addons.

@MDLefevere
Copy link
Author

Might be irrelevant, but the 'voortuin' shows something like a mediaplayer while the 'achtertuin' doesn't.

image

image

@NickM-27
Copy link
Collaborator

That's expected given that one is streaming and one isn't.

@MDLefevere
Copy link
Author

2023-01-10 17:27:17.759 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.voortuin] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtmp://192.168.1.15/live/voortuin
2023-01-10 17:27:57.819 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.voortuin] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtmp://192.168.1.15/live/voortuin
2023-01-10 17:28:47.880 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.voortuin] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtmp://192.168.1.15/live/voortuin
2023-01-10 17:29:37.499 ERROR (MainThread) [homeassistant.components.shelly] Error fetching WCD Achtertuin data: Error fetching data: DeviceConnectionError()
2023-01-10 17:29:41.905 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.voortuin] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtmp://192.168.1.15/live/voortuin
2023-01-10 17:29:42.494 ERROR (MainThread) [custom_components.frigate.api] Error fetching information from http://192.168.1.15:5000/api/stats: Cannot connect to host 192.168.1.15:5000 ssl:default [Connect call failed ('192.168.1.15', 5000)]
2023-01-10 17:29:42.495 ERROR (MainThread) [custom_components.frigate] Error fetching frigate data: 
2023-01-10 17:29:48.551 ERROR (MainThread) [custom_components.frigate.api] Error fetching information from http://192.168.1.15:5000/api/stats: Cannot connect to host 192.168.1.15:5000 ssl:default [Connect call failed ('192.168.1.15', 5000)]
2023-01-10 17:29:50.156 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.15', 5000)

@NickM-27
Copy link
Collaborator

Have you enabled port 5000 and port 1935 in the addon configuration?

@MDLefevere
Copy link
Author

It has been working flawlesly for months. Just added a second camera and it stopped.
I reinstalled the Frigate integration and now they both stopped streaming live :)

Even in the frigate dashboard they both don't show live feed. I don't know if that's normal?.

@NickM-27
Copy link
Collaborator

Even in the frigate dashboard they both don't show live feed. I don't know if that's normal?.

what do you mean by that?

@MDLefevere
Copy link
Author

I run frigate in an LXC container on ProxMox.
When i have both feeds they are just still images.

image

@NickM-27
Copy link
Collaborator

When i have both feeds they are just still images.

that is how frigate works, you have to click on the camera to view the live feed.

I run frigate in an LXC container on ProxMox.

so to be clear you selected HA addon as your install method but that is incorrect which is what caused the confusion

@NickM-27
Copy link
Collaborator

It has been working flawlesly for months. Just added a second camera and it stopped.
I reinstalled the Frigate integration and now they both stopped streaming live :)

the frigate integration is required for watching the live stream. The frigate integration now shows logs saying it is unable to connect to your frigate instance so you will need to figure out why. Maybe the IP is wrong

@MDLefevere
Copy link
Author

I'm using the Home Assistant Integration. I just removed it and installed it againg after a Home Assistant restart.
Problem still persists after configuring it again.

image

image

@NickM-27
Copy link
Collaborator

I'm using the Home Assistant Integration. I just removed it and installed it againg after a Home Assistant restart.

addon and integration are two completely different things.

Problem still persists after configuring it again.

yes, and based on the logs this is because it can't find frigate where you are telling it to look, so something is incorrect

Cannot connect to host 192.168.1.15:5000 ssl:default [Connect call failed ('192.168.1.15', 5000)]

@MDLefevere
Copy link
Author

Alright. So i'm simply going to restore my LXC with frigate on it to a backup when it was working.
Let's see if that solves something.

@NickM-27
Copy link
Collaborator

I think all of this would be more helpful if you had the actual frigate logs from the LXC

@MDLefevere
Copy link
Author

Alright. So my restore fixed it.
Now i'm even more confused :/

@MDLefevere
Copy link
Author

MDLefevere commented Jan 10, 2023

This is my original config. Did i mess something up when adding the second one?

cameras:
  voortuin:
    ffmpeg:
      inputs:
        - path: rtsp://name:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
            - rtmp
        - path: rtsp://name:[email protected]:554/h264Preview_01_main
          roles:
            - record
    detect:
      width: 3840
      height: 2160
      fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: false
      retain:
        default: 7
    record:
      enabled: True
      events:
        retain:
          default: 7

@NickM-27
Copy link
Collaborator

Nothing is immediately obvious but logs would make it clear.

@MDLefevere
Copy link
Author

Which one?. Or am i looking at the wrong place?

image

@NickM-27
Copy link
Collaborator

I don't know I don't use proxmox and am not familiar with it but I imagine logs should be quite accessible.

I found https://linuxcontainers.org/lxc/manpages/man1/lxc-monitor.1.html

@MDLefevere
Copy link
Author

Wow. I've forgot about portainer. It's getting nuts:

[2023-01-10 21:38:57] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x55b080bca700] Video codec hevc not compatible with flv
[2023-01-10 21:38:57] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:38:57] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:38:57] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:39:07] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x55863ad93dc0] Video codec hevc not compatible with flv
[2023-01-10 21:39:07] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:07] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:07] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:39:07] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x563f71589700] Video codec hevc not compatible with flv
[2023-01-10 21:39:07] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:07] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:07] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:39:17] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x558b934b8700] Video codec hevc not compatible with flv
[2023-01-10 21:39:17] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:17] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:17] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:39:17] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x56206f8bc700] Video codec hevc not compatible with flv
[2023-01-10 21:39:17] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:17] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:17] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:39:27] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x55fa61778dc0] Video codec hevc not compatible with flv
[2023-01-10 21:39:27] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:27] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:27] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:39:27] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x562e8e155040] Video codec hevc not compatible with flv
[2023-01-10 21:39:27] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:27] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:27] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:39:37] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x56093a001700] Video codec hevc not compatible with flv
[2023-01-10 21:39:37] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:37] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:37] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:39:37] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x55b259574700] Video codec hevc not compatible with flv
[2023-01-10 21:39:37] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:37] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:37] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:39:47] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x55b258969dc0] Video codec hevc not compatible with flv
[2023-01-10 21:39:47] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:47] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:47] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:39:47] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x55e966bb6700] Video codec hevc not compatible with flv
[2023-01-10 21:39:47] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:47] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:47] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:39:57] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x556d2b2cb700] Video codec hevc not compatible with flv
[2023-01-10 21:39:57] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:57] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:57] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:39:57] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x55c3e8f9f040] Video codec hevc not compatible with flv
[2023-01-10 21:39:57] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:39:57] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:39:57] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:40:07] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x55d7a5ba8480] Video codec hevc not compatible with flv
[2023-01-10 21:40:07] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:07] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:07] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:40:07] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x55c57714f040] Video codec hevc not compatible with flv
[2023-01-10 21:40:07] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:07] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:07] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:40:17] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x564392679700] Video codec hevc not compatible with flv
[2023-01-10 21:40:17] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:17] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:17] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:40:17] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x560bdd090700] Video codec hevc not compatible with flv
[2023-01-10 21:40:17] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:17] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:17] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:40:27] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x55e42e3c4700] Video codec hevc not compatible with flv
[2023-01-10 21:40:27] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:27] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:27] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:40:27] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x55f1c661d040] Video codec hevc not compatible with flv
[2023-01-10 21:40:27] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:27] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:27] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:40:37] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x55bed49a3700] Video codec hevc not compatible with flv
[2023-01-10 21:40:37] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:37] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:37] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:40:37] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x55cc52505240] Video codec hevc not compatible with flv
[2023-01-10 21:40:37] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:37] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:37] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:40:47] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x563c70265700] Video codec hevc not compatible with flv
[2023-01-10 21:40:47] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:47] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:47] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:40:47] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x562903089dc0] Video codec hevc not compatible with flv
[2023-01-10 21:40:47] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:47] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:47] ffmpeg.achtertuin.record_rtmp ERROR :
[2023-01-10 21:40:57] ffmpeg.voortuin.record_rtmp ERROR : [flv @ 0x556ac4303700] Video codec hevc not compatible with flv
[2023-01-10 21:40:57] ffmpeg.voortuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:57] ffmpeg.voortuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:57] ffmpeg.voortuin.record_rtmp ERROR :
[2023-01-10 21:40:57] ffmpeg.achtertuin.record_rtmp ERROR : [flv @ 0x562dc0ae1700] Video codec hevc not compatible with flv
[2023-01-10 21:40:57] ffmpeg.achtertuin.record_rtmp ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
[2023-01-10 21:40:57] ffmpeg.achtertuin.record_rtmp ERROR : Error initializing output stream 1:1 --
[2023-01-10 21:40:57] ffmpeg.achtertuin.record_rtmp ERROR :

@NickM-27
Copy link
Collaborator

Your camera is h.265 which is not compatible with the rtmp restream

You should disable it. In the next version of frigate (0.12, currently in beta) we are moving to a new restream that uses rtsp for this and many other reasons.

@MDLefevere
Copy link
Author

How can i disable this?.
Strange that it was working with 1 camera in frigate, but stops when added a second?

@NickM-27
Copy link
Collaborator

How can i disable this?.

Strange that it was working with 1 camera in frigate, but stops when added a second?

That's probably a separate issue given that the integration said it couldn't connect to frigate at all.

You disable with

rtmp:
  enabled: false

@MDLefevere
Copy link
Author

Turned it off and portainer is running normal now.
But it's strange.. The rtmp URL says: h264Preview_01_main

@NickM-27
Copy link
Collaborator

Yes reolink may still send h265, once you update to 0.12 can use the new restream with that without issue. Seems this can be closed now, feel free to create a new issue if something else comes up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants