alii.pub/6ge6t0 - устройство ESP32-CAM из обзора
sudo apt-get install ffmpeg
ffmpeg -i 192.168.1.36:8081 -an -f null -
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
ffmpeg -i 192.168.1.36:8081 -t 5 -c:v libx264 -y -c:a copy /usr/share/hassio/media/record2.mp4
В configuration.yaml:
shell_command:
record_video: ffmpeg -i 192.168.1.36:8082 -t 5 -c:v libx264 -c:a copy -y /media/record2.mp4
В automations.yaml
- alias: Делаем видео
description: ''
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /start
context: {}
- platform: webhook
webhook_id: motioneye-camera1-started
condition: []
action:
- service: shell_command.record_video
- delay:
hours: 0
minutes: 0
seconds: 8
milliseconds: 0
- service: telegram_bot.send_video
data:
file: /media/record2.mp4
keyboard: /start, /send
caption: Кто-то шарится возле двери.
mode: single
- alias: Отправить видео
description: ''
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /send
condition: []
action:
- service: telegram_bot.send_video
data:
file: /media/record2.mp4
keyboard: /start, /send
inline_keyboard: /start, /send
mode: single
23 авг 2024