Streaming MJPEG IP camera to chromecast works from UI but not YAML

I’m trying to automate my camera streaming to my chromecast.

The camera is just a webcam streaming with the motion package on the same machine that is running HA in docker.

I can do it via the UI with the media browser just fine, but if I use camera.play_stream I get a log error saying it’s not supported on my camera, and this fails:

      - service: media_player.play_media
        target:
          entity_id: media_player.mychromecast
        data:
          media_content_id: "http://172.XX.0.1:8081/"
          media_content_type: "video"

The log says this:
Quick Play failed for http://172.XX.0.1:8081/:video({})

Any idea what I’m getting wrong?