mpv icon indicating copy to clipboard operation
mpv copied to clipboard

WebRTC stream support

Open arekm opened this issue 2 years ago • 4 comments

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.

arekm avatar Nov 03 '23 20:11 arekm

Also support widevine videos

aicynide avatar Nov 04 '23 21:11 aicynide

Was just looking into webrtc support for ffmpeg and found these: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=10012 https://github.com/metartc/ffmpeg-webrtc

makinori avatar May 25 '24 09:05 makinori

You can build mpv with third-party ffmpeg that supports WebRTC by yourself.

ruihe774 avatar May 25 '24 09:05 ruihe774

git.ffmpeg.org Git - ffmpeg.git/commit

libavformat has officially merged WebRTC so... bump on this

groutoutlook avatar Jun 06 '25 11:06 groutoutlook