@Olivier974
You helped once, maybe you can help me as well.
and @ anybody else, who knows how to tackle the problem.
I did some test and have very simple script on a hass.io / HassOS installation:
#!/bin/bash
http_url=http://homeassistant.local:8123/api/camera_proxy_stream/camera.my_camera?token=$1
date >> /config/cam.txt
ffmpeg -i $http_url -y -t 5 -vcodec copy /config/cam.mp4
This script is located in the /config folder.
I can start it from the development / services menu in HA, cam.txt gets updated.
The recording cam.mp4 does not appear in the /config folder
but in logs there is an error message:
2021-05-07 00:30:08 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `bash /config/cam.sh {{ state_attr('camera.my_camera','access_token') }}`, return code: 1
NoneType: None
And by the way I’ve included in my configuration.yaml ffmpeg line:
ffmpeg:
I do believe it comes from missing ffmpeg executable.
I cannot start ffmpeg also via ssh
-bash: ffmpeg: command not found
Which is clear, since the ssh in another container as the hassio core.
Question: If I am right, how to run ffmpeg in a script on HassOS?
Many thanks in advance for any idea and suggestion.
KRR
Peter