IP Camera Binding with ESP32 Cam

I want to set up an IP Camera Thing and use it to integrate an ESP32 Camera to my smart home.

I have set up the following thing and item:

Thing ipcamera:generic:AnetCam
    ffmpegInputOptions="-f mjpeg",
String AnetCam "Front Door" { channel="ipcamera:generic:AnetCam:hlsUrl" [ protocols="hls" ] }

From what I understand, I should now be able to use the URL to stream content using VLC. However nothing happens ( works with VLC). When I call the URL in my browser it just downloads the m3u8 file.

It has the following content:


There is a file /tmp/AnetCam/ipcamera0.ts on my server.

Am I missing something?

You should post the TRACE level log output as this will include the raw FFmpeg output in it that will show any errors and more importantly if you can reach 1.0x speed.

The problem will be your CPU needs to be able to TRANSCODE the mjpeg stream into h264 in realtime and not many CPU’s can do that in real time.

Also it really does not make much sense turning a low res and framerate stream into HLS, unless your wanting to cast the stream to a TV/chromecast, or google home hub.

If your wanting to do HLS, then its a good reason to buy a better camera that has h264 streams.

You can of course use this URL for the stream…

The advantage of this over using the cameras direct URL, is that the camera probably can not stream to multiple tablets/phones/webpages at the same time, but the binding can handle that. Also if the camera drops off the wifi and comes back online, the mjpeg stream should still work via the binding, but will fail from the cameras direct URL.

1 Like

Thank you!

I don’t really know why I choose h264 - As you said it does not make much sense for the ESP. I know did the following and it worked:

String AnetCam { channel="ipcamera:generic:AnetCam:mjpegUrl" }