Record a video from a mjpeg camera

Hello,

I’m trying to record a video from a mjpeg camera*.
*a usb camera connected to another raspi running MJPEG-Streamer

stream:
camera:
  - platform: mjpeg
    name: Entrée
    mjpeg_url: http://192.168.1.13:8081/?action=stream
    username: !secret cam_user
    password: !secret cam_pass
    authentication: basic

When I use the record service

service: camera.record
data:
  entity_id: camera.entree
  filename: '/tmp/video.mp4'

I get this error : homeassistant.exceptions.HomeAssistantError: camera.entree does not support record service

Is there something I can do to make it work ?

My understanding is that the record service is made possible by the “Stream” integration and that Stream only supports H.264 (not motion jpeg).

1 Like