Webcam using mac mini

Camera model
Logitech
What is the problem?
Connecting to the stream
What did you already try to solve it?
Trying adresses combitions

Hello
I have been trying to setup OctoPrint on an old mac mini I am using as server pc. Octoprint on its own works fine but I struggle with adding webcam stream. When I use following ffmpeg command:

ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" out.avi

out.avi file looks just fine but when I try to stream it using the following command:

ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" -vcodec libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv422p -f mpegts udp://localhost:12345

I have no idea how to connect this stream to Octoprint. I did not manage to view it in VLC either. I know it is running based on the terminal output.

Any suggestions and advice are welcome.