{"id":13468426,"url":"https://github.com/deepjyoti30/ytmdl","last_synced_at":"2025-05-14T05:10:32.206Z","repository":{"id":39176554,"uuid":"137223122","full_name":"deepjyoti30/ytmdl","owner":"deepjyoti30","description":"A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.","archived":false,"fork":false,"pushed_at":"2024-08-15T09:11:15.000Z","size":15877,"stargazers_count":3315,"open_issues_count":26,"forks_count":172,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-05-09T19:24:51.375Z","etag":null,"topics":["apple-music","apple-music-api","cli","ffmpeg","free-software","freemusic","gaana","high-quality-music","id3","itunes","metadata","mp3","music","music-bot","no-ads","song-download","songs","spotify","youtube","youtube-dl"],"latest_commit_sha":null,"homepage":"https://ytmdl.deepjyoti30.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepjyoti30.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"deepjyoti30","custom":["https://www.paypal.me/deepjyoti30"],"patreon":"deepjyoti30","ko_fi":"deepjyoti30"}},"created_at":"2018-06-13T13:57:41.000Z","updated_at":"2025-05-04T11:32:41.000Z","dependencies_parsed_at":"2024-01-12T12:55:13.578Z","dependency_job_id":"f80f9fc7-a612-4857-8ee7-f30037cfddd0","html_url":"https://github.com/deepjyoti30/ytmdl","commit_stats":{"total_commits":605,"total_committers":21,"mean_commits":28.80952380952381,"dds":0.07272727272727275,"last_synced_commit":"d8f288c6a0e9258d073100283c65a2e03a761777"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepjyoti30%2Fytmdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepjyoti30%2Fytmdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepjyoti30%2Fytmdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepjyoti30%2Fytmdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepjyoti30","download_url":"https://codeload.github.com/deepjyoti30/ytmdl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076848,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-music","apple-music-api","cli","ffmpeg","free-software","freemusic","gaana","high-quality-music","id3","itunes","metadata","mp3","music","music-bot","no-ads","song-download","songs","spotify","youtube","youtube-dl"],"created_at":"2024-07-31T15:01:10.580Z","updated_at":"2025-05-14T05:10:32.179Z","avatar_url":"https://github.com/deepjyoti30.png","language":"Python","funding_links":["https://github.com/sponsors/deepjyoti30","https://www.paypal.me/deepjyoti30","https://patreon.com/deepjyoti30","https://ko-fi.com/deepjyoti30","https://opencollective.com/ytmdl","https://www.patreon.com/deepjyoti30"],"categories":["Useful","Python","Command Line Utilities","Overview","HarmonyOS","cli","\u003ca name=\"transfer\"\u003e\u003c/a\u003eData transfer"],"sub_categories":["Internet","YouTube","Windows Manager"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/ytmdl.png\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eYouTube Music Downloader\u003c/h1\u003e\n\u003ch4\u003eDownload songs from YouTube by getting the audio from YouTube and the metadata from sources like Itunes, Spotify, Gaana etc.\u003c/h4\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\" width=\"60%\" height=\"auto\"\u003e\n  \u003cbr\u003e\n    \u003cimg src=\".github/ytmdl.gif\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cbr/\u003e\n\n[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)\u003cbr/\u003e\u003cbr/\u003e\n\u003cimg src=\"https://img.shields.io/badge/Maintained%3F-Yes-blueviolet?style=for-the-badge\"\u003e\n![Travis (.org)](https://img.shields.io/travis/deepjyoti30/ytmdl?style=for-the-badge) ![[RepoStatus](https://repostatus.deepjyoti30.dev)](https://apis.deepjyoti30.dev/repostatus/badge?repo=deepjyoti30%2Fytmdl\u0026style=for-the-badge) [![License](https://img.shields.io/badge/License-MIT-pink.svg?style=for-the-badge)](LICENSE.md) ![PyPI](https://img.shields.io/pypi/v/ytmdl?style=for-the-badge) ![AUR](https://img.shields.io/aur/version/ytmdl?color=red\u0026style=for-the-badge) [![Downloads](https://img.shields.io/badge/dynamic/json?style=for-the-badge\u0026maxAge=86400\u0026label=downloads\u0026query=%24.total_downloads\u0026url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Fytmdl)](https://img.shields.io/badge/dynamic/json?style=for-the-badge\u0026maxAge=86400\u0026label=downloads\u0026query=%24.total_downloads\u0026url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Fytmdl) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-lightblue.svg?style=for-the-badge)](http://makeapullrequest.com) [![Telegram](https://img.shields.io/badge/Telegram-YTMDL-blue.svg?style=for-the-badge)](https://t.me/ytmdl)\n\n\u003cp\u003e\n\u003ca href=\"https://ko-fi.com/deepjyoti30\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/adi1090x/files/master/other/kofi.png\" alt=\"Support me on ko-fi\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n### \\[[Web App](#web-app)] \\[[Why This?](#why-this)] \\[[Support the Project](#support-the-project)] \\[[Installation](#installation)] \\[[Configuration](#configuration)] \\[[WiKi](https://github.com/deepjyoti30/ytmdl/wiki/)]\n\n\u003cbr/\u003e\n\u003c/div\u003e\n\n## Web App\n\nYtmdl also has an web app, you can try it out [here](https://ytmdl.deepjyoti30.dev/)\n\n## Why this?\n\nThis app downloads a song by getting the audio from Youtube sources **using** youtube-dl and then adds song information like\nartist name, album name, release date, thumbnail etc by fetching it from sources like Itunes, Spotify, Gaana and other sources.\n\n**NO**. YoutubeDL doesn't do that. All youtube-dl does is lets you download audio from a video that you specify.\n**This app is not yet another youtube-dl clone.**\n\n## Support the Project?\n\nHelp the development of this project by becoming a backer or a sponsor.\n\n### [Become a Backer](https://opencollective.com/ytmdl#backer)\n\n### [Become a sponsor](https://opencollective.com/ytmdl#sponsor)\n\nIf you like my work, consider buying me a coffee or donating. In case you want to become a patron, join my [Pateron](https://www.patreon.com/deepjyoti30)\n\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://www.paypal.me/deepjyoti30\" target=\"_blank\"\u003e\u003cimg alt=\"undefined\" src=\"https://img.shields.io/badge/paypal-deepjyoti30-blue?style=for-the-badge\u0026logo=paypal\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.patreon.com/deepjyoti30\" target=\"_blank\"\u003e\u003cimg alt=\"undefined\" src=\"https://img.shields.io/badge/Patreon-deepjyoti30-orange?style=for-the-badge\u0026logo=patreon\"\u003e\u003c/a\u003e\n\u003ca href=\"https://ko-fi.com/deepjyoti30\" target=\"_blank\"\u003e\u003cimg alt=\"undefined\" src=\"https://img.shields.io/badge/KoFi-deepjyoti30-red?style=for-the-badge\u0026logo=ko-fi\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Requirements\n\n- Python 3.6.1\n- ffmpeg\n\n## Installation\n\n- [PyPi](#pypi)\n- [Arch Linux](#arch-linux)\n- [Gentoo](#gentoo)\n- [NixOS](#nixos)\n- [Windows](#windows)\n- [Manual](#manual)\n\n### PyPI\n\n```console\npip install ytmdl\n```\n\n\u003e NOTE: System wide installation requires `sudo`\n\n### Arch Linux\n\n`ytmdl` is available in AUR as `ytmdl`. It can be found [here](https://aur.archlinux.org/packages/ytmdl/)\n\n\u003e NOTE: The git version is availble as `ytmdl-git` in AUR.\n\n### Gentoo\n\n`ytmdl` can be installed in Gentoo by the following commands\n\n```console\n# First set up src_prepare-overlay (as root)\nemerge -av --noreplace app-eselect/eselect-repository\neselect repository enable src_prepare-overlay\nemaint sync -r src_prepare-overlay\n# Finally emerge ytmdl (as root)\nemerge -av --autounmask net-misc/ytmdl\n```\n\nAvailable in **src_prepare-overlay** [here](https://gitlab.com/src_prepare/src_prepare-overlay)\n\n### NixOS\n\n`ytmdl` can be installed using Nix with the command\n\n```console\nnix-env -iA nixos.ytmdl\n```\n\n### Windows\n\nYou need to install `ffmpeg` in order for `ytmdl` to work properly. This can be done by downloading the `ffmpeg` binary from [here](https://ffmpeg.org/download.html). Once downloaded, extract the file and find the `ffmpeg.exe` file. Copy the directory's path and add it to PATH in the following way.\n\n```console\nsetx path \"%path%;C:\\your\\path\\here\\\"\n```\n\nOnce `ffmpeg` is installed, install `ytmdl` using the following command\n\n```console\npip install ytmdl --upgrade\n```\n\n\u003e NOTE: You'll need to have Python 3.6.1 or more installed.\n\nOptionally, also install the latest version of `downloader-cli` and `simber` using the following command:\n\n```console\npip install simber downloader-cli --upgrade\n```\n\n### Manual\n\nYou can manually install `ytmdl` by cloning this repository and running the `setup.py` script.\n\n1. Install `setuptools` if it isn't already:\n\n   ```console\n    pip install setuptools\n   ```\n\n1. Clone this repo:\n\n   ```console\n   git clone https://github.com/deepjyoti30/ytmdl\n   ```\n\n1. Move into the `ytmdl` directory and run the `setup.py` script:\n\n   ```console\n   cd ytmdl\n   sudo python setup.py install\n   ```\n\n## Usage\n\n```console\nusage: ytmdl [-h] [-q] [-o OUTPUT_DIR] [--song SONG-METADATA]\n             [--choice CHOICE] [--artist ARTIST] [--album ALBUM]\n             [--disable-metaadd] [--skip-meta] [-m] [--itunes-id ITUNES_ID]\n             [--spotify-id SPOTIFY_ID] [--disable-sort] [--ask-meta-name]\n             [--on-meta-error ON_META_ERROR] [--proxy URL] [--url URL]\n             [--list PATH TO LIST] [--nolocal] [--format FORMAT] [--trim]\n             [--version] [--keep-chapter-name] [--download-archive FILE]\n             [--ignore-chapters] [--ytdl-config PATH] [--dont-transcode]\n             [--filename NAME] [--pl-start NUMBER] [--pl-end NUMBER]\n             [--pl-items ITEM_SPEC] [--ignore-errors] [--title-as-name]\n             [--level LEVEL] [--disable-file] [--list-level]\n             [SONG_NAME ...]\n\npositional arguments:\n  SONG_NAME             Name of the song to download. Can be an URL to a\n                        playlist as well. It will be automatically recognized.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -q, --quiet           Don't ask the user to select songs if more than one\n                        search result. The first result in each case will be\n                        considered.\n  -o OUTPUT_DIR, --output-dir OUTPUT_DIR\n                        The location for the song to be downloaded to. When no\n                        argument is passed, the default locations of SONG_DIR\n                        or XDG_MUSIC_DIR are used.\n  --proxy URL           Use the specified HTTP/HTTPS/SOCKS proxy. To enable\n                        SOCKS proxy, specify a proper scheme. For example\n                        socks5://127.0.0.1:1080/. Pass in an empty string\n                        (--proxy \"\") for direct connection\n  --url URL             Youtube song link.\n  --list PATH TO LIST   Download list of songs. The list should have one song\n                        name in every line.\n  --nolocal             Don't search locally for the song before downloading.\n  --format FORMAT       The format in which the song should be downloaded.\n                        Default is mp3, but can be set in config. Available\n                        options are ['mp3', 'm4a', 'opus']\n  --trim, -t            Trim out the audio from the song. Use underlying\n                        speech and music segmentation engine to determine and\n                        keep only the music in the file. Useful in songs where\n                        there are speeches, noise etc before/after the start\n                        of the song. Default is false.\n  --version             show the program version number and exit\n  --keep-chapter-name   Keep the title extracted from the chapter in order to\n                        search for the metadata. If not passed, the user will\n                        be asked if they'd like to change the title with which\n                        the metadata will be searched.\n  --download-archive FILE\n                        Skip downloading songs that are present in the passed\n                        file. The songs are matched by using the videoId. All\n                        downloaded song Id's are automatically added to the\n                        file.\n  --ignore-chapters     Ignore chapters if available in the video and treat it\n                        like one video\n  --ytdl-config PATH    Path to the youtube-dl config location or the\n                        directory\n  --dont-transcode      Don't transcode the audio after downloading.\n                        Applicable for OPUS format only. (Default: false)\n  --filename NAME       Final filename after the song is ready to be used.\n                        This will be given priority over automatic detection\n                        unless dynamic filename path is set through config\n\nMetadata:\n  --song SONG-METADATA  The song to search in Metadata. Particularly useful\n                        for songs that have the names in a different language\n                        in YouTube. For Example, greek songs.\n  --choice CHOICE       The choice that the user wants to go for. Usefull to\n                        pass along with --quiet. Choices start at 1\n  --artist ARTIST       The name of the song's artist. Pass it with a song\n                        name.\n  --album ALBUM         The name of the song's album. Pass it with a song\n                        name.\n  --disable-metaadd     Disable addition of passed artist and album keyword to\n                        the youtube search in order to get a more accurate\n                        result. (Default: false)\n  --skip-meta           Skip setting the metadata and just copy the converted\n                        song to the destination directory. '--manual-meta'\n                        will override this option, pass only one of them.\n  -m, --manual-meta     Manually enter song details.\n  --itunes-id ITUNES_ID\n                        Direct lookup from itunes. If passed, metadata will be\n                        automatically added.\n  --spotify-id SPOTIFY_ID\n                        Direct lookup for Spotify tracks using the ID. If\n                        passed, metadata will be automatically added.\n  --disable-sort        Disable sorting of the metadata before asking for\n                        input. Useful if the song is in some other language\n                        and/or just a few providers are used.\n  --ask-meta-name       Ask the user to enter a separate name for searching\n                        the metadata (Default: false)\n  --on-meta-error ON_META_ERROR\n                        What to do if adding the metadata fails for some\n                        reason like lack of metadata or perhaps a network\n                        issue. Options are ['exit', 'skip', 'manual',\n                        'youtube']\n\nPlaylist:\n  --pl-start NUMBER     Playlist video to start at (default is 1)\n  --pl-end NUMBER       Playlist video to end at (default is last)\n  --pl-items ITEM_SPEC  Playlist video items to download. Specify indices of\n                        the videos present in the playlist separated by commas\n                        like: '--playlist-items 1, 2, 4, 6' if you want to\n                        download videos indexed 1, 2, 4 and 6. Range can also\n                        be passed like: '--playlist-items 1-3, 5-7' to\n                        download the videos indexed at 1, 2, 3, 5, 6, 7.\n  --ignore-errors       Ignore if downloading any video fails in a playlist.\n                        If passed, the execution will move to the next video\n                        in the passed playlist.\n  --title-as-name       Use the title of the video as the name of the song to\n                        search for metadata. If not passed, user will be asked\n                        if they want to use a different name and continue\n                        accordingly.\n\nLogger:\n  --level LEVEL         The level of the logger that will be used while\n                        verbosing. Use `--list-level` to check available\n                        options.\n  --disable-file        Disable logging to files\n  --list-level          List all the available logger levels.\n\n```\n\n## Configuration\n\n### Setup\n\nThe defaults can be changed by editing the config file in ytmdl folder in your .config folder\n\nThe config will be created automatically the first time you run `ytmdl` and will be present in ~/.config/ytmdl/config\n\nHowever, it can be created manually by the following command\n\n```console\nmkdir -p ~/.config/ytmdl; curl https://raw.githubusercontent.com/deepjyoti30/ytmdl/master/examples/config \u003e ~/.config/ytmdl/config\n```\n\nAbove command will download the config from the repo and save it in the `~/.config/ytmdl/` directory.\n\n### Supported Options\n\nAs of the latest development branch, the following options can be changed from the config\n\n|         Name         | Description                                      | Default                        |\n| :------------------: | ------------------------------------------------ | ------------------------------ |\n|      `SONG_DIR`      | Directory to save the songs in after editing     | Current directory              |\n|    `SONG_QUALITY`    | Quality of the song                              | 320kbps                        |\n| `METADATA_PROVIDERS` | Which API providers to use for metadata          | all supported options are used |\n|   `DEFAULT_FORMAT`   | Default format of the song                       | mp3                            |\n|   `ON_META_ERROR`    | What to do if error occurs while writing meta    | exit                           |\n|   `ITUNES_COUNTRY`   | Which region to use while searching from Itunes  | US                             |\n|  `SPOTIFY_COUNTRY`   | Which market to use while searching from Spotify | US                             |\n\n### Advanced Configuration\n\n#### Dynamically storing songs\n\n`SONG_DIR` field also takes values that are extracted from the song being downloaded\n\nThe `SONG_DIR` field needs to be passed some special values in order to achieve that. The string is scanned and when a `$` sign occurs, the special string will start and each directory can be separated by using an `-\u003e` sign.\n\nTo save the song in the `/dir/\u003calbum_name\u003e/\u003cartist_name\u003e/\u003ctitle\u003e/\u003csong_name\u003e.mp3` format, the following needs to be added in the `SONG_DIR` field.\n\n```\nSONG_DIR=\"/dir$Album-\u003eArtist-\u003eTitle\"\n```\n\nAbove will extract to the following directory structure when a song named `Cradles` by artist `Sub Urban` from the album `Cradles - Single`\n\n```\n|--dir\n   |--Cradles - Single\n      |--Sub Urban\n         |--Cradles\n            |--Cradles.mp3\n```\n\nIn order to pass the name with which the song should be saved, the last attribute can be passed between `[]`.\n\nIf the `SONG_DIR` field is `/dir$Album-\u003e[Artist]` will extract to the following directory structure\n\n```\n|--dir\n   |--Cradles - Single\n      |--Sub Urban.mp3\n```\n\n#### Supported options for dynamic storing\n\nAs of the latest source, the following options can be passed to the special string in order to create dynamic directories\n\n|     Name      |                         |\n| :-----------: | ----------------------- |\n|   `Artist`    | Artist Of the Song      |\n|    `Album`    | Album Of the Song       |\n|    `Title`    | Title Of the Song       |\n|    `Genre`    | Genre Of the Song       |\n| `TrackNumber` | TrackNumber Of the Song |\n| `ReleaseDate` | ReleaseDate Of the Song |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepjyoti30%2Fytmdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepjyoti30%2Fytmdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepjyoti30%2Fytmdl/lists"}