Record rtsp stream via ffmpeg

Hi,

I’ve been trying for days now to get an rtsp stream recorded in HA…
I’m able to show the rtsp stream on my view, but can’t record it.

I’d like to record the stream to continuously 24hrs, and save as a file (split up in 25MB files), and remove the mp4 files again after 24 hours.

the yaml I’m using is

camera:
  - platform: ffmpeg
    name: Frontdoor
    input: rtsp://[email protected]:8001/0/av0
    extra_arguments: -c:v copy -c:a copy -f segment -segment_time 1800 -segment_format mp4 -reset_timestamps 1 -strftime 1 -fs 25M
    output: /config/www/Frontdoor__%Y-%m-%d_%H-%M-%S.mp4

However I get the error that the output value is not valid.
Invalid config for [camera.ffmpeg]: [output] is an invalid option for [camera.ffmpeg]. Check: camera.ffmpeg->output. (See ?, line ?).

What do the docs say? Where did you see this output option?

You can specify a filename with the record service.

You can then also specify a duration, but a duration of 24 hours seem excessively long for this service and should you restart HA you’ll have an issue.

I think you’re going to run into a lot of trouble. Better to go for a proper NVR and look at Frigate (not familiar with it though).

1 Like

Thanks!
I’ve already tried Frigate too, wasn’t able to get it running…
So I was looking for an easier config… But indeed, the ffmpeg doesn’t seem to be very suited for my goal…

Feel free to make an issue on frigates GitHub, we’d be happy to help

1 Like

Thanks! I made a post there!
Did make some progress on the Frigate, but some probs to record :slight_smile: