Frigate MySQL - Too many connections

Bonjour,

Depuis quelques mois, j’ai mon interface web qui m’affiche ceci :
SQLSTATE[HY000] [1040] Too many connections

En vérifiant la liste des process dans mysql, je m’apperçois qu’il y a 150 connexions, dont la plupart sont des requetes de ce genre :

[...]
| 689 | jeedom | localhost | jeedom | Query   |    0 | Waiting for table level lock | DELETE FROM `event` WHERE `datetime`='1749195212.792100' AND `name`='eqLogic::update' AND `option`=' |    0.000 |
| 690 | jeedom | localhost | jeedom | Query   |    0 | Waiting for table level lock | DELETE FROM `event` WHERE `datetime`='1749195221.956500' AND `name`='cmd::update' AND `option`='{\"c |    0.000 |
| 691 | jeedom | localhost | jeedom | Query   |    0 | Waiting for table level lock | DELETE FROM `event` WHERE `datetime`='1749195212.792100' AND `name`='eqLogic::update' AND `option`=' |    0.000 |
| 692 | jeedom | localhost | jeedom | Sleep   |    2 |                              | NULL                                                                                                 |    0.000 |
| 693 | jeedom | localhost | jeedom | Sleep   |    9 |                              | NULL                                                                                                 |    0.000 |
| 694 | jeedom | localhost | jeedom | Query   |    0 | Waiting for table level lock | DELETE FROM `event` WHERE `datetime`='1749195212.792100' AND `name`='eqLogic::update' AND `option`=' |    0.000 |
| 695 | jeedom | localhost | jeedom | Sleep   |    0 | starting                     | NULL                                                                                                 |    0.000 |
| 696 | jeedom | localhost | jeedom | Query   |    0 | Waiting for table level lock | DELETE FROM `event` WHERE `datetime`='1749195221.953100' AND `name`='cmd::update' AND `option`='{\"c |    0.000 |
[...]

Ces requêtes semblent provenir du pluggin Frigate.

Une idée d’un changement sur une requete de purge des events, générant des connexions deadlock ou autre ?

Merci à vous.


Informations Jeedom

Core : 4.5 (beta)
DNS Jeedom : oui

Plugin : Frigate
Version : 2025-06-05 01:21:35 (beta)
Statut Démon : Démarré - (Inconnue)

Informations complémentaires

URL : 10.0.0.23:5000
MQTT topic : frigate
Debian : 11.11
Frigate : 0.14.1
Plugin : 1.3.1

Page santé aussi
Le fait d’avoir ce genre de blocages peut aussi n’etre qu’une conséquence.
Machine trop chargée, les requêtes s’empilent.
Table mysql trop grosse, la machine se charge,

(qu’est ce qui te fait dire que ce font des requêtes du plugin-frigate ?)

Norbert

Si cela vient de mon plugin, je ne pourrai pas regarder avant mi-juillet, je vais me mettre en pause quelques temps.

A moins que je trouve le problème (si problème) d’ici la naissance de mon fils…

Salut Sagitaz,

Je comprends parfaitement ! Il y a des priorités :wink:

@ngrataloup, je me suis posé la même question que toi.
Il est difficile de déterminer l’origine de ce genre de problème.

Ce matin, j’ai arreté / relancé mysql, arreté redémarré jeedom, ça repart pour quelques minutes / heure, mais l’erreur revient systématiquement.

J’ai stoppé le plugin frigate pour voir comment se comporte mon jeedom, je n’ai pas rencontré à nouveau ce problème jusqu’à présent.
Je vérifie depuis le nombre de process dans mysql, à fréquence régulière, je vois quelques augmentations à 140 connexions, puis ça revient vers 15/20 connexions, là ou avant, on voyait plein de connexion en Query avec un DELETE from event.

LA PAGE SANTE EST NECESSAIRE !!!

Ok, mais ce n’est que le symptôme, pas la cause, je pense
Ca montre juste que ton système est sans doute saturé par d’autres choses, et q’à cause de cette saturation, il n’arrive pas à traiter toutes les commandes en temps réel et qu’il empile les connexions jusqu’à atteindre les 150

voilà, voilà, ne t’énerve pas :wink:

Alors, il est vrai que mon système est très, très souvent à 100%, le frigate en docker en plus de jeedom y est pour quelque chose malgré la clé google TPU.

Mon système est tout de même en place depuis un an, et celà fait un bon mois que ce genre d’anomalie revient de plus en plus fréquemment.
J’ai un jeedom secondaire avec un autre frigate pour d’autres caméras, je vais en basculer une quelques jours dessus pour voir si ça améliore le comportement de sql.

Merci ngrataloup pour la piste

Donc ton pb est surtout lié à la charge effectivement, le constat mysql est juste un symptôme

Un epu de lecture sur la charge :

Quelques pistes :
1 - faire le ménage dans les archives Jeedom, tu as 400Mo ave cun Jeedom qui a 1 an, c’ets beaucoup, tu as donc beaucoup (trop) d’écritures en base. N’archiver que ce qui est necessaire
2 - regarder sur le serveur ce qui utilise de la ressource, mais effectivement, un frigate sur Jeedom, c’ets pas top. Pour info/rappel, en fonction de ton paramétrage :

Ce qui passe par la clé google TPU : La détection d’objet
Ce qui ne passe pas par la clé Google TPU → CPU ou GPU

  • La redimensionnement des flux. tu arrives en FHD ou UHD sur frigate et tu as paramétré tes flux de détection du mouvement (avant détection d’objet) en HD ou SD, c’ets le CPU (ou GPU si tu as) qui fait la conversion de format, c’est absolument à éviter. synchroniser le format des flux entre les camera et frigate (flux main et flux sub)
  • La détection de mouvement, si tu l’a fait sur des format FHD ou UHD, tu peux rapidement écroulé ta machine → CPU
  • L’enregistrement des snapshots ou clips video. Si tu as mal paramétré ton système, beaucoup d’enregistrements et donc d’écritures disque → saturation de IO, la charge s’écroule, et en plus avec 5% d’espace disque !

D’autant qu’en plus en mettant frigate sur Jeedom, frigate va générer et écrire des clips, qui vont être transférés sur Jeedom pour être de nouveau écrits

A verifier :
1 - L’utilisation CPU via un htop en mode console
2 - les statistiques frigate vi aparametre >> indicateurs systèmes
Tu peux mettre des screenshots de chacun des élements

Norbert

merci ngrataloup, je vais éplucher ma config frigate, je ne savais pas qu’il y avait une incidence sur l’ordre de détection. Pour ce qui est du flux SUB, j’ai désactivé sur toutes mes caméras l’an passé, celà m’a permis déjà d’économiser du CPU. je ne travaille donc plus que sur un flux par camera…

Pour l’instant, j’ai désactivé le docker frigate et basculé toutes mes caméras sur mon autre frigate. Le plugin a été réactivé, pour voir si le système se comporte à nouveau normalement.

Pour les 5% de disque restant, rien d’alarmant, j’ai des purges programmées sur mon système … mais bon, je vais tout de même passer un coup de balai :wink: .

Voici ce que j’ai en conso coté frigate sur mon secondaire (j’ai tout basculé dessus, sauf deux cameras que j’ai désactivées car CPU à 96%) :



Ma config Frigate secondaire :
#ui:

use_experimental: true

version: 0.14

mqtt:
enabled: true
host: 10.0.0.18
port: 1883
topic_prefix: frigate
user: jeedom
password: xxxxxxxxxx

detectors: # <---- add detectors
coral:
type: edgetpu
device: pci

logger:
default: info
logs:
frigate.mqtt: info

audio: # ← enable audio events for all camera
enabled: false
listen:
- bark
- fire_alarm
- scream

- speech

- yell
- crying
- laughter
- dog
- car_alarm

- explosion

- gunshot
- fusillade
- glass
- bark
- honk

- thunderstorm

- thunder

- wind

- alarm
- siren
- civil_defense_siren
- smoke_detector
- fire_alarm

- television

record:
enabled: true
retain:
days: 0
mode: active_objects
events:
pre_capture: 5
post_capture: 5
retain:
default: 1
mode: active_objects

snapshots:
enabled: true
clean_copy: true
timestamp: true
bounding_box: true
crop: false
retain:
default: 2

detect:
fps: 5
width: 1280
height: 720

Optional: Number of consecutive detection hits required for an object to be initialized in the tracker. (default: 1/2 the frame rate)

min_initialized: 2

Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)

max_disappeared: 25

Optional: Configuration for stationary object tracking

stationary:
# Optional: Frequency for confirming stationary objects (default: same as threshold)
# When set to 1, object detection will run to confirm the object still exists on every frame.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval: 50
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 250
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default: 3000
# Optional: Object specific values
objects:
person: 1000

model:
#path: /docker/frigate/config/model.yml
width: 320
height: 320
input_tensor: nhwc
input_pixel_format: bgr
labelmap:
0: person
1: bicycle
2: car
3: motorcycle
7: car
16: animal
17: dog
#22: shoe
#23: handbag
#24: suitcase
#29: laptop
#25: bootle
#26: chair
#27: door
#71: tv
#0: person #1: bicycle #2: car #3: motorcycle #4: airplane #5: bus
#6: train #7: car #8: boat #9: traffic light #10: fire hydrant
#11: street sign #12: stop sign #13: parking meter #14: bench #15: bird
#16: cat #17: dog #18: horse #19: sheep
#20: cow #21: elephant #22: bear #23: zebra #24: giraffe
#25: hat #26: backpack #27: umbrella #28: shoe #29: eye glasses
#30: handbag #31: tie #32: suitcase #33: frisbee #34: skis
#35: snowboard #36: sports ball #37: kite #38: baseball bat #39: baseball glove
#40: skateboard #41: surfboard #42: tennis racket #43: bottle #44: plate
#45: wine glass #46: cup #47: fork #48: knife #49: spoon
#50: bowl #51: banana #52: apple #53: sandwich #54: orange
#55: broccoli #56: carrot #57: hot dog #58: pizza #59: donut
#60: cake #61: chair #62: couch #63: potted plant #64: bed
#65: mirror #66: dining table #67: window #68: desk #69: toilet
#70: door #71: tv #72: laptop #73: mouse #74: remote
#75: keyboard #76: cell phone #77: microwave #78: oven #79: toaster
#80: sink #81: refrigerator #82: blender #83: book #84: clock
#85: vase #86: scissors #87: teddy bear #88: hair drier #89: toothbrush
#90: hair brush

go2rtc:
streams:
portail:
- ffmpeg:https://10.3.17.71/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

portail_sub:

- ffmpeg:https://10.3.17.71/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

- ffmpeg:http://10.3.17.71/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

portail2:
  - ffmpeg:https://10.3.17.70/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

portail2_sub:

- ffmpeg:https://10.3.17.70/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

portail3:
  - ffmpeg:https://10.3.17.78/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

portail3_sub:

- ffmpeg:https://10.3.17.78/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

balance:
  - ffmpeg:https://10.3.17.73/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

balance_sub:

- ffmpeg:https://10.3.17.73/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

piscine:
  - ffmpeg:https://10.3.17.72/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

piscine_sub:

- ffmpeg:https://10.3.17.72/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

zoomst:

- ffmpeg:https://10.3.17.3/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

zoomst_sub:

- ffmpeg:https://10.3.17.3/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

zoomsalon:

- ffmpeg:https://10.3.17.2/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

zoomsalon_sub:

- ffmpeg:https://10.3.17.2/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

cuisine:
  - ffmpeg:https://10.3.17.75/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

cuisine_sub:

- ffmpeg:https://10.3.17.75/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

salon:
  - ffmpeg:https://10.3.17.74/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=jeedom_rdc&password=XXXXXXXXX;#video=copy#audio=copy#audio=opus

salon_sub:

- ffmpeg:https://10.3.17.74/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=jeedom_rdc&password=XXXXXXXXX;

Optional: Object configuration

NOTE: Can be overridden at the camera level

objects:

Optional: list of objects to track from labelmap.txt (default: shown below)

track:
- person
- dog
- car
- bicycle
- motorcycle
- vehicule

Optional: mask to prevent all object types from being detected in certain areas (default: no mask)

Checks based on the bottom center of the bounding box of the object.

NOTE: This mask is COMBINED with the object type specific mask below

#mask: 0,0,1000,0,1000,200,0,200

Optional: filters to reduce false positives for specific object types

filters:
person:
# Optional: minimum widthheight of the bounding box for the detected object (default: 0)
min_area: 5000
# Optional: maximum width
height of the bounding box for the detected object (default: 24000000)
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)
threshold: 0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object

Include all cameras by default in Birdseye view

birdseye:
enabled: true

width: 2550

height: 1280

mode: continuous

layout:

scaling_factor: 3.0

motion:

Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)

Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.

The value should be between 1 and 255.

threshold: 20
# Optional: Minimum size in pixels in the resized motion image that counts as motion (default: shown below)

Increasing this value will prevent smaller areas of motion from being detected. Decreasing will

make motion detection more sensitive to smaller moving objects.

As a rule of thumb:

- 10 - high sensitivity

- 30 - medium sensitivity

- 50 - low sensitivity

contour_area: 10
# Optional: The percentage of the image used to detect lightning or other substantial changes where motion detection

needs to recalibrate. (default: shown below)

Increasing this value will make motion detection more likely to consider lightning or ir mode changes as valid motion.

Decreasing this value will make motion detection more likely to ignore large amounts of motion such as a person approaching

a doorbell camera.

lightning_threshold: 0.8

ffmpeg:
output_args:
record: preset-record-generic-audio-aac

cameras:
portail:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/portail
input_args: preset-rtsp-restream
roles:
- record
- audio
- detect
detect:
enabled: true
live:
stream_name: portail
birdseye:
enabled: true
order: 1
objects:
track:
- person
- vehicle
- animal
- dog
- car
filters:
person:
min_score: 0.7
# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)
threshold: 0.75
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object live:
motion:
mask: 0,0.006,0.39,0.006,0.296,0.119,0,0.307
threshold: 14
contour_area: 10
improve_contrast: ‹ true ›

portail2:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/portail2
input_args: preset-rtsp-restream
roles:
- record
#- audio
- detect
detect:
enabled: true
live:
stream_name: portail2
birdseye:
enabled: true
order: 2
objects:
track:
- person
- car
- vehicle
- animal
- dog
filters:
car:
mask:
- 906,121,889,506,1280,508,1205,131
person:
min_score: 0.7
# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)
threshold: 0.75
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object live:

portail3:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/portail3
input_args: preset-rtsp-restream
roles:
- record
- detect
detect:
enabled: true
live:
stream_name: portail3
birdseye:
enabled: true
order: 3
objects:
track:
- person
- vehicle
- animal
- dog
- car
filters:
person:
min_score: 0.7
# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)
threshold: 0.75
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object live:

balance:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/balance
input_args: preset-rtsp-restream
roles:
- record
- detect
detect:
enabled: true
live:
stream_name: rtsp_balance
birdseye:
enabled: true
order: 4
objects:
track:
- person
- animal
- dog
filters:
person:
min_score: 0.7
# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)
threshold: 0.75
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object live:

piscine:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/piscine
input_args: preset-rtsp-restream
roles:
- record
#- audio
- detect
# Optional: Configuration for the jpg snapshots published via MQTT
detect:
enabled: true
live:
stream_name: rtsp_piscine
birdseye:
enabled: true
order: 5
objects:
track:
- animal
- dog
filters:
person:
mask:
- 665,621,521,605,518,470,643,486
min_score: 0.7
# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)
threshold: 0.75
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object live:

zoomsalon:

ffmpeg:

inputs:

- path: rtsp://127.0.0.1:8554/zoomsalon

input_args: preset-rtsp-restream

roles:

- record

- audio

- path: rtsp://127.0.0.1:8554/zoomsalon_sub

input_args: preset-rtsp-restream

roles:

- detect

# Optional: Configuration for the jpg snapshots published via MQTT

detect:

enabled: true

live:

stream_name: rtsp_zoomsalon

birdseye:

enabled: true

order: 6

objects:

track:

- person

- animal

- dog

- bird

filters:

person:

min_score: 0.7

# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)

threshold: 0.75

# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)

# Checks based on the bottom center of the bounding box of the object live:

zoomst:

ffmpeg:

inputs:

- path: rtsp://127.0.0.1:8554/zoomst

input_args: preset-rtsp-restream

roles:

- record

- audio

- path: rtsp://127.0.0.1:8554/zoomst_sub

input_args: preset-rtsp-restream

roles:

- detect

# Optional: Configuration for the jpg snapshots published via MQTT

detect:

enabled: true

live:

stream_name: rtsp_zoomst

birdseye:

enabled: true

order: 7

objects:

track:

- person

- animal

- dog

filters:

person:

min_score: 0.7

# Optional: minimum decimal percentage for tracked object’s computed score to be considered a true positive (default: shown below)

threshold: 0.75

# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)

# Checks based on the bottom center of the bounding box of the object live:

cuisine:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/cuisine
input_args: preset-rtsp-restream
roles:
- record

- audio

- path: rtsp://127.0.0.1:8554/cuisine_sub

input_args: preset-rtsp-restream

roles:

        - detect

# Optional: Configuration for the jpg snapshots published via MQTT

detect:
  enabled: true
live:
  stream_name: rtsp_cuisine
birdseye:
  enabled: true
  order: 8
objects:
  track:
    - person
    - animal
    - dog

- bird

  filters:
    person:
      min_score: 0.7
    # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
      threshold: 0.75
    # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
    # Checks based on the bottom center of the bounding box of the object    live:

salon:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/salon
input_args: preset-rtsp-restream
roles:
- record
- audio

- path: rtsp://127.0.0.1:8554/salon_sub

input_args: preset-rtsp-restream

roles:

        - detect

# Optional: Configuration for the jpg snapshots published via MQTT

detect:
  enabled: true
live:
  stream_name: rtsp_salon
birdseye:
  enabled: true
  order: 9
objects:
  track:
    - person
    - animal
    - dog

- bird

  filters:
    person:
      min_score: 0.7
    # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
      threshold: 0.75
    # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
    # Checks based on the bottom center of the bounding box of the object    live:

camera_groups:
BirdsEye:
order: 1
icon: LuZoomIn
cameras: birdseye
Exterieur:
order: 2
icon: LuCloudSun
cameras:
- balance
- piscine
- portail
- portail2
- portail3
Interieur:
order: 3
icon: LuArmchair
cameras:
- cuisine

- zoomst

- zoomsalon

  - salon

merci de mettre les logs avec les balises </>

Du coup, on change vraiment de sujet … Tu as un vrai pb de config sur Frigate et tu te fourvoies dans ton raisonnement

NON, NON et NON
un flux RECORD … quand il y a une detection, il sert à prendre un snapshot ou un clip. c’ets le flux le moins important, pas de traitement dessus. juste la taille des clips ou des snapshots sur disque. Tu peux etre en Ultra HD ou en Full HD. C’est le flux MAIN en principe

Un flux DETECT. C’est le plus le plus imporant et il est analysé et converti en temps reel par FRIGATE. Ce flux DOIT IMPERATIVEMENT ETRE AU MEME FORMAT que ce que tu precise dans les parametres DETECT de ta config. Sinon, Frigate va convertir en temps reel se flux via fffmpeg et consomé enormement de CPU … C’est ton cas sur toutes tes cameras avec une consommation de CPU de l’ordre 50% par caméra

Dans ton paramétrage général, tu forces une resolution sur le DETECT :

detect:
fps: 5
width: 1280
height: 720

Donc il faut paramétrer un flux sub en 1280*720 avec idealement un fps de 5 et utiliser ce flux SUB pour le detect de ta caméra.

Pour info, je suis entre 1 et 2% su rle process ffmpeg sur mes caméra (contre 45-50 chez toi)

Donc mon conseil,
Parametrer ton flux sub en 1280*720, fps 5 sur tes caméras
Paramétrer dans la section go2rtc ton flux sub :

go2rtc:
  rtsp:
    username: jeedom
    password: nadege08
  streams:
    rtsp_allee:
      - rtsp://jeedom:nadege08@192.168.8.243:88/videoMain
      - ffmpeg:rtsp_allee
    rtsp_allee_sub:
      - rtsp://jeedom:nadege08@192.168.8.243:88/videoSub
      - ffmpeg:rtsp_allee_sub

Paramétrer dans la section detect le format de detection apr defaut (peut etre surchargé au niveau de la caméra)

detect:
fps: 5
width: 1280
height: 720

et paramétrer dans ta caméra l’utilisaiton du flux sub pour le detect

  Allee:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/rtsp_allee
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/rtsp_allee_sub
          input_args: preset-rtsp-restream
          roles:
            - detect

NOrbert

1 « J'aime »

Tes conseils éclairés ont été appliqués, ngrataloup.
De fait, j’ai repris mes premières config avec les sub. Je crois que j’avais désactivé les sub lorsque j’essayais d’activer la détection sur l’audio il y a 6 mois.

Avec la nouvelle config, tout semble fonctionner, et en effet, la conso CPU a bien diminuée, malgré le fait que l’audio soit également en détection ;). Je n’avais visiblement pas suffisamment compris les subtilités du flux sub.

=> Pluggin Frigate réactivé,
=> Config Frigate refaite depuis 1H, RAS !!

Merci beaucoup pour ton aide ngrataloup.

Content que cela fonctionne à nouveau pour toi.

Content de ne pas avoir besoin de chercher :sweat_smile: c’est cool le plugin n’était pas responsable.

Merci beaucoup @ngrataloup pour le débug :+1:

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.