tomeshnet / meshstream

Live video stream with a distributed file system over a physical mesh network
GNU General Public License v3.0
22 stars 4 forks source link

Project goal #1

Open benhylau opened 6 years ago

benhylau commented 6 years ago

This summarizes a discussion involving @nicopace, @flyingzumwalt, and @benhylau, followed by a secondary discussion with @darkdrgn2k and @ASoTNetworks, about a demo that features:

LibreRouter IPFS SSB mesh-orange cjdns

The purpose is to show what can be accomplished with peer-to-peer applications running over a wireless mesh network that is completely isolated from the Internet. It demonstrates:

Each node consists of:

Streamer:

  1. Raspberry Pi records video with camera and hardware-encodes HLS chunks
  2. Publish ts chunks to IPFS and write m3u8 file, which then gets published to IPFS and IPNS
  3. Publish IPNS link as SSB post with expectation that a local ipfs instance + gateway exist at Subscriber side (i.e. http://localhost:8080/ipns/<publisher-ipns-address>)

Subscribers:

  1. SSB auto-discovery of Streamer friend over LAN
  2. Add friend to find the video in the SSB feed
  3. Play live video stream over local IPFS gateway

All traffic goes over the physical mesh formed by LibreRouter long-range radios and are end-to-end encrypted by cjdns running on each Raspberry Pi.


Proposed work plan:

@nicopace provide LibreRouter assistance and test full setup in Alter Mundi and other existing networks @flyingzumwalt have IPFS side set up with Raspberry Pi and investigate IPNS publishing performance @benhylau IPFS, SSB, mesh-orange, cjdns integration @darkdrgn2k integration between Raspberry Pi and LibreRouter @ASoTNetworks HLS over IPFS

nicopace commented 6 years ago

The LibreRouter working as a switch requirement is not clear.

Please, clarify.

Regards

benhylau commented 6 years ago

I am thinking to route with cjdns/yggdrasil on the Raspberry Pi and want the two directional radios to show up on the Raspberry Pi as separate wireless interfaces. LibreRouter does not need to run any mesh networking protocol, just 802.11s mesh point with routing disabled, or ibss ad-hoc, then perhaps vlan the traffic to the Raspberry Pi's single ethernet interface.

nicopace commented 6 years ago

Only radios, or ethernet traffic too? Could it be that devices will be connected via cable if they are close enough? (this is how we do it usually)

benhylau commented 6 years ago

👍 I think that's a nice addition, to have the flexibility for both. Especially in conferences like CCC, if you wanna demo this in the assembly hall the radios get drowned... having the ethernet configuration will get the idea across.

nicopace commented 6 years ago

I guess we will need to hardcode the ethernet interface where the orangepi will be connected... that way we can tunnel all traffic there.

darkdrgn2k commented 6 years ago

CJDNS/yggdrasil all work on Layer two so we have to be careful not the "bridge" the two antennas together. That would make a CJDNS/yggdrasil mesh where all devices are 1 hop away.

Detail of this problem using Ubiquiti gear and a dumb switch can be found here

The "best" solution is to put all interface on separate vlans and trunk them into the PI so the PI sees each LibrRouter interface as a separate interface (tagged eth)

nicopace commented 6 years ago

I agree, understood what you want to accomplish. Thanks for the clarification. Will create a LibreMesh network profile to accomodate this.

nicopace commented 6 years ago

for the hls playing, are you using hls.js or shaka-player? saw that shaka-player has offline capabilities and capable of downloading the video you streamed! that is nice! https://github.com/google/shaka-player/blob/b61270460cc691eeabb84b4e06f7b26b0eb3e080/docs/design/offline.md

also would be nice to be able to share a fragment of the video...cause it is just a collection of the videos already shared via ipfs... anyway, thinking out loud here.

nicopace commented 6 years ago

another one... have you checked mpeg-dash instead of hls? https://bitmovin.com/mpeg-dash-vs-apple-hls-vs-microsoft-smooth-streaming-vs-adobe-hds/ looks like it is the only one it is an international standard, and it is the most featureful

here it shows how to do it: http://wiki.webmproject.org/adaptive-streaming/instructions-to-do-webm-live-streaming-via-dash

ASoTNetworks commented 6 years ago

The player we are using right now is viedo.js with https://github.com/videojs/videojs-contrib-hls plugin.

We haven't tried mpeg-dash yet because it seems like you have to separate both the audio and video tracks then add to ipfs instead of one file from each HLS chunk.

nicopace commented 6 years ago

seems shifting to shaka-player has no cost, and many features (that are useless for now). May be in the future...