mediadevices icon indicating copy to clipboard operation
mediadevices copied to clipboard

webcam broadcasting

Open lumenier1 opened this issue 5 years ago • 6 comments

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.

lumenier1 avatar Mar 26 '20 10:03 lumenier1

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

porjo avatar Mar 28 '20 01:03 porjo

Another way to capture video without gstreamer and send by pion/webrtc is provided by https://github.com/pion/mediadevices

at-wat avatar Mar 28 '20 03:03 at-wat

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: go-pion-mediadevices-get


Why docs are so scattered? it will be perfect if such example is added in webrtc repo in examples section (: Thanks!

lumenier1 avatar Mar 28 '20 10:03 lumenier1

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.

at-wat avatar Mar 28 '20 14:03 at-wat

Other errors mention that required libraries are missing

Could you please add required installation process in readme file?

lumenier1 avatar Mar 28 '20 14:03 lumenier1

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.

TannerGabriel avatar Sep 15 '20 14:09 TannerGabriel