Installing ffmpeg?

I have Hassio on Raspberry and connected ssd
too bad there is no option to do ssh pi@ipadres invalid password
I have to use ssh to install FFMPEG (needed to load in movies from my Dahua camera, connectet to Motioneye

I think avconv is available to use in place of ffmpeg

ffmpeg is already installed (if Home Assistant OS uses the “core” container, which is most likely). Path: /usr/bin/ffmpeg

Hmm how do i check if core is installed?

It is. Trust me.

1 Like

I installed ssh and tried to follow the documentation https://www.home-assistant.io/integrations/ffmpeg/ but it says I do not have apt directory under etc. Can I create one and move forward? Also I checked under /usr/bin and I do not see ffmpeg listed there. I have HA installed on RPi as well.

[UPDATE] I just added the following in configuration.yaml and restarted and it works.

ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg

I can’t get ffmpeg to work. Added these same lines to configuration yaml but can’t even restart the system to as it says ffmpeg bin not found. See screenshot.
What am I doing wrong?

You need to find where ffmpeg is located and put that.

I’m having the same issue.

Running HA on a Rpi 4.

Looking at the FFmpeg integration instructions here, I just need to add the FFMpeg line in the configuration.yaml file since it seems FFMpeg is built-in (no installation of FFmpeg is mentioned anywhere).

I’ve added these two lines but I can’t even get it to reboot:
ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg

  • The system cannot restart because the configuration is not valid: Error loading /config/configuration.yaml: while scanning a simple key in “/config/configuration.yaml”, line 18, column 1 could not find expected ‘:’ in “/config/configuration.yaml”, line 19, column 1
  • The system cannot restart because the configuration is not valid: Integration error: ffmpeg_bin - Integration ‘ffmpeg_bin’ not found.

ffmpeg doesn’t seem to be installed on my system either. It’s not in /usr/bin, it’s not on the path /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin.
I’m running HAOS installed the official way :

Home Assistant 2023.6.3 
Supervisor 2023.06.4 
Operating System 10.3 
Frontend 20230608.0 - latest

I installed the ssh add-on to get access to check this out. Since it’s locked down I can’t use apt to install ffmpeg.

Yeah that’s not true. I’ve got a fresh install of HAOS on a Pi and there’s no ffmpeg and no way to install it. It’s not in the path and not in /usr/bin. Since HAOS is locked down I used the ssh add-in to log into it to check.

Look for avconv

I think you provide the path to that in place if ffmpeg

Just a follow up to this matter. It turns out that when you ssh into HAOS (supervised), you’re actually connecting to a docker container, not the actual HAOS. And the docker container doesn’t have ffmpeg installed, and even if you installed it there it wouldn’t be used by HAOS.

But the actual HAOS does have it installed. You just can’t tell until you use it. I added the ffmpeg line in my configuration.yaml file but I’m not sure if that even matters. I have a shell script that gets executed and it is able to use ffmpeg normally.

1 Like

I hope you can help me. I want to record a rtsp stream with ffmpeg but cant get it to work. I use this command

  start_ffmpeg_recording: 'ffmpeg -i rtsp://USER:[email protected]:554 -t 00:00:30 -c copy /config/www/output.mp4'
  stop_recording: 'pkill ffmpeg'

But get this mesange in the log

Error running command: `ffmpeg -i rtsp://USER:[email protected]:554 -t 00:00:30 -c copy /config/www/output.mp4`, return code: 8

NoneType: None
2 Likes

I Also got the the same result with the command:
The camera is TP-link VIGI C340S

start_camera_recording: 'ffmpeg -i rtsp://admin:[email protected]:554/live.sdp -vcodec copy -acodec copy /media/camera_camera1_{{ now().strftime("%Y-%m-%d_%H-%M-%S") }}.mp4'

Okey! I solved it by adding my cameras in go2rtc then open up the feed in generic camera there i can record and take snapshots.

Hi @Henrik1986 ,
What the method you do? Is “Action” in Home Assistant?
I use the script to recording, but the video has no audio.
Thank you :slight_smile: