Introducing OneLoveDTube IPFS Video Uploader: An alternative way of posting videos onto DTube

9 months ago

Repository

https://github.com/techcoderx/ipfsVideoUploader

Overview

About

OneLoveDTube IPFS video uploader is an alternative uploader that uploads videos onto DTube. The main aim of this project is to create a product that anyone can setup themselves easily, something that is easy to use and most importantly, to create a solution so that content creators have choices of which uploader they want to use to upload their videos, instead of relying on a single upload server.

Although the official DTube devs did release the uploader package, it is difficult to set up, and it only serves as an API (does not come with a UI). As my uploader comes with a UI that is usable, all it will take for them is a few steps to download and run the app, as mentioned in the documentation.

Whether if there's long encoding queues, or DTube's upload server downtime, there's no reason not to upload to DTube, because with the easy to setup and use uploader, anyone can host their own DTube upload servers for the benefit of the entire DTube community. In addition to that, creators who upload using my uploader have a chance of getting curated by DTube curation team, just like any other DTube video. Here's the proof (you can see that the app name in json_metadata is different, and the beneficiaries are different too).

Disclaimer: IPFS Video Uploader does not serve as a replacement of DTube's official uploader.

How it works

My uploader is written using the ExpressJS framework, which is an extension of the popular NodeJS runtime that is designed for web applications. Two pages are included as for the UI - a welcome page and an upload page.

The welcome page included is designed for the @onelovedtube community, that contains has a sign up button (more on that below), and a sign in button that leads users to SteemConnect login. After logging in it redirects the user to the uploader page.

Once the SteemConnect access token is obtained by the user, it uses that to get the associated Steem username on the client side. Then, it's sent to the server to check if it is in the whitelist if the whitelisting system is enabled in config.json to restrict the users that are uploading to their upload servers. If they're not in the list, it disables all the fields in the uploader page and alerts the user about it.

As for handling upload requests, the metadata entered is validated first before making an upload AJAX call. I have decided to use axios framework to handle AJAX calls, and Multer framework for parsing uploads as Multer is well optimised for the Express framework (and written by Express too). After Multer parses the file, it then adds both the source video and thumbnail to the IPFS node (setup within the same server as this uploader), then generates a sprite (which is basically a preview of the video when you scrub through the player), and adds that to IPFS as well. These are handled by ShellJS framework, which is the same framework that I have used in my IPFS Discord Bot to handle pinning requests. Express then returns the resulting IPFS hash for all 3 files (source video, thumbnail and sprite), plus the video file size (in bytes) and video duration (in seconds) to the client.

IPFS pinning will be handled asynchronously, so there will be no queues to wait! Also there will be no video encoding support (NodeJS is not a good choice for compute intensive applications anyway). Encoding needs to be done on the user end (more on that in the roadmap below), as I think that should provide more decentralization for encoding source videos, as well as lowering the overhead cost of running the uploader (together with IPFS node).

Once the client receives the hashes, it then proceed to publish the post onto the Steem blockchain. This is done on client side using SteemConnect API. The transaction is created the same way as DTube's uploader so that it will be identified as a DTube video and may get picked up by their curators. Once it has been successfully published onto the blockchain, it redirects to the watch page of the newly uploaded video, on d.tube.

OneLoveDTube will be running the uploader!

As a community, we are working together to support video content creators on DTube, as well as providing the right tools they need to be successful on DTube. Due to this, we have identified several issues on DTube (upload & playback issues that many have been reporting these days) and decided to create tools like this one.

Since @onelovedtube is responsible for hosting the videos and maintaining the servers (while supporting DTube core devs), the fee structure of using OneLoveDTube's uploader service will have to be changed. After a chat with @heimindanger (and a separate discussion with other OneLoveDTube admins), we have decided to set the beneficiaries to @dtube at 8%, plus a flat fee of $10 USD a month per person to pay for the servers (we're using the included whitelist system to check for paying users). By signing up our $10 USD/month package, the creator will also gain access to HD pinning commands of my IPFS Discord Bot in @onelovedtube discord server. Existing subscribers will gain access to the uploader for free, starting today.

The website is LIVE at https://uploader.oneloved.tube.

Screen Shot 20181026 at 10.40.09 PM.png

Roadmap

  1. Options to upload user encoded versions of source video (240p, 480p, 720p & 1080p).
  2. Save entered metadata as draft in the browser (I'm surprised that DTube did not implement this in their uploader interface!)
  3. Library that contains resources for uploader (tutorials, FAQs etc.)
  4. Migration from SteemConnect login to another more secure auth solution.
  5. A setup script to install and setup all required dependencies in one terminal command (making it even more user friendly to setup 😉)
  6. A mobile app that uploads DTube videos, just like this uploader (not sure if I can make it 🤔)

How to contribute

If you found any ways to improve on the code or found any bugs, feel free to create a pull request on the GitHub repository. You can also contact me on Discord techcoderx#7481 or join @onelovedtube Discord server if you have any enquiries.

Github account

https://github.com/techcoderx


Want to support us?

Vote @graylan as SMOKE witness!
  1. Go to https://smoke.io/~witnesses
  2. Find @graylan on the list and click on the button on the left of the username as shown below



Get 4.2 Free Smoke Power On Sign Up To Start Your Journey On Smoke! The First Cannabis Community That Pays You To Post And Curate Content You Love..
Sort Order:  Trending

Great work tech :)

·

Look at youuuu. The no queue part would kill it! Hope it's going to go well!

Hey Tech, this uploader is really great, I tried it for the first time tonight and was extremely pleased with how it worked, I will post the video how I did it, and how easy it was tomorrow, you will like it i think :) thanks for the hard work, this is a huge contribution to DTube!

·

Will love to see all your reviews of the service! Remember it's not just me - it's the community that also contributed (domain, servers, and even feedback on code improvements) 😉

·
·

Will do some small edits and get it posted tomorrow ...i have some business to attend to in the fiat world tomorrow so i will do my best. you will hear on my video the credit we gave to the community and you as well, we all work together here and this is what I love so much, everyone learns and grows and the community benefits as a result, everyone who works hard wins!

·

Also I heard that you recorded the whole uploading process?

·
·

yes i did. there was really no uploading process to be honest, i could have made a 2 minute video and it would have been done its just that fast and easy, so of course Graylan and I had to talk about other things while we have the attention :))

Neat! Is there a reason we're even still using dtube?
ipfs is fiiiiine by itself imo.

·

dtube is an online video platform. ipfs is just for file storage 😉

·
·

Right, so do we need an antiquated portal to file storage?
I can count the number of videos I've found on dtube with my anus because it's 0.

I'm having a hard time seeing how dtube isn't a worthless revenue hog. smoke.io would surpass dtube easily if they allowed playing mp4 ipfs videos directly.