This is youtube video/playlist downloader
backend: python fast-api frontend: svelte-kit
clone repo and Install the dependencies...
cd youtube-dl
npm install
create python virtual environment and install requiremennts
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
run backend
API_KEY=YOUR_YOUTUBE_API_KEY uvicorn backend:app --reload
start frontend
npm run dev
Navigate to localhost:3000. You should see your app running.
ffmpeg is needed when downloading resolutions other than 360p or 720p
because the video and audio have to be first downloaded seperately and later merge together using ffmpeg
you might want to create a /.env file in root of this project
In it write
VITE_SERVER_ENPOINT=http(s)://your_server_endpoint
To create an optimised version of the app:
npm run build
You can run the newly built app with npm start
.
you might want to a .env file in /backend/
In it write
API_KEY=your_youtube_api_key
you can use gunicorn as a manager for uvicorn
source env/bin/activate
pip install gunicorn
now run backend with gunicorn
gunicorn backend:app -w 4 -k uvicorn.workers.UvicornWorker
preview