All Projects → kkdai → Youtube

kkdai / Youtube

Licence: mit
Download Youtube Video in Golang

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Labels

Projects that are alternatives of or similar to Youtube

Youtube Local
browser-based client for watching Youtube anonymously and with greater page performance
Stars: ✭ 112 (-94.28%)
Mutual labels:  youtube
Youtube player
A flutter plugin to play Youtube Videos without API Key in range of Quality(144p, 240p,360p,480p,720p and 1080p).
Stars: ✭ 118 (-93.97%)
Mutual labels:  youtube
Recfluence
An analysis of YouTube's political influence through recommendations.
Stars: ✭ 121 (-93.82%)
Mutual labels:  youtube
Mmusiccast
Chromecast emulator that works on any platform. Stream videos from youtube to raspberry pi or any computer with the chromecast protocol.
Stars: ✭ 113 (-94.23%)
Mutual labels:  youtube
Youtube Desvendando Css Grid
Project created for the video about CSS Grid
Stars: ✭ 116 (-94.08%)
Mutual labels:  youtube
Vime
Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
Stars: ✭ 1,928 (-1.53%)
Mutual labels:  youtube
Ytfzf
A posix script to find and watch youtube videos from the terminal. (Without API)
Stars: ✭ 2,212 (+12.97%)
Mutual labels:  youtube
Youtube desktop
The desktop Youtube Application built using Electron. (In development)
Stars: ✭ 123 (-93.72%)
Mutual labels:  youtube
Audiojack Gui
🎧 A YouTube-to-MP3 converter that automatically finds and adds ID3 tags to downloaded MP3 files.
Stars: ✭ 116 (-94.08%)
Mutual labels:  youtube
Youtubedownloader
Downloads videos and playlists from YouTube
Stars: ✭ 2,202 (+12.46%)
Mutual labels:  youtube
Sonos Web
Web interface for Sonos audio systems
Stars: ✭ 114 (-94.18%)
Mutual labels:  youtube
Ytmdl
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.
Stars: ✭ 2,070 (+5.72%)
Mutual labels:  youtube
Youtube Comment Suite
Download YouTube comments from numerous videos, playlists, and channels for archiving, general search, and showing activity.
Stars: ✭ 120 (-93.87%)
Mutual labels:  youtube
Tizonia Openmax Il
Command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, iHeartRadio, Plex servers and Chromecast devices.
Stars: ✭ 1,556 (-20.53%)
Mutual labels:  youtube
Alltube
Web GUI for youtube-dl
Stars: ✭ 1,925 (-1.69%)
Mutual labels:  youtube
Testable Nodejs Api
Código da série Node.js API testável disponivel no meu canal no youtube
Stars: ✭ 110 (-94.38%)
Mutual labels:  youtube
Awesome Gsoc Roadmap
A comprehensive curated list of available GSOC 2020 Guides, Write-ups and Tutorials 🤠 🏆
Stars: ✭ 119 (-93.92%)
Mutual labels:  youtube
Youtubeexplode
The ultimate dirty YouTube library
Stars: ✭ 1,775 (-9.35%)
Mutual labels:  youtube
Youtube Scrape
Scrape YouTube searches (API)
Stars: ✭ 122 (-93.77%)
Mutual labels:  youtube
Alltomp3
Node module to download and convert in MP3 with tags an online video
Stars: ✭ 120 (-93.87%)
Mutual labels:  youtube

Download Youtube Video in Golang

GitHub license Go Reference Build Status Coverage

This package is a Youtube video download package, for more detail refer https://github.com/ytdl-org/youtube-dl for more download options.

This tool is meant to be used to download CC0 licenced content, we do not support nor recommend using it for illegal activities.

Overview

Installation

Install via go get

Please ensure you have installed Go 1.17 or later.

go get github.com/kkdai/youtube/v2

From source code

git clone https://github.com/kkdai/youtube.git
cd youtube
go run ./cmd/youtubedr

Mac

brew install youtubedr

in Termux

pkg install youtubedr

You can also find this package in

Usage

Use the binary directly

It'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

$ youtubedr download QAGDGja7kbs
$ youtubedr download https://www.youtube.com/watch?v=rFejpH_tAHM

Use this package in your golang program

Please check out the example_test.go for example code.

Example:

  • Get information of dotGo-2015-rob-pike video for downloading

    go get github.com/kkdai/youtube/v2/youtubedr

    Download video from dotGo 2015 - Rob Pike - Simplicity is Complicated

    youtubedr info https://www.youtube.com/watch?v=rFejpH_tAHM
    
    Title: dotGo 2015 - Rob Pike - Simplicity is Complicated
    Author: dotconferences
    -----available streams-----
    itag:  18 , quality: medium , type: video/mp4; codecs="avc1.42001E, mp4a.40.2"
    itag:  22 , quality:  hd720 , type: video/mp4; codecs="avc1.64001F, mp4a.40.2"
    itag: 137 , quality: hd1080 , type: video/mp4; codecs="avc1.640028"
    itag: 248 , quality: hd1080 , type: video/webm; codecs="vp9"
    ........
    
  • Download dotGo-2015-rob-pike-video

    go get github.com/kkdai/youtube/v2/youtubedr

    Download video from dotGo 2015 - Rob Pike - Simplicity is Complicated

    youtubedr download https://www.youtube.com/watch?v=rFejpH_tAHM
    
  • Download video to specific folder and name

    go get github.com/kkdai/youtube/v2/youtubedr

    Download video from dotGo 2015 - Rob Pike - Simplicity is Complicated to current directory and name the file to simplicity-is-complicated.mp4

    youtubedr download -d ./ -o simplicity-is-complicated.mp4 https://www.youtube.com/watch?v=rFejpH_tAHM
    
  • Download video with specific quality

    go get github.com/kkdai/youtube/v2/youtubedr

    Download video from dotGo 2015 - Rob Pike - Simplicity is Complicated with specific quality

    youtubedr download -q medium https://www.youtube.com/watch?v=rFejpH_tAHM
    

    Special case by quality hd1080:

    Installation of ffmpeg is necessary for hd1080

    ffmpeg   //check ffmpeg is installed, if not please download ffmpeg and set to your PATH.
    youtubedr download -q hd1080 https://www.youtube.com/watch?v=rFejpH_tAHM
    
  • Download video with specific itag

    go get github.com/kkdai/youtube/v2/youtubedr

    Download video from dotGo 2015 - Rob Pike - Simplicity is Complicated

    youtubedr download -q 18 https://www.youtube.com/watch?v=rFejpH_tAHM
    

How it works

  • Parse the video ID you input in URL
    • ex: https://www.youtube.com/watch?v=rFejpH_tAHM, the video id is rFejpH_tAHM
  • Get video information via video id.
    • Use URL: http://youtube.com/get_video_info?video_id=
  • Parse and decode video information.
    • Download URL in "url="
    • title in "title="
  • Download video from URL
    • Need the string combination of "url"

Inspired

Project52

It is one of my project 52.

License

This package is licensed under MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].