Code Monkey home page Code Monkey logo

yt2mp3's Introduction

๐ŸŽง yt2mp3

๐Ÿ“š Table of Contents

Description

yt2mp3 is a small project cli music downloader from youtube and convert into mp3 using pytube, moviepy and tqdm python libraries.

"Converting YouTube videos on third party websites carries high risks, hackers can embed executable code or scripts within MP3 files. When you play or open such file, it could potentially execute malicious code and compromise your system."

๐Ÿ› ๏ธ Installation

Installing virtual environment

$ sudo apt install python3.11-venv
$ python3 -m pip install virtualenv 
$ python3 -m venv venv 
$ git clone https://github.com/l0n3m4n/yt2mp3.git
$ cd yt3mp3 && source venv/bin/activate
$ pip install -r requirements.txt

โš™๏ธ Usage

$ python3 yt2mp3.py -h, --help

        __   ______                  ______ 
.--.--.|  |_|__    |.--------.-----.|__    |
|  |  ||   _|    __||        |  _  ||__    |
|___  ||____|______||__|__|__|   __||______|
|_____|                      |__|           
                                                                         
        Author: l0n3m4n | โš™๏ธ  v1.1 

usage: yt2mp3.py [-h] [--url URL] [-o OUTPUT]

Download a YouTube video and convert to MP3.

options:
  -h  --help        Show this help message and exit
  -u  --url         YouTube video URL
  -o  --output      Output filename for MP3

Ex: python3 yt2mp3.py -u https://www.youtube.com/watch?v=id -o music_title.mp3
$ python3 yt2mp3.py --url https://www.youtube.com/watch?v=byCgohS7feE --output music_title.mp3
        __   ______                  ______ 
.--.--.|  |_|__    |.--------.-----.|__    |
|  |  ||   _|    __||        |  _  ||__    |
|___  ||____|______||__|__|__|   __||______|
|_____|                      |__|           
                                                                         
        Author: l0n3m4n | โš™๏ธ  v1.1 

๐Ÿ“ฅ Downloading video...
Progress: 100%|############################| 3.67M/3.67M [00:00<00:00, 9.25MB/s]
๐Ÿ’พ Video downloaded.
๐ŸŽต Converting to MP3...
Progress: 0%|##########################################| 0/179.05 [00:07<?, ?s/s]
๐Ÿ’ฝ Conversion complete. MP3 saved at: ./music/music_title.mp3                                                                               
๐Ÿšฎ Temporary video file deleted.

๐Ÿ’ References

  • pytube is a genuine, lightweight, dependency-free Python library (and command-line utility) for downloading YouTube videos.
  • Moviepy allows to extract audio from a video file (like MP4) and save it as an audio file (like MP3).
  • tqdm Instantly make your loops show a smart progress meter - just wrap any iterable with tqdm(iterable), and youโ€™re done!

๐Ÿ“ Todo

  • Adding progress bar
  • Add multiple URL
  • Extract MP3 metadata for investigative purposes
  • Adding song title automatically
  • GUI integration, flask, tkinker
  • UI design, additional features

๐Ÿ“Œ Author

๐Ÿ‘จ๐Ÿพโ€โš–๏ธ License

This project is under terms of the MIT License. For fixing Bugs, create issue

yt2mp3's People

Contributors

l0n3m4n avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.