[SOLVED] Generic Camera Stream Wont Open

Im using a Pi camera running on octoprint for my 3d printer. See my HA config below. Both URLs work if I paste them into a browser window. It does not require authentication. I notice when I add the camera into an entity card the icon it shows is a current snapshot of the camera view. But when I click on it to view the stream the window opens and it just spins and spins. Never opening the stream.

Also, if I insert the url in an iframe card it works.

Any ideas on what’s going on?

stream:
  
camera:
- platform: generic
  still_image_url: "http://192.168.1.245/webcam/?action=snapshot"
  stream_source: "http://192.168.1.245/webcam/?action=stream"

I may have figured it out but maybe someone can confirm. I think the raspberry pi camera only streams in mjpeg and it looks like the stream component might only work with H264.

I think you’re probably correct. To confirm this you can just remove stream:, restart, and try it.

I’m using mjpeg stream ok, however I’m using the camera component, not the stream component.

That was it! I didn’t know there was an mjpeg platform. I was using the stream component with the generic platform.

I removed the stream: part of my config, changed the platform to mjpeg and change the stream_url to mjepg_url. Now it’s working. Thanks!

Here’s my config if anyone else finds this and needs it.

camera:
- platform: mjpeg
  name: Octopi Camera
  still_image_url: "http://192.168.1.245/webcam/?action=snapshot"
  mjpeg_url: "http://192.168.1.245/webcam/?action=stream"
2 Likes

Can confirm, I’ve had numerous issues with using the H265 codec on the Generic Camera integration.