Doc updates

* Finish README.md
* Create README.md for every example
* Finish DESIGN.md
This commit is contained in:
Sean DuBois
2018-06-18 22:22:19 -07:00
parent 01681edd51
commit 882619f02c
8 changed files with 120 additions and 20 deletions

View File

@@ -1 +1,35 @@
# TODO
# Why pion-WebRTC
WebRTC is a powerful, but complicated technology. You can build amazing things with it comes with a steep learning curve though.
Using WebRTC in the browser is easy, but outside the browser is more of a challenge. There are multiple libraries, and they all have
varying levels of quality. Most are also difficult to build, and depend on libraries that aren't available in repos or portable.
pion-WebRTC aims to solve all that! Built in native Go you should be able to send and receive media and text from anywhere with minimal headache.
These are the design principals that drive pion-WebRTC and hopefully convince you it is worth a try.
## Portable
pion-WebRTC is written in Go and extremely portable. Anywhere Golang runs, pion-WebRTC should work as well! Instead of dealing with complicated
cross-compiling of multiple libraries, you now can run anywhere with one `go build`
## Simple API
If you know how to use WebRTC in your browser, you know how to use pion-WebRTC.
We try our best just to duplicate the Javascript API, so your code can look the same everywhere.
If this is your first time using WebRTC, don't worry! We have multiple [examples](https://github.com/pions/webrtc/tree/master/examples) and [GoDoc](https://godoc.org/github.com/pions/webrtc)
## Bring your own media
pion-WebRTC doesn't make any assumptions about where your audio, video or text come from. You can use FFmpeg, GStreamer, MLT or just serve a video file.
This library only serves to transport, not create media.
## Safe
Golang provides a great foundation to build safe network services.
Especially when running a networked service that is highly concurrent bugs can be devastating.
## Readable
If code comes from an RFC we try to make sure everything is commented with a link to the spec.
This makes learning and debugging easier, this WebRTC library was written to also serve as a guide for others.
## Tested
Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
## Shared libraries
Every pion product is built using shared libraries, allowing others to review and reuse our libraries.

View File

@@ -6,41 +6,50 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d)](https://www.codacy.com/app/Sean-Der/webrtc)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)
A (almost) pure Golang implementation of the WebRTC API.
A Golang implementation of the WebRTC API.
See [DESIGN.md](DESIGN.md) for the the features it offers, and future goals.
See [DESIGN.md](DESIGN.md) for the features it offers, and future goals.
## Getting Started
This project provides a Go implementation of the WebRTC API. There isn't a application that will fit all your needs, but we provide a
few simple examples to show common use cases (Sending and Receiving video) that you are free to modify and extend to your needs
few simple examples to show common use cases that you are free to modify and extend to your needs.
### Prerequisites
We still use OpenSSL for DTLS (we are actively working on replacing it) so make sure to install the OpenSSL headers for
your platform before using pion-WebRTC.
#### Ubuntu/Debian
`sudo apt-get install libssl-dev`
#### OSX
`brew install openssl`
#### Fedora
`sudo yum install openssl-devel`
#### Windows
1. Install [mingw-w64](http://mingw-w64.sourceforge.net/)
2. Install [pkg-config-lite](http://sourceforge.net/projects/pkgconfiglite)
3. Build (or install precompiled) openssl for mingw32-w64
4. Set __PKG\_CONFIG\_PATH__ to the directory containing openssl.pc
(i.e. c:\mingw64\mingw64\lib\pkgconfig)
### Example Programs
#### gstreamer
GStreamer shows how to use pion-WebRTC with GStreamer. Once connected it streams video to an autovideosink
#### save-to-disk
save-to-disk shows how to use pion-WebRTC to record and save video. Once connected it saves video to *.ivf files which can be played with ffmpeg
Examples for common use cases, extend and modify to quickly get started.
* [gstreamer-receive](examples/gstreamer-receive/README.md) Play video from your Webcam live using GStreamer
* [save-to-disk](examples/save-to-disk/README.md) Save video from your Webcam to disk
### Writing your own application
The example applications provide examples for common use cases. The API should match the Javascript WebRTC API, and the [GoDoc](https://godoc.org/github.com/pions/webrtc) is actively maintained
The API should match the Javascript WebRTC API, and the [GoDoc](https://godoc.org/github.com/pions/webrtc) is actively maintained
## Roadmap
pion-WebRTC is in active development, you can find the roadmap [here](https://github.com/pions/webrtc/issues/9).
The master branch will always be usable, but will have features that aren't completed.
## Questions/Support
Sign up for the [Golang Slack](https://invite.slack.golangbridge.org/) and join the #pion channel for discussions and support
If you need commercial support/don't want to use public methods you can contact us at [team@pion.ly](team@pion.ly)
You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion/new)
## Project Ideas
I am looking to support other interesting WebRTC projects, so if you have something to build please reach out!
pion-WebRTC would make a great foundation for.
* Easy language bindings (Python)
* Golang SFU
* Server side processing (video effects or an MCU)
If you need commercial support/don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
@@ -50,5 +59,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)
* [John Bradley](https://github.com/kc5nra) - *Original Author*
* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
## Project Ideas
I am looking to support other interesting WebRTC projects, so if you have something to build please reach out!
pion-WebRTC would make a great foundation for.
* Easy language bindings (Python)
* Golang SFU
* Server side processing (video effects or an MCU)
## License
MIT License - see [LICENSE.md](LICENSE.md) for full text

View File

@@ -0,0 +1,27 @@
# gstreamer-receive
gstreamer-receive is a simple application that shows how to record your webcam using pion-WebRTC and play live using GStreamer.
## Instructions
### Install GStreamer
This example requires you have GStreamer installed, these are the supported platforms
#### Debian/Ubuntu
`sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good`
### Download gstreamer-receive
```
go get github.com/pions/webrtc/examples/gstreamer-receive
```
### Open gstreamer-receive example page
[jsfiddle.net](https://jsfiddle.net/tr2uq31e/1/) you should see your Webcam, two text-areas and a 'Start Session' button
### Run gstreamer-receive, input browser's SessionDescription
In the jsfiddle the top textarea is your browsers, copy that and paste into `gstreamer-receive` and press enter
### Input gstreamer-receive's SessionDescription into your browser
Copy the text that `gstreamer-receive` just emitted and copy into second text area
### Hit 'Start Session' in jsfiddle, enjoy your video!
Your video should popup automatically, and will continue playing until you close the application.
Congrats, you have used pion-WebRTC! Now start building something cool

View File

@@ -0,0 +1,22 @@
# save-to-disk
save-to-disk is a simple application that shows how to record your webcam using pion-WebRTC and save to disk.
## Instructions
### Download save-to-disk
```
go get github.com/pions/webrtc/examples/save-to-disk
```
### Open save-to-disk example page
[jsfiddle.net](https://jsfiddle.net/tr2uq31e/1/) you should see your Webcam, two text-areas and a 'Start Session' button
### Run save-to-disk, input browser's SessionDescription
In the jsfiddle the top textarea is your browsers, copy that and paste into `save-to-disk` and press enter
### Input save-to-disk's SessionDescription into your browser
Copy the text that `save-to-disk` just emitted and copy into second text area
### Hit 'Start Session' in jsfiddle, enjoy your video!
In the folder you ran `save-to-disk` you should now have a file `output-1.ivf` play with your video player of choice!
Congrats, you have used pion-WebRTC! Now start building something cool