home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.72k stars 30.84k forks source link

Camera ffmpeg not working after 0.114.4 #43522

Closed cassianyoung closed 3 years ago

cassianyoung commented 3 years ago

The problem

Camera ffmpeg doesn't work after 0.114.4

This crops and rotates a camera image (rtsp feed) so it can be used with facial recognition

camera:
  - platform: ffmpeg
    name: front_door_90d
    input: rtsp://192.168.1.19:7447/h044KavB7BODcSSw
    extra_arguments:  "-vf 'transpose=2' -filter:v 'crop=600:300:400:430'"

camera.front_door_90d is created in 0.114.4 but not in later versions.

2020-11-22 12:11:42 INFO (MainThr.1ead) [homeassistant.setup] Setting up camera

Environment

0.114.4 camera front_door_90d is created

0.115 to 0.118.2 it is not

Running in hass supervised

Problem-relevant configuration.yaml

ffmpeg:

camera:
  - platform: uvc
    nvr: 192.168.1.19
    key: API_KEY
  - platform: ffmpeg
    name: front_door_90d
    input: rtsp://192.168.1.19:7447/h044KavB7BODcSSw
    extra_arguments:  "-vf 'transpose=2' -filter:v 'crop=600:300:400:430'"

image_processing:
  - platform: facebox
    ip_address: 192.168.1.8
    port: 8080
    source:
      - entity_id: camera.ground_floor
        name: ground_floor_camera
      - entity_id: camera.front_door_90d
        name: front_door_camera

Traceback/Error logs

Edited logs from 0.114.4 and 0.118.2 below

Version 0.114.4

2020-11-22 12:04:18 INFO (SyncWorker_5) [homeassistant.loader] Loaded ffmpeg from homeassistant.components.ffmpeg

2020-11-22 12:04:25 INFO (MainThread) [homeassistant.setup] Setting up ffmpeg

2020-11-22 12:04:25 INFO (MainThread) [homeassistant.setup] Setting up image_processing
2020-11-22 12:04:25 INFO (MainThread) [homeassistant.setup] Setup of domain image_processing took 0.0 seconds
2020-11-22 12:04:25 INFO (MainThread) [homeassistant.setup] Setup of domain ffmpeg took 0.4 seconds
2020-11-22 12:04:25 INFO (MainThread) [homeassistant.components.image_processing] Setting up image_processing.facebox

2020-11-22 12:04:25 INFO (MainThread) [homeassistant.components.camera] Setting up camera.ffmpeg

Doesn't work under 0.115

Version 0.118.2

2020-11-22 12:10:51 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'map', 'circadian_lighting', 'scene', 'updater', 'switch', 'image_processing', 'script', 'persistent_notification', 'knx', 'discovery', 'plex', 'metoffice', 'neato', 'timer', 'logbook', 'shelly', 'weather', 'tplink', 'input_datetime', 'xiaomi_aqara', 'input_text', 'denonavr', 'group', 'cast', 'sun', 'media_source', 'python_script', 'plant', 'media_player', 'ffmpeg', 'appdaemon', 'unifiprotect', 'ssdp', 'tts', 'mobile_app', 'counter', 'input_boolean', 'input_select', 'broadlink', 'owntracks', 'hacs', 'tuya', 'history', 'tag', 'sensor', 'met', 'awair', 'camera', 'binary_sensor', 'synology_dsm', 'input_number', 'mqtt', 'konnected', 'automation', 'unifi', 'google_assistant', 'zone', 'nzbget', 'lock', 'zeroconf', 'alarm_control_panel', 'coronavirus', 'upnp', 'ifttt', 'light', 'system_health', 'blueprint', 'heos', 'default_config'}

2020-11-22 12:11:05 INFO (MainThread) [homeassistant.setup] Setting up ffmpeg

2020-11-22 12:11:F05 INFO (MainThread) [homeassistant.setup] Setup of domain ffmpeg took 0.5 seconds

Additional information

probot-home-assistant[bot] commented 3 years ago

ffmpeg documentation ffmpeg source (message by IssueLinks)

cassianyoung commented 3 years ago

Camera: was duplicated in configuration.yaml.

Second version removed and problem disappears.