Skip to content

AtnNn/rethinkdb-stream

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Video streaming with RethinkDB

This demo shows that streaming video is possible with RethinkDB changefeeds. It even supports recording multiple streams at the same time and streaming to multiple viewers.

Screenshot

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
}

About

Proof of concept for streaming binary data using RethinkDB changes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published