GithubHelp home page GithubHelp logo

hypervision's Introduction

hypervision

hypervision is a desktop application that lets you both watch and broadcast p2p live streams.

When users connect to a stream, they distribute the data they receive amongst each other. This bypasses the need for a central server, and the huge amount of bandwidth required to deliver the same data to every user.

hypervision is built on top of hypercore & hyperdiscovery, both of which help facilitate the p2p networking which connects broadcasters and viewers together.

hypervision screenshot

Installation

git clone git://github.com/mafintosh/hypervision.git
cd hypervision

npm install
npm run build
npm start

License

MIT

hypervision's People

Contributors

amazingandyyy avatar christian-fei avatar emilbayes avatar fritzvd avatar incessantmeraki avatar louiscenter avatar mafintosh avatar watson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hypervision's Issues

npm install error on windows

I have a fresh new computer (just a couple months) so I just have the newest stuff (I dont know if the problem can come from this).
I had on problem at npm install, it was saying Could not load the Visual C++ component "VCBuild.exe".. So I did a search and I found more than one solution, but the better is this one, wich in my case I have VS2017.

But I still get some errors, and I dont know if it's normal

C:\Users\*\Documents\GitHub\hypervision\node_modules\utp-native>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Traceback (most recent call last):
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
    return gyp_main(args)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
    generator.CalculateVariables(default_variables, params)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1900, in CalculateVariables
    generator_flags.get('msvs_version', 'auto'))
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
    versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2017'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:308:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:192:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\*\Documents\GitHub\hypervision\node_modules\utp-native
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

Harfbuzz version too old

$ npm start    

> [email protected] start /home/m1574b34r/dev/remote/github.com/mafintosh/hypervision
> npm run build && electron app.js


> [email protected] build /home/m1574b34r/dev/remote/github.com/mafintosh/hypervision
> node build.js


(electron:388): Pango-ERROR **: 16:31:33.495: Harfbuzz version too old (1.2.7)

Stream seeking

Users should be able to seek back to earlier parts of a broadcast, and then jump back to the latest live data again.

Security: 4 dependency vulnerabilities reported by npm (Electron ones are critical/high severity)

npm audit results below:

                       === npm audit security report ===

# Run  npm install [email protected]  to resolve 3 vulnerabilities
SEMVER WARNING: Recommended action is a potentially breaking change
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Chromium Remote Code Execution                               │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/539                       │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Code Execution by Re-enabling Node.js integration            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/574                       │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Critical      │ Remote Code Execution                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ electron                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/563                       │
└───────────────┴──────────────────────────────────────────────────────────────┘


# Run  npm install [email protected]  to resolve 1 vulnerability
SEMVER WARNING: Recommended action is a potentially breaking change
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Sandbox Breakout / Arbitrary Code Execution                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ static-eval                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ sheetify                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ sheetify > static-eval                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/548                       │
└───────────────┴──────────────────────────────────────────────────────────────┘


found 4 vulnerabilities (1 moderate, 2 high, 1 critical) in 1500 scanned packages
  4 vulnerabilities require semver-major dependency updates.

Browser support

It would be cool to port hypervision out of electron and make it completely usable within consumer browsers like Firefox and Chrome.

For this to happen, hypercore would first need to add browser support, and this is already planned: holepunchto/hypercore#72

Then we would need to use something like mafintosh/random-access-memory for feed storage.

Swarming the data is also something that needs work, because hyperdiscovery and its dependencies don't run in the browser. The following link recommends ways in which you can do dat stuff in the browser: https://docs.datproject.org/browser

Being able to watch broadcasts from a browser would be the first priority, as there are still a number of use cases where broadcasting from an Electron app is useful (doing cool things with ffmpeg for example). That said, clients swarming via discovery-swarm aren't compatible with clients swarming via webrtc-swarm, so if broadcasting continues to be done via a desktop app, it would have to swarm via WebRTC instead.

Add bitrate, dimension & FPS settings

Currently a broadcaster can only switch between three different preset output bitrates: "high", "medium", and "low". The broadcaster should be able to set specific bitrates for both video and audio.

They're also unable to set output video dimensions and a frame rate. This output I believe is currently dictated by the dimensions and frame rate of the input device. They should be able to set these manually.

Add stream archiving

A broadcaster should be able to archive their live streams to disk as video files for later viewing.

Stream freezes if sources are changed mid-stream

If you change the sources after the stream has already started, the video of all connected peers will freeze.

Any peers that try to reconnect will just get the last few seconds before sources were changed, then a freeze.

Audio effects with Web Audio API

It could be worth experimenting with the Web Audio API to provide broadcasters with useful effects for their audio inputs.

Having access to an EQ or a compressor would be handy to even out volume levels for viewers.

Stream chat

If enabled by the broadcaster, a p2p, dat-driven sidebar chat feature could accompany the stream, allowing viewers to chat with each other during the broadcast.

Add application window as video input

Broadcasters are currently given the option to use their entire screen as a video input. This is done with Electron's desktopCapturer API.

This same API offers the ability to capture specific application windows as video inputs too.

Users should be given the ability to toggle between "screen sharing" and "application window sharing".

Add device input selection

User should have the ability to choose from a list of available audio and video devices which they'd like to use as broadcast inputs.

'Go live' does not work on windows.

I had other problems, I dont know if it's related or not to #32
I inserted an win.webContents.openDevTools() to see the output when I click on Go live and the error was Uncaught Error: route 'C:/broadcast' did not match. So I went to home.js (line 38) and changed to ./brodcast, then the error was Uncaught Error: route 'C:/Users/*/Documents/GitHub/hypervision/broadcast' did not match. So, again I changed to ./components/broadcast and the error is the same, just different directory Uncaught Error: route 'C:/Users/*/Documents/GitHub/hypervision/components/broadcast' did not match. I even tried to change to ./components/broadcast.js but I got nothing.

Runtime error on macOS High Sierra (“Cannot find module ./trie”)

To reproduce

  • macOS High Sierra 10.13.5 (17F77)
  • Node.js v8.11.1
  • NVM v6.1.0
  • Electron Version 1.4.6 (1.4.6)
  1. Following instructions in the readme
  2. App launches

What should happen

Interface should load.

What actually happens

Blank window.

Error in console:

Uncaught Error: Cannot find module './trie' (module.js:457)

Add viewer count

Users should be able to see how many viewers are connected to the stream they are currently broadcasting or watching.

Timeline thumbnails

When seeking becomes a thing (#22), timeline thumbnails would make it easier for users to find the spot they want to jump to.

Replace pipe() with pump()

By using pump instead of pipe, we will only need to destroy the MediaStream for everything else to close when a broadcast finishes.

Add input volume meters

Broadcaster should be able to see an input volume meter that indicates whether their output might be too loud or too quiet.

Include a clipping light.

Doesnt start?

Awesome project!

Tried to stream and consume across a few different peers, both on the same and different networks, but I was never able to get an actual video feed on the consumer end, it was just grey?

Stream bitrate

hypervision is great! Looking forward to a future of p2p video streaming ^__^

What bitrate is video broadcasted at, and is this setting configurable?

Update hypercore & hyperdiscovery

hypercore and hyperdiscovery are both in particular need of updating. Their APIs have changed as well, so this doesn't involve a simple npm update.

Also end-of-stream and random-access-file have updated since hypervision was first built.

Stream annotations

Broadcaster could add annotations to the stream, so viewers can seek back to certain points they have specific interest in.

Streaming a vlc stream

Would be really powerful if we can stream a vlc stream (or any http video stream) through here.
BTW: awesome project!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.