Skip to content

prop/node-mjpeg-proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-mjpeg-proxy

This is a simple implementation of a MJPEG proxy written with node.js.

Documentation

Multiple sources example

var mjpegproxy = require("mjpeg-proxy");
var map = {
	"cam1" : "http://example1.com:8080/cam1",
	"cam2" : "http://foo:[email protected]/cam2"
};


mjpegproxy.createProxy("http://192.1.2.3:8080/videofeed");

Single source example

var mjpegproxy = require("mjpeg-proxy");
mjpegproxy.createProxy("http://192.1.2.3:8080/videofeed");

Here, it will create a proxy to the source video feed (http://192.1.2.3:8080/videofeed) with the default options (below). You can now access the feed at http://localhost:5080/ .

Proxy

Proxy.createProxy(sourceURL, [options]);
Proxy.createProxy(map, [options]);

Returns: a Proxy instance.

Arguments:

  • sourceURL

    The source URL of the MJPEG feed to be proxied.

  • map

    Multiple sources map. See [example] (examples/map-example.json)

Options:

  • port

    The destination port. Defaults to 5080.

  • headers

    Optional headers (e.g. for the authorization).

TODO

  • Stop receiving original stream while no clients request it

Credits

About

A Node.JS MJPEG proxy implementation

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%