Twitch demonstrates how to capture your webcam/microphone via WebRTC and send to Twitch.
This example requires you have ffmpeg installed, these are the supported platforms
sudo apt-get install ffmpeg
pacman -S ffmpeg
brew install ffmpeg
go get github.com/pion/example-webrtc-applications/twitch
jsfiddle.net you should see your Webcam, two text-areas and a 'Start Session' button
In the jsfiddle the top textarea is your browser, copy that and:
Run echo $BROWSER_SDP | twitch $STREAM_KEY
- Paste the SessionDescription into a file.
- Run
twitch $STREAM_KEY < my_file
Copy the text that twitch
just emitted and copy into second text area
The output from ffmpeg
will be printed to your console, and if your stream-key is correct you will see it on Twitch soon!
Congrats, you have used Pion WebRTC! Now start building something cool