Skip to content

ricksterhd123/ytmp3-cloud

Repository files navigation

ytmp3 cloud

The cloud-based YouTube to mp3 host/converter

Overview

alt text

Prerequisites

  • bash
  • wget
  • docker
  • make
  • awscli (with admin account)
  • samcli

Setup

Choose a unique bucket name

echo ytmp3-cloud-"$(tr -dc a-z0-9 </dev/urandom | head -c 13 ; echo '')"

Set YTMP3_STORE_BUCKET_NAME in scripts/deploy.sh

Run the deploy script

make

Clean

Clean up build files during or after development

make clean

Destroy

Run the destroy script

make destroy

REST API

The REST API URL will be Ytmp3ApiUrl, output from ./scripts/deploy.sh

GET /mp3/{videoId}

400 Invalid videoId

{
    "error": "Invalid videoId"
}

400 Download failed

{
    "error": "Failed to download #########, please try again later",
}

200 Download pending

{
    "videoId": "#########",
    "status": "PENDING",
    "updatedAt": "2023-04-23T19:27:44.850Z",
    "createdAt": "2023-04-23T19:27:44.850Z"
}

200 Download complete

{
    "videoId": "#########",
    "status": "COMPLETE",
    "url": "https://##########.s3.#########.amazonaws.com/0Sl5-Cl6LOo.mp3",
    "updatedAt": "2023-04-23T19:27:44.850Z",
    "createdAt": "2023-04-23T19:27:44.850Z"
}

Contributors

Contributions are most welcome, please feel free to submit a PR!

Credits