python script for getting mp3 files from yaoutube playlist

Overview

mp3-from-youtube-playlist

python script for getting mp3 files from youtube playlist.

Do your non-tech brown relatives ask you for downloading music from the internet and upload it to their mobile phones? You can't say no to them because you love them? Look no further, you are in the right repo xD

Overview

It's a simple pytube and moviepy implementation. It retrieves the URLs of the videos of the playlist and converts them to mp3 upon downloading.

Prerequisites

  • You will need have Python3
  • Setup virtualenv and install dependencies from req.txt
your_pc$ virtualenv -p /usr/bin/python3 venv
your_pc$ source venv/bin/activate
(venv)your_pc$ pip install -r req.txt

Running

Your Youtube playlist URL might look like this,

https://www.youtube.com/watch?v=oJ4YxVC9xk4&list=PLDfKAXSi6kUau7d9DcU2v9u7xwmSqlCyB

Extract the playlist id from the query parameter of the URL. here, it's in the 'list='. After that, run below command from terminal adding the ID as argument.

(venv)your_pc$ python main.py -ID PLDfKAXSi6kUau7d9DcU2v9u7xwmSqlCyB

Project Organization

├── README.md          <- The top-level README for developers using this project.
│
├── download           <- Directory for downloaded mp3 files
│
├── req.txt            <- The requirements file for python environment
│
│── .gitignore         <- you know what this is :P
│
├── main.py            <- contains the python script

Inspiration

https://medium.com/@mklaben15/using-python-to-download-a-youtube-playlist-and-convert-to-mp3-for-a-custom-spotify-library-87ab950958a7

You might also like...
Using python to generate a bat script of repetitive lines of code that differ in some way but can sort out a group of audio files according to their common names

Batch Sorting Using python to generate a bat script of repetitive lines of code that differ in some way but can sort out a group of audio files accord

Python I/O for STEM audio files
Python I/O for STEM audio files

stempeg = stems + ffmpeg Python package to read and write STEM audio files. Technically, stems are audio containers that combine multiple audio stream

This is a python package that turns any images into MIDI files that views the same as them

image_to_midi This is a python package that turns any images into MIDI files that views the same as them. This package firstly convert the image to AS

convert-to-opus-cli is a Python CLI program for converting audio files to opus audio format.

convert-to-opus-cli convert-to-opus-cli is a Python CLI program for converting audio files to opus audio format. Installation Must have installed ffmp

A python program for visualizing MIDI files, and displaying them in a spiral layout
A python program for visualizing MIDI files, and displaying them in a spiral layout

SpiralMusic_python A python program for visualizing MIDI files, and displaying them in a spiral layout For a hardware version using Teensy & LED displ

This Bot can extract audios and subtitles from video files

Send any valid video file and the bot shows you available streams in it that can be extracted!!

Users can transcribe their favorite piano recordings to MIDI files after installation
Users can transcribe their favorite piano recordings to MIDI files after installation

Users can transcribe their favorite piano recordings to MIDI files after installation

Carnatic Notes Predictor for audio files

Carnatic Notes Predictor for audio files Link for live application: https://share.streamlit.io/pradeepak1/carnatic-notes-predictor-for-audio-files/mai

Code to work with wave files!

Code to work with wave files!

Comments
  • Add video download from url

    Add video download from url

    I really like your script, but I ended up wanting to download specific songs without the overhead of a playlist. So I modified the code a bit, added the -URL and --video_url parameters and also a colored error message if none of the needed params -ID and -URL were given.

    opened by tuc0w 0
Owner
Shuhan Mirza
Software Engineer | Blockchain Developer | Love Hardware Interfacing
Shuhan Mirza
nicfit 425 Jan 1, 2023
Read music meta data and length of MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave files with python 2 or 3

tinytag tinytag is a library for reading music meta data of MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave files with python Install pip install tinytag

Tom Wallroth 577 Dec 26, 2022
Read music meta data and length of MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave files with python 2 or 3

tinytag tinytag is a library for reading music meta data of MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave files with python Install pip install tinytag

Tom Wallroth 435 Feb 17, 2021
A python program to cut longer MP3 files (i.e. recordings of several songs) into the individual tracks.

I'm writing a python script to cut longer MP3 files (i.e. recordings of several songs) into the individual tracks called ReCut. So far there are two

Dönerspiess 1 Oct 27, 2021
Library for working with sound files of the format: .ogg, .mp3, .wav

Library for working with sound files of the format: .ogg, .mp3, .wav. By work is meant - playing sound files in a straight line and in the background, obtaining information about the sound file (author, performer, duration, bitrate, and so on). Playing goes through the pygame, and getting information through the mutagen.

Romanin 2 Dec 15, 2022
A python script that can play .mp3 URLs upon the ringing or motion detection of a Ring doorbell. The sound plays through Sonos speakers.

Ring x Sonos A python script that plays .mp3 files whenever a doorbell is rung or a doorbell detects motion. Features Music! Authors @braden Running T

braden 0 Nov 12, 2021
Improved Python UI to convert Youtube URL to .mp3 file.

YT-MP3 Improved Python UI to convert Youtube URL to .mp3 file. How to use? Just run python3 main.py Enter the URL of the video Enter the PATH of where

null 8 Jun 19, 2022
An app made in Python using the PyTube and Tkinter libraries to download videos and MP3 audio.

yt-dl (GUI Edition) An app made in Python using the PyTube and Tkinter libraries to download videos and MP3 audio. How do I download this? Windows: Fi

null 1 Oct 23, 2021
Synchronize a local directory of songs' (MP3, MP4) metadata (genre, ratings) and playlists with a Plex server.

PlexMusicSync Synchronize a local directory of songs' (MP3, MP4) metadata (genre, ratings) and playlists (m3u, m3u8) with a Plex server. The song file

Tom Goetz 9 Jul 7, 2022
Extract the songs from your osu! libary into proper mp3 form, complete with metadata and album art!

osu-Extract Extract the songs from your osu! libary into proper mp3 form, complete with metadata and album art! Requirements python3 mutagen pillow Us

William Carter 2 Mar 9, 2022