Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whizzzkid/yt-dl-ipfs
Download from youtube and pin to IPFS, ships with a static webplayer
https://github.com/whizzzkid/yt-dl-ipfs
ipfs ipfs-web youtube-dl youtube-downloader youtube-uploader yt-dlp yt-dlp-wrapper yt-downloader
Last synced: 5 days ago
JSON representation
Download from youtube and pin to IPFS, ships with a static webplayer
- Host: GitHub
- URL: https://github.com/whizzzkid/yt-dl-ipfs
- Owner: whizzzkid
- Created: 2022-12-09T07:16:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T05:25:16.000Z (8 months ago)
- Last Synced: 2024-12-16T16:54:39.866Z (9 days ago)
- Topics: ipfs, ipfs-web, youtube-dl, youtube-downloader, youtube-uploader, yt-dlp, yt-dlp-wrapper, yt-downloader
- Language: TypeScript
- Homepage: https://yt-dl-ipfs.live
- Size: 1.12 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
[comment]: # (x-release-please-start-version)
# [yt-dl-ipfs](https://github.com/whizzzkid/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](https://github.com/ipfs/ipfs-desktop).
## Using NPM or yarn
```sh
$ 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
```sh
$ docker run -it whizzzkid/yt-dl-ipfs:latest
```## Building Uploader locally
### Docker
This should be the easiest:
```sh
$ 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.
```sh
$ 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/#`
But you can build it locally:
```sh
$ npm ci
$ npm run dev
> [email protected] dev
> npm-watch
```
[comment]: # (x-release-please-end)
```sh
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/#`
## 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](https://github.com/whizzzkid)