github.com/pion/webrtc/v3@v3.2.24/examples/play-from-disk-renegotiation/README.md (about) 1 # play-from-disk-renegotiation 2 play-from-disk-renegotiation demonstrates Pion WebRTC's renegotiation abilities. 3 4 For a simpler example of playing a file from disk we also have [examples/play-from-disk](/examples/play-from-disk) 5 6 ## Instructions 7 8 ### Download play-from-disk-renegotiation 9 This example requires you to clone the repo since it is serving static HTML. 10 11 ``` 12 mkdir -p $GOPATH/src/github.com/pion 13 cd $GOPATH/src/github.com/pion 14 git clone https://github.com/pion/webrtc.git 15 cd webrtc/examples/play-from-disk-renegotiation 16 ``` 17 18 ### Create IVF named `output.ivf` that contains a VP8 track 19 20 ``` 21 ffmpeg -i $INPUT_FILE -g 30 -b:v 2M output.ivf 22 ``` 23 24 **Note**: In the `ffmpeg` command, the argument `-b:v 2M` specifies the video bitrate to be 2 megabits per second. We provide this default value to produce decent video quality, but if you experience problems with this configuration (such as dropped frames etc.), you can decrease this. See the [ffmpeg documentation](https://ffmpeg.org/ffmpeg.html#Options) for more information on the format of the value. 25 26 ### Run play-from-disk-renegotiation 27 28 The `output.ivf` you created should be in the same directory as `play-from-disk-renegotiation`. Execute `go run *.go` 29 30 ### Open the Web UI 31 Open [http://localhost:8080](http://localhost:8080) and you should have a `Add Track` and `Remove Track` button. Press these to add as many tracks as you want, or to remove as many as you wish. 32 33 Congrats, you have used Pion WebRTC! Now start building something cool