Giter Site home page Giter Site logo

simpar1471 / youtube-dl-to-itunes Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 29 KB

Python/powershell mashup that downloads songs from YouTube with pytube, converts them to mp3 with moviepy, edits their metadata with mutagen, then adds them to your iTunes library.

PowerShell 4.90% Python 95.10%

youtube-dl-to-itunes's Introduction

youtube-dl-to-itunes

Download mp4s from YouTube.com, convert the resulting mp4 to mp3, then attribute these mp3s with user-provided metadata. If desired, automatically play your songs in iTunes for future use. Utilises the Python packages pytube, moviepy and mutagen. Provided in the public domain, etc. etc., so copy/modify as you wish. Written for Windows in Python 3.9 and Powershell.

USAGE

To use on Windows:

  1. Populate a folder with text files formatted as follows:

    1. Downloading an album as separate videos:
      ALBUM_NAME : ARTIST_NAME
      SONG1_NAME : SONG1_URL
      SONG2_NAME : SONG2_URL
      SONG3_NAME : SONG3_URL
      
    2. Downloading an album using a playlist:
      ALBUM_NAME : ARTIST_NAME : PLAYLIST_URL      
      SONG1_NAME : SONG1_START
      SONG2_NAME : SONG2_START
      SONG3_NAME : SONG3_START
      
    3. Downloading an album from a single video with timestamps:
      ALBUM_NAME : ARTIST_NAME : VIDEO_URL : ALBUM_RUNTIME
      SONG1_NAME : SONG1_START
      SONG2_NAME : SONG2_START
      SONG3_NAME : SONG3_START
      
  2. Open (or install + open) Powershell and run the following command:

    Set-ExecutionPolicy RemoteSigned
    
  3. Install pytube, moviepy and mutagen using pip:

       pip install pytube moviepy mutagen
    
  4. Download iTunes if you want youtube-dl-to-itunes.py to open your new mp3 files in iTunes.

  5. Download youtube-dl-to-itunes.py, place it in this folder, and run it. By default it will both attempt to download your mp3s to the home Music folder (i.e. C:\Users\CURRENTUSER\Music) open iTunes.

For security:

When you no longer want Powershell scripts to run, use Set-ExecutionPolicy Restricted in Powershell.

DESCRIPTION

Benefits: This script is a lightweight method by which to download songs from YouTube and incorporate them into your iTunes library. Each text file takes up ~1kb, so you can transiently store 50 albums as just 50kb before running this script.

Limitations: Lacks the spotify-based metadata retrieval employed by projects like spotDL, or the thorough functionality of tools like youtube-dl. The script is not as optimised as I'd like, which may be addressed in future commits. Currently, it's as functional as I need it.

Disclaimer:

I do not condone music piracy ๐Ÿดโ€โ˜ ๏ธ. Use this tool to retrieve albums you have in physical format, or for tracks for which no other distribution method exists.

youtube-dl-to-itunes's People

Contributors

simpar1471 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.