Getting started guide: Setting up peer-to-peer video podcasts
For Viewers
Get started in about 10 minutes
Make sure it runs in the background. When you download any files via
IPFS, the process continues running so it can distribute that file
to peers too. Hence you don't need a central server.
Be sure to check your package manager for IPFS if you have one.
Install IPFS
2 | Pick any podcast client
Any podcast client will do, but keep in mind some don't support
video. gPodder is a simple client focused on audio and video,
and NewsFlash is an attractive client for articles.
There are many available clients, but you only need one, and you
may already have one installed.
gPodder: audio/video
NewsFlash: text
3 | Find some subscriptions
This may be the hardest part. There's no central server keeping up
with all the channels. So you'll need to find them some other way,
maybe from a friend or another website. Some of these may link to
localhost:8080, which means the feed also has no server, but instead
will run through your IPFS installation.
To get started, try this example as a new feed in your podcast client:
http://localhost:8080/ipns/k2k4r8liyjxanmri70a0rbw7u2dy03078cj4ssijex5cjjizc7628bi5
Creators: Start a channel with
ipfspod
First set yourself up as a Viewer, then follow these steps
1| Install ipfspod and create your channel
If you're on Linux you may already have Python installed.
Otherwise, you can find it on
the Python website
This will create a new directory by the same name,
and fill it with some templates you can change to your liking.
python3 -m pip install ipfspod
python3 -m ipfspod new my-channel-name
cd my-channel-name
2 | Prepare your video
-
Consider encoding your video as
webm,
so anyone can open them, even with Chrome and Firefox, for free.
-
License your work with a
open license
since IPFS depends on people sharing copies.
-
Keep your videos under a few GB so people can still open them on
old devices
If you need to reencode your video, consider Handbrake for an
attractive and easy to use GUI consider, or ffmpeg for a powerful
command line encoder.
Handbrake (GUI)
FFMpeg (CLI)
3 | Add your post and publish your work
There are two steps because publishing can take around a minute.
However, publishing takes about the same amount time regardless
how many videos are involved. Feel free to add many videos and publish
once.
Adding a new post is highly configurable, and if you want to
further customize it, the posts are stored a JSON so they are easy to
edit automatically or manually.
python3 -m ipfspod add . "My Post Title"
python3 -m ipfspod publish .
Creators: Start a channel from scratch
1 | Make a new channel key
IPFS files are immutable, but it does include a name system named
IPNS that allows you to create updatable links. This is the link
you'll give your subscribers so that their clients can check for
updates.
To do this, you create a new cryptographic key. The name is just for
you, so you can keep track of a lot of links if necessary. IPFS will
handle storing the key for you. You may also want to export it and
keep a backup. If you lose it, you will have to give your subscribers
a new link.
ipfs key gen my-channel-name
2 | Summarize the channel
It's called Really Simple Syndication for a reason. Start with this
example and edit it to match your new channel. Then save it as
my-channel-name.xml
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Mooresville Trailcam</title>
<description>A trail camera in the woods of North Carolina</description>
<link>http://localhost:8080/ipns/k2k4r8liyjxanmri70a0rbw7u2dy03078cj4ssijex5cjjizc7628bi5</link>
<copyright>Creative Commons - Attribution</copyright>
<lastBuildDate>Sun, 10 Jan 2021 10:20:00 +0400</lastBuildDate>
<pubDate>Sun, 10 Jan 2021 10:20:00 +0400</pubDate>
<ttl>1800</ttl>
VIDEO DETAILS
</channel>
</rss>
3 | Prepare your video
-
Consider encoding your video as
webm,
so anyone can open them, even with Chrome and Firefox, for free.
-
License your work with a
open license
since IPFS depends on people sharing copies.
-
Keep your videos under a few GB so people can still open them on
old devices
If you need to reencode your video, consider Handbrake for an
attractive and easy to use GUI consider, or ffmpeg for a powerful
command line encoder.
Handbrake (GUI)
FFMpeg (CLI)
4 | Add your video
You'll need to index your new video with ipfs add so
you get a hash you can include in your enclosure link.
At this point your file is technically available on the Internet
but no one can really find it.
ipfs add -Q my-new-video.webm
5 | Add video details
Once you're created the information for your channel, add the videos
you want to share by replacing VIDEO DETAILS with stanzas
like the following, one stanza for each video you want to add.
<item>
<title>Back Wall Trailcam - Mooresville NC</title>
<description>A video slideshow from a trailcam in Mooresville NC</description>
<pubDate>Sun, 10 Jan 2021 16:29:15 -0500</pubDate>
<guid>QmbZNHsJX81WTECJrzeRErc5bfkAcFpFfjoNUTSn1hMr65</guid>
<enclosure
url="http://localhost:8080/ipfs/QmbZNHsJX81WTECJrzeRErc5bfkAcFpFfjoNUTSn1hMr65"
length="35638786"
type="video/webm" />
</item>
6 | Publish your channel
Once you have your file ready, upload your new episode list with
ipfs add and then update your IPNS link with
ipfs name. Now your RSS feed is public and updated!
IPNS is not the fastest algorithm in the world so expect to wait here
for about a minute.
You can also publish with the IPFS desktop app
FEED_HASH=`ipfs add -Q my-channel-name.xml`
ipfs name publish --key my-channel-name $FEED_HASH

Copyright 2021 Sean Gallagher, some rights reserved. This work is licensed under a
Creative Commons Attribution 4.0 International License.