{"id":19364350,"url":"https://github.com/davidfstr/youtube-itunes-sync","last_synced_at":"2025-08-02T16:12:09.420Z","repository":{"id":5868167,"uuid":"7085401","full_name":"davidfstr/YouTube-iTunes-Sync","owner":"davidfstr","description":"Syncs a YouTube music playlist with iTunes.","archived":false,"fork":false,"pushed_at":"2013-04-24T15:26:19.000Z","size":226,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T20:05:26.736Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidfstr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-10T00:22:46.000Z","updated_at":"2019-01-10T04:39:40.000Z","dependencies_parsed_at":"2022-08-31T17:14:16.736Z","dependency_job_id":null,"html_url":"https://github.com/davidfstr/YouTube-iTunes-Sync","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfstr%2FYouTube-iTunes-Sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfstr%2FYouTube-iTunes-Sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfstr%2FYouTube-iTunes-Sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfstr%2FYouTube-iTunes-Sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidfstr","download_url":"https://codeload.github.com/davidfstr/YouTube-iTunes-Sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250451609,"owners_count":21432854,"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":[],"created_at":"2024-11-10T07:37:10.952Z","updated_at":"2025-04-23T14:30:47.951Z","avatar_url":"https://github.com/davidfstr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube-iTunes Sync 1.0\n\nSynchronizes a YouTube music playlist with iTunes. Once synchronized with iTunes they become available on your iPhone and other Apple devices.\n\nThis is useful if you have a YouTube playlist full of music or music videos and want to be able to play them anywhere.\n\n**NOTE:** This project is no longer being maintained.\nIt is recommended that playlists be downloaded manually with\n[youtube-dl](https://github.com/davidfstr/YouTube-iTunes-Sync/wiki/Downloading-a-playlist-with-youtube-dl).\nThen syncing with iTunes is sufficiently easy to do by hand.\n\n## Requirements\n\n* Mac OS X 10.7+ (Lion)\n    * 10.6 (Snow Leopard) probably works too, but I have not tested this.\n* iTunes 10+\n    * Probably any iTunes version works, but this is the one I have tested.\n* Python 2.6\n    * This is included with the above Mac OS X version.\n\nAnd additionally:\n\n* **youtube_dl** installed in your `PYTHONPATH`.\n    * You will need to download a source package from the [youtube-dl Github page]. The binary version on the main youtube-dl website is not sufficient\n    * The [2012.11.29] version is recommend, since it has been tested.\n* **ffmpeg** and **ffprobe** commands installed in your system `PATH`\n    * You will probably need to [compile ffmpeg] to get **ffprobe**, since\n      it is typically not included in binary distributions of ffmpeg.\n\n[youtube-dl Github page]: https://github.com/rg3/youtube-dl/tags\n[2012.11.29]: https://github.com/rg3/youtube-dl/archive/2012.11.29.zip\n[compile ffmpeg]: http://ffmpeg.org/trac/ffmpeg/wiki/MacOSXCompilationGuide\n\n## Usage\n\n```\n./sync_youtube_to_itunes.py \u003cYouTube-Playlist-URL\u003e \u003cDirectory-Path\u003e \u003ciTunes-Playlist-Name\u003e\n```\n\nFor example:\n\n```\n./sync_youtube_to_itunes.py http://www.youtube.com/playlist?list=PL5F93ED354981399F /Users/davidf/Music/YT-Music YT-Music\n```\n\n### Multi-Step\n\nOr, if you would like to perform the synchronization in two steps for some reason:\n\n```\n./sync_youtube_to_filesystem.py \u003cYouTube-Playlist-URL\u003e \u003cDirectory-Path\u003e\n\n./sync_filesystem_to_itunes.py \u003cDirectory-Path\u003e \u003ciTunes-Playlist-Name\u003e\n```\n\n## Special Features\n\n* Handles **[Video Deleted]** items in YouTube playlists\n* Unicode support (for playlist item titles and similar)\n\n## Design\n\nHere's how the script works:\n\n* YouTube playlists are downloaded to the local filesystem using the excellent [youtube_dl] library. An invisible `.ordering` file tracks the original order of downloaded items.\n    * The youtube-dl library is maintained independently by the community and is regularly updated when YouTube changes their unofficial APIs.\n* Downloaded videos are converted to the MP4 (AAC) format that iTunes expects using [ffmpeg].\n* iTunes playlists are manipulated using the actual iTunes application via Apple Events sent by the [osascript] tool (available only on Mac OS X).\n    * This is much safer than the alternative approach of editing the existing the iTunes Library XML file directly.\n\n\n[youtube_dl]: http://rg3.github.com/youtube-dl/\n[ffmpeg]: http://ffmpeg.org\n[osascript]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/osascript.1.html\n\n## Wishlist\n\nSome improvements I would like to make:\n\n* Better error handling.\n    * Complain if ffmpeg \u0026 ffprobe are not installed.\n    * Compiain if the specified filesystem directory does not exist.\n* Simplify installation by providing a binary distribution.\n    * It is cumbersome to require users to install youtube_dl, ffmpeg, and ffprobe manually.\n* Improve marketing by creating a custom website (likely via GitHub Pages).\n* \u0026#x2606; Sync the YouTube thumbnail to iTunes as album art.\n* Support syncing full *videos* from YouTube playlists to iTunes (in addition to the audio track).\n    * For videos unavailable in an iTunes-friendly format (i.e. MP4/M4V), ffmpeg or HandBrakeCLI could be used to transcode videos.\n* \u0026#x2606; Download video metadata (ex: title, description, etc) for archival purposes.\n* \u0026#x2606; If a video becomes **[Video Deleted]** on YouTube, preserve the downloaded version of the video (if available).\n* Improved support for Python 2.6.\n    * Fix deprecation warning related to [BaseException.message](http://stackoverflow.com/questions/1272138/baseexception-message-deprecated-in-python-2-6).\n\nStarred items (\u0026#x2606;) are my personal most-wanted improvements.\n\n## License\n\nThis software is freeware. For details, see the [LICENSE] file.\n\n[LICENSE]: https://github.com/davidfstr/YouTube-iTunes-Sync/blob/master/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidfstr%2Fyoutube-itunes-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidfstr%2Fyoutube-itunes-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidfstr%2Fyoutube-itunes-sync/lists"}