Coder Social home page Coder Social logo

rycia / python-youtube-downloader Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5.29 MB

A python program built for use in Windows and Visual Studio Code to download and convert entire Youtube playlists from video to audio format.

License: GNU General Public License v3.0

Python 100.00%

python-youtube-downloader's Introduction

python-youtube-downloader

A python program built for use in Windows and Visual Studio Code to download and convert entire YouTube videos and playlists from video to audio format. This script will have you input a URL (playlist or video), download it as a .mp4 at highest quality, and convert it to a .mp3, removing the original .mp4 if remove_source_file (see configuration below) is set to True. Playlists are packaged into a folder with the playlist. The script downloads files to the directory you run it.


The script works essentially as is, excluding this little bit of setup that will not intrude on the preferences you have set for Visual Studio Code (assuming that's what you're using.)

  1. You must pip install pytube from within Visual Studio Code.

  2. You must have ffmpeg installed from https://ffmpeg.org/download.html#build-windows, may be different for other systems. On Windows, you must add the /bin folder within the compressed (zip) folder to the "path" System Enviroment Variable after renaming the containing folder to "ffmppeg" in a rememberable location, which on Windows 10, is changable through running "system enviroment variables" as admin and adding the path to ffmpeg to "path." Screenshots for this is located at https://blog.gregzaal.com/how-to-install-ffmpeg-on-windows/ for older Windows systems, but it is the same for Windows 10, ect. For some people, simply adding the ffmpeg.exe file within /bin/ folder from within the same compressed (zip) folder into the directory the script is ran in will work.


Configuration options exist at the top of the python file.

debug_mode = False             If you want to see FFMPEG output and other info for debugging.

remove_source_file = True      If you want to remove the video (.mp4) file after converting to audio (.mp3).

The reason this exists is because many scripts I've found across the internet have either been so horridly outdated to the point of breaking beyond repair within the bounds of the methods they use are malicious, mostly lackluster to begin with.

DO NOT use this to download copyrighted content! I will not endorse it and heavily discourage it. This script is purely for personal, educational use, archiving, and ultimately uncopyrighted content; such as grabbing uncopyrighted backing tracks and effects for video and audio production. Using this may be against the Terms of Service of YouTube and should used be at your own risk.

python-youtube-downloader's People

Stargazers

 avatar

Watchers

 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.