# save-to-disk-vpx
save-to-disk-vpx is a simple application that shows how to record your webcam/microphone using WebRTC.rs and save
VP8/VP9 and Opus to disk.
## Instructions
### Open save-to-disk-vpx example page
[jsfiddle.net](https://jsfiddle.net/2nwt1vjq/) you should see your Webcam, two text-areas and a 'Start Session' button
### Run save-to-disk-vpx, with your browsers SessionDescription as stdin
In the jsfiddle the top textarea is your browser, copy that and:
#### Linux/macOS
1. Run `echo $BROWSER_SDP | cargo run --example save-to-disk-vpx`
2. Run `echo $BROWSER_SDP | cargo run --example save-to-disk-vpx -- --vp9`
#### Windows
1. Paste the SessionDescription into a file.
2. Run `cargo run --example save-to-disk-vpx < my_file`
3. Run `cargo run --example save-to-disk-vpx -- --vp9 < my_file`
### Input save-to-disk-vpx's SessionDescription into your browser
Copy the text that `save-to-disk-vpx` just emitted and copy into second text area
### Hit 'Start Session' in jsfiddle, wait, close jsfiddle, enjoy your video!
In the folder you ran `save-to-disk-vpx` you should now have a file `output_vpx.ivf` play with your video player of
choice!
Congrats, you have used WebRTC.rs!