mediadevices
mediadevices copied to clipboard
webcam broadcasting
Summary
Broadcast webcam stream from server to browser.
Motivation
This feature definitely should be in examples section. It has many use cases: from home security control to live video streaming. Nowadays it's a must have feature.
Alternatives
Alternatives: Python (aiortc), Java (Kurento), linux-projects (UV4L)
Additional context
This feature is very much in demand but alternatives have limitations. I.e. Kurento requires Java Machine to be installed, aiortc has difficulties with setup due to Python versioning and package support, UV4L is not stable, pretty opinionated and it's not open sourced. So, this is the case where Go will shine.
Check out https://github.com/pion/example-webrtc-applications for more examples. This one may do what you need: https://github.com/pion/example-webrtc-applications/tree/master/gstreamer-send
Another way to capture video without gstreamer and send by pion/webrtc is provided by https://github.com/pion/mediadevices
Check out https://github.com/pion/example-webrtc-applications for more examples.
Thank you!
Another way to capture video without gstreamer and send by pion/webrtc is provided by https://github.com/pion/mediadevices
Thanks! But there is some problem:

Why docs are so scattered? it will be perfect if such example is added in webrtc repo in examples section (: Thanks!
Thanks! But there is some problem:
First error is due to mismatch of the dependency version.
Go modules is required to be enabled.
Other errors mention that required libraries are missing. In this case, libopus-dev and libvpx-dev should be installed.
Why docs are so scattered? it will be perfect if such example is added in webrtc repo in examples section (: Thanks!
pion/webrtc is kept to be pure Go library.
Examples using media capture and encoding require CGO and external libraries/tools; they can't be in pion/webrtc.
Other errors mention that required libraries are missing
Could you please add required installation process in readme file?
You can also check out the new media devices example in the ion-sfu repository, which demonstrates how you can send video to the SFU server and then read it from the browser.
It also features a documentation that shows all the dependencies and tools you need to install to get it working on a Linux machine.