How to enable a shell_command off FFMPEG with Docker

Hi… Guestion. I am trying to run a ffmpeg command . This is working in terminal but HASS cannot do this. I guess this is because i am running hassio in docker on Ubuntu… I have now enabled ffmpeg: in my configuration.yaml file. But it is still not working. Does anyone has a solution?

This is the error from the shell_command:

running command: `ffmpeg -rtsp_transport tcp -r 25 -i rtsp://admin:[email protected]:554/tcp/av0_0 -an -t 10 -c copy -map 0 -y -update 1 /usr/share/hassio/homeassistant/www/videos/camera.mkv`, return code: 1
NoneType: None```

Is there a way to fix this?

Hmm anyone? is it possible to install ffmpeg inside the hassio docker ?

That is likely to be your problem. INSIDE HassIO that path doesn’t exist at all. INSIDE HassIO, the path to config is /config/ so the full path of that file would be /config/www/videos/camera.mkv

Hi Flamingm0e

I just found a ‘‘solotion’’ now. I am able to record a video. But now i want to send that video via telegram

- alias: "recording test rtsp"
    - platform: state
      entity_id: binary_sensor.0x00158d0002ea1b7a_occupancy
      from: 'off'
      to: 'on'
    - condition: state
      entity_id: alarm_control_panel.home_alarm
      state: armed
    - service: camera.record
        entity_id: camera.rtsp
        filename: '/config/www/videos/{{ entity_id }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4'
        duration: 5`

Now the recordings are called. _20190913-154041.mp4

So the date and time… How can i make sure that Telegram will send the correct and newest mp4 file which was record via the camera.record command?

- service: telegram_bot.send_video
        file: '/config/www/videos/{{ entity_id }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4

No idea, but if you are using a filename that includes the second, what happens when the send video piece runs a second later than the video that was captured?

I can make sure that the file is hardcoded, but how can i do this with a automation ?

I don’t know. I don’t use the automations in Home Assistant. I use Node-Red and it’s as simple as