{"id":13581938,"url":"https://github.com/kkdai/youtube","last_synced_at":"2026-04-02T15:16:03.481Z","repository":{"id":39345069,"uuid":"48026194","full_name":"kkdai/youtube","owner":"kkdai","description":"Download Youtube Video in Golang","archived":false,"fork":false,"pushed_at":"2025-05-06T11:03:14.000Z","size":488,"stargazers_count":3588,"open_issues_count":44,"forks_count":462,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-05-06T11:48:22.580Z","etag":null,"topics":["go","youtube"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/kkdai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2015-12-15T07:15:27.000Z","updated_at":"2025-05-06T11:03:18.000Z","dependencies_parsed_at":"2023-11-07T01:14:43.151Z","dependency_job_id":"1e5463d8-ea60-40d1-837c-079a4f654f7d","html_url":"https://github.com/kkdai/youtube","commit_stats":{"total_commits":391,"total_committers":58,"mean_commits":6.741379310344827,"dds":0.6649616368286445,"last_synced_commit":"23aa415a67479586129084478367c7478ec45878"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Fyoutube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Fyoutube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Fyoutube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Fyoutube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkdai","download_url":"https://codeload.github.com/kkdai/youtube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766037,"owners_count":21960837,"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":["go","youtube"],"created_at":"2024-08-01T15:02:20.238Z","updated_at":"2026-04-02T15:16:03.465Z","avatar_url":"https://github.com/kkdai.png","language":"Go","funding_links":[],"categories":["Go","Uncategorized","Repositories"],"sub_categories":["Uncategorized"],"readme":"Download Youtube Video in Golang\n==================\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/kkdai/youtube/master/LICENSE)\n[![Go Reference](https://pkg.go.dev/badge/github.com/kkdai/youtube.svg)](https://pkg.go.dev/github.com/kkdai/youtube/v2)\n[![Build Status](https://github.com/kkdai/youtube/workflows/go/badge.svg?branch=master)](https://github.com/kkdai/youtube/actions)\n[![Coverage](https://codecov.io/gh/kkdai/youtube/branch/master/graph/badge.svg)](https://codecov.io/gh/kkdai/youtube)\n[![](https://goreportcard.com/badge/github.com/kkdai/youtube)](https://goreportcard.com/badge/github.com/kkdai/youtube)\n\n\nThis package is a Youtube video download package, for more detail refer [https://github.com/ytdl-org/youtube-dl](https://github.com/ytdl-org/youtube-dl) for more download options.\n\nThis tool is meant to be used to download CC0 licenced content, we do not support nor recommend using it for illegal activities.\n\n## Overview\n  * [Install](#installation)\n  * [Usage](#usage)\n  * [Example: Download video from \\[dotGo 2015 - Rob Pike - Simplicity is Complicated\\]](#download-dotGo-2015-rob-pike-video)\n\n## Installation\n\n### Run Manually\n\n```shell\ngit clone https://github.com/kkdai/youtube.git \u0026\u0026 cd youtube\ngo run ./cmd/youtubedr\n```\n\n### Install via Go\n\nPlease ensure you have installed Go 1.26 or later.\n\n```shell\ngo install github.com/kkdai/youtube/v2/cmd/youtubedr@latest\n```\n\n### Mac\n\n```shell\nbrew install youtubedr\n```\n\n### in Termux\n```shell\npkg install youtubedr\n```\n###  You can also find this package in\n- [archlinux](https://aur.archlinux.org/packages/youtubedr/)  (thanks to [cjsthompson](https://github.com/cjsthompson))\n- [Termux package](https://github.com/termux/termux-packages/tree/master/packages/youtubedr) (thanks to [kcubeterm](https://github.com/kcubeterm))\n- [Homebrew](https://formulae.brew.sh/formula/youtubedr) (thanks to [kkc](https://github.com/kkc))\n\n## Usage\n\n### Use the binary directly\nIt's really simple to use, just get the video id from youtube url - ex: `https://www.youtube.com/watch?v=rFejpH_tAHM`, the video id is `rFejpH_tAHM`\n\n```shell\nyoutubedr download rFejpH_tAHM\nyoutubedr download https://www.youtube.com/watch?v=rFejpH_tAHM\n```\n\n\n### Use this package in your golang program\n\nPlease check out the [example_test.go](example_test.go) for example code.\n\n\n## Example:\n * ### Get information of dotGo-2015-rob-pike video for downloading\n\n    Download video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM)\n\n    ```\n    youtubedr info https://www.youtube.com/watch?v=rFejpH_tAHM\n\n   Title: dotGo 2015 - Rob Pike - Simplicity is Complicated\n   Author: dotconferences\n   -----available streams-----\n   itag:  18 , quality: medium , type: video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"\n   itag:  22 , quality:  hd720 , type: video/mp4; codecs=\"avc1.64001F, mp4a.40.2\"\n   itag: 137 , quality: hd1080 , type: video/mp4; codecs=\"avc1.640028\"\n   itag: 248 , quality: hd1080 , type: video/webm; codecs=\"vp9\"\n   ........\n    ```\n * ### Download dotGo-2015-rob-pike-video\n\n    Download video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM)\n\n    ```\n    youtubedr download https://www.youtube.com/watch?v=rFejpH_tAHM\n    ```\n\n * ### Download video to specific folder and name\n\n\tDownload video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM) to current directory and name the file to simplicity-is-complicated.mp4\n\n\t```\n\tyoutubedr download -d ./ -o simplicity-is-complicated.mp4 https://www.youtube.com/watch?v=rFejpH_tAHM\n\t```\n\n * ### Download video with specific quality\n\n\tDownload video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM) with specific quality\n\n\t```\n\tyoutubedr download -q medium https://www.youtube.com/watch?v=rFejpH_tAHM\n\t```\n\n   #### Special case by quality hd1080:\n   Installation of ffmpeg is necessary for hd1080\n   ```\n   ffmpeg   //check ffmpeg is installed, if not please download ffmpeg and set to your PATH.\n   youtubedr download -q hd1080 https://www.youtube.com/watch?v=rFejpH_tAHM\n   ```\n\n\n * ### Download video with specific itag\n\n    Download video from [dotGo 2015 - Rob Pike - Simplicity is Complicated](https://www.youtube.com/watch?v=rFejpH_tAHM)\n\n    ```\n    youtubedr download -q 18 https://www.youtube.com/watch?v=rFejpH_tAHM\n    ```\n\n## How it works\n\n- Parse the video ID you input in URL\n\t- ex: `https://www.youtube.com/watch?v=rFejpH_tAHM`, the video id is `rFejpH_tAHM`\n- Get video information via video id.\n\t- Use URL: `http://youtube.com/get_video_info?video_id=`\n- Parse and decode video information.\n\t- Download URL in \"url=\"\n\t- title in \"title=\"\n- Download video from URL\n\t- Need the string combination of \"url\"\n\n## Inspired\n- [https://github.com/ytdl-org/youtube-dl](https://github.com/ytdl-org/youtube-dl)\n- [https://github.com/lepidosteus/youtube-dl](https://github.com/lepidosteus/youtube-dl)\n- [拆解 Youtube 影片下載位置](http://hkgoldenmra.blogspot.tw/2013/05/youtube.html)\n- [iawia002/annie](https://github.com/iawia002/annie)\n- [How to get url from obfuscate video info: youtube video downloader with php](https://stackoverflow.com/questions/60607291/youtube-video-downloader-with-php)\n\n\n## Project52\nIt is one of my [project 52](https://github.com/kkdai/project52).\n\n\n## License\nThis package is licensed under MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkdai%2Fyoutube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkdai%2Fyoutube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkdai%2Fyoutube/lists"}