Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atnnn/rethinkdb-stream
Proof of concept for streaming binary data using RethinkDB changes
https://github.com/atnnn/rethinkdb-stream
Last synced: 3 months ago
JSON representation
Proof of concept for streaming binary data using RethinkDB changes
- Host: GitHub
- URL: https://github.com/atnnn/rethinkdb-stream
- Owner: AtnNn
- Created: 2015-02-04T20:50:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-20T08:49:05.000Z (almost 10 years ago)
- Last Synced: 2024-08-04T07:04:06.553Z (6 months ago)
- Language: Python
- Homepage:
- Size: 1.46 MB
- Stars: 139
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Video streaming with RethinkDB
This demo shows that streaming video is possible with [RethinkDB
changefeeds](http://rethinkdb.com/blog/realtime-web/). It even
supports recording multiple streams at the same time and streaming to
multiple viewers.![Screenshot](screenshot.gif)
# Usage
Record video from your webcam into a RethinkDB table called 'hello':
```
./stream_webcam 127.0.0.1 28015 hello
```Live stream the 'hello' table:
```
./play_stream 127.0.0.1 28015 hello
```Stream from the 'hello' table starting at the beginning:
```
./play_stream 127.0.0.1 28015 hello 0
```# Data format
Data is formatted as chunks (with a default size of 1 KiB). Each chunk
is associated with an auto-incremented integer id and stored in the
table associated with the stream.```
{
"id": 0,
"chunk": r.binary(...)
}
```The last document in the stream has an `end` field instead of `chunk`.
```
{
"id": 2294,
"end": true
}
```