npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yt-dl-ipfs

v0.1.11

Published

Download YouTube videos and upload them to IPFS

Downloads

12

Readme

yt-dl-ipfs

Download and pin yt videos to IPFS.

Pre-Req

IPFS node needs to be running locally, exposing API on port 5001, or run IPFS-Desktop.

Using NPM or yarn

$ npm i -g yt-dl-ipfs     # yarn global add yt-dl-ipfs
$ yt-dl-ipfs
        _            _ _       _        __
  _   _| |_       __| | |     (_)_ __  / _|___
 | | | | __|____ / _` | |_____| | '_ \| |_/ __|
 | |_| | ||_____| (_| | |_____| | |_) |  _\__ \
  \__, |\__|     \__,_|_|     |_| .__/|_| |___/
  |___/                         |_|             v0.1.11


? Enter YouTube URL:

Running With Docker

This Image accepts IPFS_API_URL as an env variable, otherwise defaults to localhost

$ docker run -it whizzzkid/yt-dl-ipfs:latest

Building Uploader locally

Docker

This should be the easiest:

$ docker build --tag whizzkid/yt-dl-ipfs:latest .
$ docker run -it whizzkid/yt-dl-ipfs:latest
> node dist/index.js

        _            _ _       _        __
  _   _| |_       __| | |     (_)_ __  / _|___
 | | | | __|____ / _` | |_____| | '_ \| |_/ __|
 | |_| | ||_____| (_| | |_____| | |_) |  _\__ \
  \__, |\__|     \__,_|_|     |_| .__/|_| |___/
  |___/                         |_|             v0.1.11


? Enter YouTube URL:

Node

Assuming you have node and python installed.

$ npm ci
$ npm run build && npm start
> node dist/index.js

        _            _ _       _        __
  _   _| |_       __| | |     (_)_ __  / _|___
 | | | | __|____ / _` | |_____| | '_ \| |_/ __|
 | |_| | ||_____| (_| | |_____| | |_) |  _\__ \
  \__, |\__|     \__,_|_|     |_| .__/|_| |___/
  |___/                         |_|             v0.1.11


? Enter YouTube URL:

Building Player Locally

Player is static, it's hosted here: https://whizzzkid.github.io/yt-dl-ipfs/#<video_manifest>

But you can build it locally:

$ npm ci
$ npm run dev
> [email protected] dev
> npm-watch
No task specified. Will go through all possible tasks
[build] [nodemon] 2.0.20
[serve] dev-server PID 84697
[serve] player@4000> [serve]
[dev-server] listening at http://127.0.0.1:4000
[build]
src/index.ts → dist...
[build] created dist in 911ms

 → dist/player...
[serve] [nodemon] restarting due to changes...
[serve] [nodemon] starting `npm run -s serve`
[serve] dev-server PID 84706
[serve] player@4000> [serve]
[dev-server] listening at http://127.0.0.1:4000
[build] created dist/player in 805ms
[serve] [nodemon] restarting due to changes...
[build] [nodemon] clean exit - waiting for changes before restart
[serve] [nodemon] starting `npm run -s serve`
[serve] dev-server PID 84713
[serve] player@4000> [serve]
[dev-server] listening at http://127.0.0.1:4000

The player is live: http://127.0.0.1:4000/#<video_manifest>

API

The uploader, first downloads the video and then adds it to IPFS, uses that to generate a manifest which looks like: https://ipfs.io/ipfs/QmWBaCX9cx4JTqGwEE7nW5zur5LCE52YVtb4mFFyY1M2uy

When this CID is provided as the hash to the player, the video gets loaded so the above manifest can be played as https://whizzzkid.github.io/yt-dl-ipfs/#QmWBaCX9cx4JTqGwEE7nW5zur5LCE52YVtb4mFFyY1M2uy

License

TBD

Author

whizzzkid