tomeshnet / ipfs-live-streaming

Like HTTP live streaming, but with IPFS which is maybe better?
GNU General Public License v3.0
449 stars 74 forks source link

can this be ported to mobile? #58

Closed rogerlzp closed 5 years ago

rogerlzp commented 5 years ago

Most of the time, people use their phone to watch the video or upload a video. Is this possible to use in Mobile, Android or IOS?

darkdrgn2k commented 5 years ago

The whole stack probably is too much to run on a mobile device. It requires an IPFS server, an RTMP transcoding server and a player.

However it would be possible to use the stack from a mobile device.

Watching the live stream on mobile is should not be a problem in the current state. The player works on most of the devices we tested. I think there were one or two weird exceptions.

As for uploading a video (or publishing from the phone). The current model uses openvpn as an auth mechanism. (which does exist for android). Then you just find an app to publish an RTMP stream from the camera. So it should be possible.

There is another authentication mechanism available for the RTMP server we use, it would take a bit of work to activate it. But it is possible.

JackBekket commented 5 years ago

This is very promising

rogerlzp commented 5 years ago

IPFS on android is OK, I have completed it on my app. But what to do next, and where can we use it is the current issue. Maybe this is one that can have a try.

JackBekket commented 5 years ago

What is your app?

I'm working right now on a blog-platform which every channel can issue their own subscription in a erc-20 format token. This will allow users to earn money on content they create instead of being exploited by brutal corporations like Facebook. And also make subscription 'giftable'

So I think to use IPFS as IPFS can't be blocked, and I thought that I need a streaming functionality because I want to start with gamers audience. - This is why I was looked into solution on live streaming on IPFS, and as we know now, that it can be playable on mobile device too, I can fit this issue to my project very well

JackBekket commented 5 years ago

So my point is this solution is fit into usecases like gaming audience stream platform, or studio blog format streams, decentralized tv as well. It doesn't fit into other stream-blog usecases like "instagram stories" or other, where users actually want to make translation exactly from their own phone (not pc)

rogerlzp commented 5 years ago

interesting, we are doing quite near.

My app is like the following: There are two roles in the app, one is the provider, and the other is the consumer. The provider process is like the following:

  1. start IPFS daemon on mobile
  2. upload a file to IPFS network, take an image for example, get the FILE HASH after upload. set the digital price (bid 10 custom token), and the desc, put three attributes (FILE HASH for image file, price, and desc) in a json file
  3. upload the json file to IPFS, get another FILE HASH for the json file.
  4. publish and resolve the FILE HASH using command "ipfs name publish ..."
  5. pubsub the data to a topic using pubsub command: "ipfs pubsub pub topic data", where topic is "PUBLISH_NODE", and data is in the format of "NODENASH:{#YOURNODE};PRICE:#PriceOfImageFile, WALLETADDRESS:#{YourWallerAddress}".

The consumer process is like the following:

  1. start IPFS daemon on mobile
  2. subscribe the TOPIC, "PUBLISH_NODE" by command :"ipfs pubsub sub topic".
  3. Once get the data published by the provider, come to the payment process. You have to pay the exact number of Price set to the right wallet address before next step
  4. After paid, it comes to the name resolve process, which will get the json file.
  5. get the json file, we can get the image file needed.

This is the whole process of what we are doing.

rogerlzp commented 5 years ago

So my point is this solution is fit into usecases like gaming audience stream platform, or studio blog format streams, decentralized tv as well. It doesn't fit into other stream-blog usecases like "instagram stories" or other, where users actually want to make translation exactly from their own phone (not pc)

my skype is rogerlzp. Maybe we can talk on that.

benhylau commented 5 years ago

As @darkdrgn2k pointed out, the video.js player we use work on most mobile browsers, and the backend is a RTMP endpoint, allowing devices (mobile or otherwise) to stream into it. Though the current code does not deal well with changing streams, which could be a problem for mobile type of unreliable connections.

I believe this discussion about another app is out of scope for a ticket in this repo. I am closing this issue as the original questions seems to be addressed.