zetta-jsmpeg-camera

0.4.0 • Public • Published

Video Streaming through Zetta with jsmpeg and ffmpeg

Example of streaming mpeg1 video data through Zetta's binary streams using ffmpeg to capture the video from the servers connected camera. Uses jsmpeg on the browsers side to render the websocket video stream to a html5 canvas.

Installation

  1. Install the npm module to your Zetta server.

    npm install zetta-jsmpeg-camera

  2. Install ffmpeg, https://www.ffmpeg.org/download.html

Usage

 
var zetta = require('zetta');
var Camera = require('zetta-jsmpeg-camera');
 
zetta()
  .use(Camera)
  .listen(3000, function() {
 
  });
 
  1. Start your Zetta server, you should see a camera be discovered. Go to the Zetta Browser and input http://localhost:3000/ in the url for the Zetta browser.

  2. Locate the camera device and navigate to the api response, find the link titled video. Copy the href property on it, should look something like ws://localhost:3000/servers/d6b9dc4e-ca67-498e-b04e-99abaec0746c/events?topic=camera%2Fa7c5d8f9-e9bd-4dc8-b097-eb0c43e4b029%2Fvideo.

  3. Call the start transition on the camera.

  4. Navigate to http://video-viewer.herokuapp.com, and input that in the Websocket URL box and submit. You should see yourself on video.

Code for browser app

http://github.com/AdamMagaluk/jsmpeg-video-viewer

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.4.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.4.0
    1
  • 0.3.0
    0
  • 0.2.0
    0
  • 0.1.0
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i zetta-jsmpeg-camera

Weekly Downloads

1

Version

0.4.0

License

MIT

Last publish

Collaborators

  • adammagaluk