1# play-from-disk 2play-from-disk demonstrates how to send video and/or audio to your browser from flise saved to disk. 3 4## Instructions 5### Create IVF named `output.ivf` that contains a VP8 track and/or `output.ogg` that contains a Opus track 6``` 7ffmpeg -i $INPUT_FILE -g 30 output.ivf 8ffmpeg -i $INPUT_FILE -c:a libopus -page_duration 20000 -vn output.ogg 9``` 10 11### Download play-from-disk 12``` 13export GO111MODULE=on 14go get github.com/pion/webrtc/v3/examples/play-from-disk 15``` 16 17### Open play-from-disk example page 18[jsfiddle.net](https://jsfiddle.net/9s10amwL/) you should see two text-areas and a 'Start Session' button 19 20### Run play-from-disk with your browsers SessionDescription as stdin 21The `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: 22 23#### Linux/macOS 24Run `echo $BROWSER_SDP | play-from-disk` 25#### Windows 261. Paste the SessionDescription into a file. 271. Run `play-from-disk < my_file` 28 29### Input play-from-disk's SessionDescription into your browser 30Copy the text that `play-from-disk` just emitted and copy into second text area 31 32### Hit 'Start Session' in jsfiddle, enjoy your video! 33A video should start playing in your browser above the input boxes. `play-from-disk` will exit when the file reaches the end 34 35Congrats, you have used Pion WebRTC! Now start building something cool 36