mpv
mpv copied to clipboard
WebRTC stream support
Please consider adding WebRTC support for mpv.
One use case here, possibly there are others:
WebRTC is used for streaming from local cameras on 3d printer related software (OctoPrint, Klipper). Usually using camera-streamer (https://github.com/ayufan/camera-streamer).
KlipperScreen (https://klipperscreen.readthedocs.io/en/latest/) utilises mpv (via python-mpv) and shows such streams on LCD screen. Unfortunately that currently doesn't work for WebRTC streams due to lack of support in mpv.
How to get example stream, assuming having working /dev/video0 camera:
camera-streamer --http-port=9090 --http-listen=0.0.0.0 # (--http-listen if not on local machine)
(additional options may be needed; like --camera-type=libcamera if using libcamera stack on raspberry pi with bookworm based OS etc)
go to that port with web browser and click "webrtc" there.