/yt-aws-saver

A simple CLI to upload youtube videos directly to Aws S3 using Node.js streams

Primary LanguageTypeScript

Youtube AWS saver

Demo

yt-aws-saver.mp4

Motivation

This project was created as a study case to understand more about streams, threads, queues, workers, concurrency and parallelism in Node.js.

Key words: Study Case · Streams · Threads · Queues · Workers · Concurrency · Parallelism · Node.js · BullMQ · Typescript · Aws S3 · Docker · Redis

How to use

Requerimentos

Inside the code

  1. Clone the repository (suggest to use ssh)
git clone https://github.com/henriq4/yt-aws-saver.git
  1. Install the project dependencies
pnpm i
  1. Configure aws credentials (optional)
/* src/config/aws/index.ts */

const awsCredentials = {
  credentials: {
    accessKeyId: "your access key id",
    secretAccessKey: "your secret access key",
  },
  region: "your region",
  bucket: "bucket to save downloaded videos",
};

export { awsCredentials };

2. Run the cli

pnpm dev <video url>

Roadmap

  • Download video
  • Typescrip typing
  • Upload video to Aws S3 service
  • Send video directly without save localy
  • Use chunks to work in parallel
  • Get video by Node.js argvs
  • Name uploaded video to video received name
  • Script to change aws credencials with is example configuration
  • Apply queues and workers to receive more than one video (currently working...)
  • Generate binary bundle with cli application
  • Creating unitary tests

Author


@henriq4