ESPHome camera stream

With esphome camera stream we can use the ffmpeg to fetch the image from the
camera stream. It requires a bit more computing power from esp device and the
host that runs the image processing.
Warning
Notice that this is not recommended way due to the amount of consumed resources on the esp32 and the host which processes the video to extract the image.
With esp32 ensure to attach camera to the heat radiator or to the esp32 metal package to help it dissipate heat.
Prepare esphome device
Configure esphome device:
- install esphome camera
on the device and add
esp32_cameraandesp32_camera_web_serverwithstreammodules:
esp32_camera:
... (skipped due to the fact there are different modules)
esp32_camera_web_server:
- port: 8080
mode: stream
Flash the device and wait until it boots and is available.
Create config for script
- copy
esphome-stream.distas.env - in copied file
.envreplacetoken-change-mewith the value of the token you copied - in copied file
.envreplacefingerprint-change-mewith some random value, which is alphanumeric and has at least 16 chars (and max of 40 chars), for example set it tofingerprint-myprinter3-camera-3 - in copied file
.envreplace your esphome device address and port inCAMERA_COMMAND_EXTRA_PARAMS - notice that
-update 1may not be needed in certain ffmpeg versions - save edited file
.env
Next, test config.
Real world example
The same ESP device with stream, notice different port (8080).