/ffmpeg-webrtc

FFmpeg WebRTC (WHIP) muxer

Primary LanguageCOtherNOASSERTION

kevmo314/ffmpeg-webrtc

It's ffmpeg with WebRTC support! This fork uses webrtc-rs to publish WebRTC streams using the WHIP protocol.

This work is inspired by a pull request to add WebRTC support to OBS Studio, which also did most of the heavy lifting for this implementation.

This work is sponsored by Muxable.

Compiling

Build FFmpeg:

./configure
make -j

The build step requires that Rust is installed, as it will call cargo build to build the WebRTC bindings.

Running

A WHIP server is necessary. If you want one to test with, check out TinyWHIP.

Then, run:

./ffmpeg  -re -stream_loop -1 -i ~/video.mp4 -c:v copy -c:a copy -f whip http://localhost:8080

Where ~/video.mp4 is an h264 + opus encoded video file. Some sample videos can be downloaded here.