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.
- Options to upload user encoded versions of source video (240p, 480p, 720p & 1080p).
- Save entered metadata as draft in the browser (I'm surprised that DTube did not implement this in their uploader interface!)
- Library that contains resources for uploader (tutorials, FAQs etc.)
- Migration from SteemConnect login to another more secure auth solution.
- A setup script to install and setup all required dependencies in one terminal command (making it even more user friendly to setup 😉)
- 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.
Want to support us?
Vote @graylan as SMOKE witness!
- Go to https://smoke.io/~witnesses
- Find @graylan on the list and click on the button on the left of the username as shown below