Preventing your Dtube Vids from disappearing, aka, hosting a node!

in #izlude6 years ago (edited)

So you decided to ditch Youtube... (permanently for me) yet you find that some of your videos on Dtube disappear over time. Let's be honest, it sucks having a channel with thumbnail links that don't work anymore. It confuses audiences and discourages others from wanting to use Dtube. We can fix this!!! Use these instructions, courtesy of Nannal from Dtube's Reddit.

This tutorial is specifically for Windows. If I find simpler methods for other platforms, I may post them as well.
Please read the article I wrote UNDER the instructions for more details on what's going on here.  

INSTRUCTIONS
-Download this:  https://dist.ipfs.io/go-ipfs/v0.4.13/go-ipfs_v0.4.13_windows-amd64.zip
I believe it's current, Nannal gave it to me, maybe check for updates in the future...  

-Extract it, to a folder that makes sense.
I put it on my external drive like F:\Crypto\go-ipfs  

-Open the folder, hold down shift and right click. Then click "open a command window here".
This may not work for some, I had to open CMD from start menu, then navigate by typing:
f:
cd crypto
cd go-ipfs  


-You'll need TWO of those CMD's open, same paths as described above..
In the first we'll run: ipfs init   and then   ipfs daemon  

We have now created an ipfs node and started its daemon process so that it can access files from the network. Put the files you'll want to store in the same directory as your ipfs.exe (you can specify fill paths, but this is easier for a beginner). Me personally, I made a videos and images directories and put my things them...

-Now switch over to your other command window. Then run ipfs add yourfile.mp4  
(or ipfs add videos\yourfile.mp4 if you used a folder named videos to organize)  

This will pin your file and provide you with a hash (It'll look like "Qmsome3text5and7numbers"), you can then copy the hash and put it into the advanced tab on the form here    

Do this for all your different video resolutions and your snap (the image that's displayed at the start of the video). Once all those fields are populated, press submit. Your video will now be playable on Dtube.
-------------------------------------------------------------------------

Alright folks, thanks for joining me here.  The following will attempt to break down the process and I'll add my two cents towards the end.

If you're a hobbyist/youtuber who just wants to post a video for the lulz, just pin 1 file and put the same hash on both source and 480p. You'll save a LOT of disk space that way.  If you're a Youtube channel moving to Dtube, then yeah, I would consider both 480p and 720p renders. Obviously you'll have to go into your video editor and render all the different resolutions.

Pin your own snap (JPG thumbnails) and put the hash in the appropriate field.

Now the thing about Sprite, File Size, Video Duration... these are not required, however if you wanna do things properly, go ahead and fill them out. Here's a shortcut. Upload your video the old fashioned way by clicking the upload box and selecting your file, let it process, but don't post yet. Take a snap, save it, then pin it.  Enter your title, description, tags, and then go over to Advanced tab. Delete source, 240p, 480p, 720p and snap hashes, then plug in your custom pinned hashes. IMPORTANT.  Click the little arrow icon next to Sprite.  Download the large image (sprite sheet) and pin that too, then put your custom pinned hash for sprite in the appropriate field. THEN post... BINGO! All done! well almost... head over to steemit, edit your blog post that corresponds to the video, and plug in the snap hash where it says  "undefined"  to fix the broken thumbnail.  I don't know why this happens, but it's no biggy...easy fix.

So... how does this all work anyway? Why bother? Well, when you upload a video the old way (drop a file, post) the only existing copy of that video is sent to the IPFS network's cache, where the public may request to view it via Dtube.  If that video doesn't get enough views, the network will drop it and it can no longer be viewed.

By hosting your own node and pinning your files, you are providing the IPFS network with a master copy that it can reference at any time. Even if the network drops your video from not being viewed for a while, all someone has to do is attempt to view it again later on, and the network will receive another copy of your file from you (provided that you ARE online at that time).  I'm also told that you may have to play the part of "streaming host" if your video is not viewed a lot (about 5 times a month),  but don't worry, if your video suddenly gets a surge of views, the network will take over and do the streaming from its cache instead of you.

Now, like most of us, you may notice that your channel has a bunch of dead uploads... I'm sorry there's nothing you can do about those, except sweep them under the rug.... I'm praying that Steemit or Dtube gives us the option to manually HIDE these (since you can't delete stuff from steemit if it's been voted on already, or old).  The best you can do is this:  If your Dtube vid is not so old and you find that you can still edit the hash, go ahead and use your existing uploads and plug in the new pinned hash. That way you won't have to upload a clone video (of a working pinned video) while also having an old expired video on the same channel... Use what you have. And if some are too old, leave them alone...

Remember, lots and LOTS of people want to migrate to Dtube.  We are early adopters and the current content providers.  You DON'T want people to see that most videos don't work because they're expired, that is very off putting and discouraging.  Go ahead and get your node started and pin your videos.  Keep Dtube alive.  By the time the masses come, they'll see a whole site filled with working videos because you took the time to make a node!  We are a new internet, there's lots of bandwidth, USE IT! ;)

Sort:  

Even better if you can run an IPFS node on a VPS.

excellent! hey i do have a question though :O how do i pin other people's content? with their existing hash.. is there a specific command line for it?

Yes.

ipfs pin add (hash)

I do this all the time, works for directories too.

ipfs pin add QmU3zLTYK9rLuqcHZDUoYLQeVaJv7MPHKF54FYyfKmt3z7

pinned QmU3zLTYK9rLuqcHZDUoYLQeVaJv7MPHKF54FYyfKmt3z7 recursively

https://ipfs.io/ipfs/ (paste your hash here)

I discovered by accident that if you put an index.htm file in the directory it works the same as a static web server.

this is great stuff, i do have a question though.... after i download the file from the ipfs iso (paste your hash here) thing... and put it in my directory, can I somehow place that hash file into another directory and re-pin it from that folder? just to keep the main directory clear, if not that's fine.

Sure, create a directory, (or several) in your main directory and organize it however you like.

IPFS has deduplication, which means you can have the same file in multiple locations, and it will only be stored once.

sorry to bug you but tried pinning like you exampled... HOW LONG does it take... cause Either it takes forever or my CMD hangs every time i try to pin..

Glad to see your post.

I've developed a bot that automaticaly pin dtube (480p) content based on tag.
I'm currently running it on the #fr (french).

You can manually add content with the dtube url and delete it with the pinset.

More info :
https://steemprojects.com/projects/p/dtube-community-support/

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64014.44
ETH 3064.06
USDT 1.00
SBD 3.86