First release
This commit is contained in:
commit
fa6c85266e
2339 changed files with 761050 additions and 0 deletions
26
node_modules/mux.js/docs/streams.md
generated
vendored
Normal file
26
node_modules/mux.js/docs/streams.md
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Streams
|
||||
|
||||
mux.js uses a concept of `streams` to allow a flexible architecture to read and manipulate video bitstreams. The `streams` are loosely based on [Node Streams][node-streams] and are meant to be composible into a series of streams: a `pipeline`.
|
||||
|
||||
## Stream API
|
||||
|
||||
Take a look at the base [Stream][stream] to get an idea of the methods and events available. In general, data is `push`ed into a stream and is `flush`ed out of a stream. Streams can be connected by calling `pipe` on the source `Stream` and passing in the destination `Stream`. `data` events correspond to `push`es and `done` events correspond to `flush`es.
|
||||
|
||||
## MP4 Transmuxer
|
||||
|
||||
An example of a `pipeline` is contained in the [MP4 Transmuxer][mp4-transmuxer]. This is a diagram showing the whole pipeline, including the flow of data from beginning to end:
|
||||
|
||||

|
||||
|
||||
You can gain a better understanding of what is going on by using our [debug page][debug-demo] and following the bytes through the pipeline:
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
and go to `http://localhost:9999/debug/`
|
||||
|
||||
[node-streams]: https://nodejs.org/api/stream.html
|
||||
[mp4-transmuxer]: ../lib/mp4/transmuxer.js
|
||||
[stream]: ../lib/utils/stream.js
|
||||
[debug-demo]: ../debug/index.html
|
Loading…
Add table
Add a link
Reference in a new issue