play-from-disk demonstrates how to send video to your browser from a file saved to disk.
ffmpeg -i $INPUT_FILE -g 30 output.ivf
go get github.com/pion/webrtc/examples/play-from-disk
jsfiddle.net you should see two text-areas and a 'Start Session' button
The output.ivf
you created should be in the same directory as play-from-disk
. In the jsfiddle the top textarea is your browser, copy that and:
Run echo $BROWSER_SDP | play-from-disk
- Paste the SessionDescription into a file.
- Run
play-from-disk < my_file
Copy the text that play-from-disk
just emitted and copy into second text area
A video should start playing in your browser above the input boxes. play-from-disk
will exit when the file reaches the end
Congrats, you have used Pion WebRTC! Now start building something cool