forked from webrtc-rs/webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing newlines in 'README.md' files
- Loading branch information
1 parent
7690dbd
commit 0186b0a
Showing
22 changed files
with
175 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,45 @@ | ||
# play-from-disk-h264 | ||
|
||
play-from-disk-h264 demonstrates how to send h264 video and/or audio to your browser from files saved to disk. | ||
|
||
## Instructions | ||
|
||
### Create IVF named `output.264` that contains a H264 track and/or `output.ogg` that contains a Opus track | ||
|
||
```shell | ||
ffmpeg -i $INPUT_FILE -an -c:v libx264 -bsf:v h264_mp4toannexb -b:v 2M -max_delay 0 -bf 0 output.h264 | ||
ffmpeg -i $INPUT_FILE -c:a libopus -page_duration 20000 -vn output.ogg | ||
``` | ||
|
||
### Build play-from-disk-h264 | ||
|
||
```shell | ||
cargo build --example play-from-disk-h264 | ||
``` | ||
|
||
### Open play-from-disk-h264 example page | ||
|
||
[jsfiddle.net](https://jsfiddle.net/9s10amwL/) you should see two text-areas and a 'Start Session' button | ||
|
||
### Run play-from-disk-h264 with your browsers SessionDescription as stdin | ||
|
||
The `output.h264` you created should be in the same directory as `play-from-disk-h264`. In the jsfiddle the top textarea is your browser, copy that and: | ||
|
||
#### Linux/macOS | ||
|
||
Run `echo $BROWSER_SDP | ./target/debug/examples/play-from-disk-h264 -v examples/test-data/output.h264 -a examples/test-data/output.ogg` | ||
|
||
#### Windows | ||
|
||
1. Paste the SessionDescription into a file. | ||
1. Run `./target/debug/examples/play-from-disk-h264 -v examples/test-data/output.h264 -a examples/test-data/output.ogg < my_file` | ||
|
||
### Input play-from-disk-h264's SessionDescription into your browser | ||
|
||
Copy the text that `play-from-disk-h264` just emitted and copy into second text area | ||
|
||
### Hit 'Start Session' in jsfiddle, enjoy your video! | ||
|
||
A video should start playing in your browser above the input boxes. `play-from-disk-h264` will exit when the file reaches the end | ||
|
||
Congrats, you have used WebRTC.rs! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
# play-from-disk-renegotiation | ||
|
||
play-from-disk-renegotiation demonstrates WebRTC.rs's renegotiation abilities. | ||
|
||
For a simpler example of playing a file from disk we also have [examples/play-from-disk](/examples/play-from-disk) | ||
|
||
## Instructions | ||
|
||
### Build play-from-disk-renegotiation | ||
|
||
```shell | ||
cargo build --example play-from-disk-renegotiation | ||
``` | ||
|
||
### Create IVF named `output.ivf` that contains a VP8 track | ||
|
||
```shell | ||
ffmpeg -i $INPUT_FILE -g 30 output.ivf | ||
``` | ||
|
||
### Run play-from-disk-renegotiation | ||
The `output.ivf` you created should be in the same directory as `play-from-disk-renegotiation`. | ||
|
||
The `output.ivf` you created should be in the same directory as `play-from-disk-renegotiation`. | ||
|
||
|
||
### Open the Web UI | ||
|
||
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. | ||
|
||
Congrats, you have used WebRTC.rs! |
Oops, something went wrong.