Contribute to the Livepeer Desktop App under Community Node Grant

Here is rough backlog for fixing and updating Livepeer Desktop

First it is need to be updated.
0. Update dependencies. So it is compiled at least. (:heavy_check_mark: done)

  1. Fix exception on start
  2. interaction layer with the blockchain definitely needs to be updated (is related to 1?)
  3. Fix able to broadcast a video stream, and watch a video stream by its URL
    5? Get rid of Babel (https://kangax.github.io/compat-table/es6/)
    As we can see the Babel is far behind of latest version of Node and Browsers. But need to be double
    checked. I’m concerned if there are any non-standard features used or React specific or anything else

Add new features
0. Autoupdate

  1. Multilingual
  2. Bring major functions from livepeer and livepeer_cli. So it become more user-friendly and easy to start for a
    common user
    I. create new ETH account
    II. view details
    III. deposit
    …and other
  3. Switch between source to stream (web-cams, virtual web-cam by other software, screen, etc.)

And some was suggested before /contributing-to-the-livepeer-desktop-app/37
4. Add some constant video streams, and link them in the UI. Folks trying Livepeer for the first time should have a stream to consume. What about livepeer.tv?
5. Enhance the player - support fullscreen viewing

3 Likes

This sounds excellent, as the DesktopApp was built under a very early version of Livepeer by a community member, and definitely has not been kept up to date. Let me know what I can do to help!

Hey there!

Thanks so much for this - have some feedback and thoughts for you. If this sounds good let us know what you need to get started!

Milestone 1: Things that Need to be Updated
This all looks great, we think this is a medium sized grant, which is 100 LPT. What is your timing deliverable here?

Milestone 2: New Features
What is a use case you want to build for? A popular use case right now is other crypto projects using livepeer to stream their events. Some common features people ask for are the ability to ask questions via chat, being able to customize for a specific event (Title, logo), fullscreen is great too. Sounds like you have a vision for something you want to build, and we encourage you to be creative and fork the project. This is a small sized grant given where it is on our priority list, which is 50 LPT. Let us know what timing you’d like to deliver this by.

Thanks so much,
Raffi

One high level question I think would be good to have the answer to is:

What is your goal with the Desktop DApp?

  • Is it to provide a barebones demonstration of Livepeer for broadcasters?

  • Is it a content discovery application that viewers use to find and watch different channels of content broadcasting through Livepeer?

  • Is it a wallet/protocol interaction app for interacting with the protocol economics (staking/bonding/transcoding?

  • Something else?

I’m supportive of any of the above visions! What do you see it becoming?

Thanks for your response
Approximate estimation for milestone 1 is about 3 days

These are cool features. Also I think it would be good to integrate support of some standard interconnection protocol used by popular streaming software to be able using real-time rich after effects and other processing.
I need some investigation on video real time post processing in Node. I think it may take about 7-10 days to complete these features.

Can be all the above.
But initial idea was to make getting started user journey as short/easy as possible.
Going through http://livepeer.readthedocs.io/en/latest/getting_started.html requires from a user to have above average tech skills. Especial most of Windows users do not have such experience and get confused.
Even I having those skills kinda annoyed to do a lot of steps in console. And lazy :sweat_smile:

Great work @Skriptach!

I’m Eric - I work with Raffi on the community node grants program.

The estimation of the 1st milestone looks good. Want to start from there? I think we’ll be able to do a much better job on the new features if we go through a product design sprint - otherwise we are making assumptions without testing them first.

Hi @ericxtang
Actually on weekend I have started digging into go-livepeer code to understand whole protocol and port it from Go Lang to Javascript. But as I mentioned above in first working version I want there be only a webcam streaming. Without require open local RTMP listening server.
And so far I understand I was way too optimistic on my estimation of first milestone :sweat_smile:
Thanks to @dob provide me links on documentation help me got some vision in general. But there are very few technical details.
So it would be great to go through a product design sprint. And if someone give me hand on protocol step-by-step. At least some minimal required to start stream outside.

To do web cam only input without sending the stream over RTMP to the media server, you would have to packetize the input stream into HLS segments in the browser/app. And then connect P2P to the transcoder (should be possible over HTTP with the upcoming release). And connect P2P to other peers who want to consume the stream.

This would all be awesome!

But it’s pretty ambitious - essentially rebuilding the full node + networking stack in JS. Perhaps a good first step is to still leverage a locally or remote running node instead and send the stream RTMP from webcame to that node?

@Skriptach Why would you do a web cam only input without sending the stream over RTMP to the media server? What use case is this for? Why is it better than using a local or remote node?

Cool!

Not sure if you know, but there is a js sdk that provides everything you need in terms of interacting with the protocol in js land.

You actually don’t have to run a custom RTMP server, since a Livepeer node also acts as a RTMP server. So if you are running a Livepeer node locally, you can just send the RTMP stream there.

One thing the desktop app did was to start a local Livepeer node. (This is similar to how the Mist browser automatically starts a local Geth node).

Feel free to ping any of us in the discord, we’ll give you a walk-through of the protocol and answer any question you have :slight_smile:

1 Like

Well. Initially I thought just to avoid extraneous middle layer. Unfortunately it is not possible since Electron JS API provides access to media devices only in Render process.

That’s cool! Thank you =)

Actually I have some questions.

  1. I’m trying to pull jobs by calling getJobs and get latest streamId. I’m testing it on rinkeby. But when instantiate a LivepeerSDK with options controllerAddress and provider for test network it throws error requiring account also. There is mention in Readme about using MetaMask instead of account. But there is no any example. How can I use MetaMask?
  2. Is there any 24/7 brodcaster on mainnet I can use to test stream consuming?
  3. Is there any search of current active broadcasters?

Sorry. There was just an invisible symbol in my string I have paste :sweat_smile:

But now It returns different jobs list then in media.livepeer.org. I read it sources and see there GraphQL is used. Anyway shouldn’t it return same job list for a same account?

Now it works! =)
You can check branch Update in my repo. It can consume stream by ETH account or stream ID. It was tested on rinkeby network.
Broadcasting not implemented yet.

@Skriptach I’m getting the following error when I run npm start. Am I missing something?


> LivepeerDesktop@0.0.1 dist-main /Users/ericxtang/Code/Livepeer/tmp/LivepeerDesktop
> env-cmd ./.prod.env node -r babel-register webpack --config ./config/webpack.config.electron.js --progress --profile --colors --display-error-details

module.js:473
      throw err;
      ^

Error: Cannot find module '/Users/ericxtang/Code/Livepeer/tmp/LivepeerDesktop/webpack'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:453:25)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:201:16)
    at bootstrap_node.js:626:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! LivepeerDesktop@0.0.1 dist-main: `env-cmd ./.prod.env node -r babel-register webpack --config ./config/webpack.config.electron.js --progress --profile --colors --display-error-details`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the LivepeerDesktop@0.0.1 dist-main script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ericxtang/.npm/_logs/2018-08-08T21_10_10_792Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! LivepeerDesktop@0.0.1 dist: `npm run dist-main && npm run dist-renderer`
npm ERR! Exit status 1
npm ERR!

Thank you for your time

Yep. My bad. Just was harry to share some results so didn’t check for this command. Sorry
It is fixed now.

PS: when paste an ID be sure it is a plain text Ctrl+Shift+V. Otherwise there could be some extra chars.

Nice. Now the project builds, but I get an error when I press the “REC” button -

As I mentioned before

By “Livepeer node” do you mean livepeer app from Releases · livepeer/go-livepeer · GitHub?
Then that’s a point. First of all there is no build for Windows. Second it is easier to use only one app that do all necessary operations for streaming.
So I have a question. What is an endpoint where to push video stream to become available on network and/or player https://media.livepeer.org/ ?

Ahh I see.

The link you have is correct. You are right there is no build for Windows at the moment. We’ll need some help with that.

The default endpoint is rtmp://localhost:1935. It’ll create a stream with a new ID (you can find out by querying http://localhost:8935/streamID). After that, the stream can be played at http://localhost:8935/stream/{streamID}.m3u8.