twitch

command
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: MIT Imports: 13 Imported by: 0

README

twitch

Twitch demonstrates how to capture your webcam/microphone via WebRTC and send to Twitch.

Instructions

Install ffmpeg

This example requires you have ffmpeg installed, these are the supported platforms

Debian/Ubuntu

sudo apt-get install ffmpeg

Windows MinGW64/MSYS2

pacman -S ffmpeg

macOS

brew install ffmpeg

Download twitch
go get github.com/pion/example-webrtc-applications/twitch
Open twitch example page

jsfiddle.net you should see your Webcam, two text-areas and a 'Start Session' button

Run twitch with your browsers SessionDescription as stdin and stream-key as an argument

In the jsfiddle the top textarea is your browser, copy that and:

Linux/macOS

Run echo $BROWSER_SDP | twitch $STREAM_KEY

Windows
  1. Paste the SessionDescription into a file.
  2. Run twitch $STREAM_KEY < my_file
Input twitch's SessionDescription into your browser

Copy the text that twitch just emitted and copy into second text area

Hit 'Start Session' in jsfiddle, enjoy your media!

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL