GistTree.Com
Entertainment at it's peak. The news is by your side.

YouTube-dl in Golang, actively maintained

0

GitHub license
GoDoc
Build Status
Coverage

This equipment is a Youtube video download equipment, for additional detail refer https://github.com/rg3/youtube-dl for additional download alternatives.

Overview

Install:

scoot receive github.com/kkdai/youtube/v2

OR

git clone https://github.com/kkdai/youtube.git
cd youtube
scoot hobble ./cmd/youtubedr

Install in Termux

Usage

Spend the binary straight away

Or no longer it is essentially uncomplicated to declare, noteworthy receive the video identification from youtube url – ex: https://www.youtube.com/question?v=rFejpH_tAHM, the video identification is rFejpH_tAHM

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

Spend this equipment on your golang program

Please agree with a examine the example_test.scoot as an illustration code.

Alternatives:

possibility sort description default fee
-d string the output list $HOME/Movies/youtubedr
-o string the output file name ( ext will auto detect on default fee ) .ext
-d string the Socks 5 proxy (e.g. 10.10.10.10: 7878)
-q string the output file high quality (medium, hd720)
-i string the output file itag (13, 17 etc..) 0
-files bool clarify records of accessible streams (high quality, itag, MIMEtype)

Example:

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

    scoot receive github.com/kkdai/youtube/v2/youtubedr

    Get video from dotGo 2015 – Get Pike – Simplicity is Refined

    youtubedr -files https://www.youtube.com/question?v=rFejpH_tAHM
    
    Title: dotGo 2015 - Get Pike - Simplicity is Refined
    Creator: dotconferences
    -----accessible streams-----
    itag:  18 , high quality: medium , sort: video/mp4; codecs="avc1.42001E, mp4a.40.2"
    itag:  22 , high quality:  hd720 , sort: video/mp4; codecs="avc1.64001F, mp4a.40.2"
    itag: 137 , high quality: hd1080 , sort: video/mp4; codecs="avc1.640028"
    itag: 248 , high quality: hd1080 , sort: video/webm; codecs="vp9"
    ........
    
  • Get dotGo-2015-rob-pike-video

    scoot receive github.com/kkdai/youtube/v2/youtubedr

    Get video from dotGo 2015 – Get Pike – Simplicity is Refined

    youtubedr https://www.youtube.com/question?v=rFejpH_tAHM
    
  • Get video to particular folder and name

    scoot receive github.com/kkdai/youtube/v2/youtubedr

    Get video from dotGo 2015 – Get Pike – Simplicity is Refined to contemporary list and name the file to simplicity-is-subtle.mp4

    youtubedr -d ./ -o simplicity-is-subtle.mp4 https://www.youtube.com/question?v=rFejpH_tAHM
    
  • Get video with particular high quality

    scoot receive github.com/kkdai/youtube/v2/youtubedr

    Get video from dotGo 2015 – Get Pike – Simplicity is Refined with particular high quality

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

    Special case by high quality hd1080:

    Installation of ffmpeg is crucial for hd1080

    ffmpeg   //check ffmpeg is effect in, if no longer please download ffmpeg and plan to your PATH.
    youtubedr -q hd1080 https://www.youtube.com/question?v=rFejpH_tAHM
    
  • Get video with particular itag

    scoot receive github.com/kkdai/youtube/v2/youtubedr

    Get video from dotGo 2015 – Get Pike – Simplicity is Refined

    youtubedr -i 18 https://www.youtube.com/question?v=rFejpH_tAHM
    

How it essentially works

  • Parse the video ID you input in URL
    • ex: https://www.youtube.com/question?v=rFejpH_tAHM, the video identification is rFejpH_tAHM
  • Get video records by strategy of video identification.
    • Spend URL: http://youtube.com/get_video_info?video_id=
  • Parse and decode video records.
    • Get URL in “url=”
    • title in “title=”
  • Get video from URL
    • Want the string aggregate of “url”

Inspired

Mission52

It’s miles one of my project 52.

License

This equipment is licensed below MIT license. Sight LICENSE for details.

Read More

Leave A Reply

Your email address will not be published.