Camera.record videos not playing

I’m using camera.record to save video clips for a later automation. Here’s my configuration:

service: camera.record
data:
  duration: 3
  filename: /config/media/Garage/Videos/clip.mp4
target:
  entity_id: camera.upstairs_hallway_2

The video is created, but can’t play in the home assistant webpage (I have a docker installation). I get an error: “No video with supported format and MIME type found.”. If I copy the file elsewhere any play with VLC then it seems to play okay, though. Any thoughts why it wouldn’t play?