Git Product home page Git Product logo

go-youtube-downloader's Introduction

GitHub go.mod Go version of a Go module GoReportCard Go Reference

Go YouTube Downloader

Command line/terminal based app written in Go to download Shorts & Videos using YouTube URLs/IDs.

Main Features

  • YouTube Shorts & Videos downloading.

  • Ability to select from different content qualities.

Project Dependencies

At present, the project has 2 dependencies,

  1. tview - Terminal UI library with rich, interactive widgets - written in Golang.

  2. FFmpeg - The leading cross-platform multimedia framework. It should be installed in system or at-least have latest static binary in project's root directory. It's more of an external runtime dependency.

Working Demo

  1. When pasted either YouTube Shorts/Video ID or URL, the app fetches the metadata from YouTube's internal APIs.

  2. Then depending on quality selections for video & audio, the application downloads the Shorts/Video content by making of small sized data requests to the fetched content URLs.

  3. In the end, if the FFmpeg exist, then both separate video & audio stream files are merged into single output file.

working_demo_clip.mp4

Build Binary

After installing Go, enter below command from project's root,

  • On Linux/UNIX,

    go build -o go_youtube_downloader ./cmd/go_youtube_downloader.go

  • On Windows,

    go build -o go_youtube_downloader.exe ./cmd/go_youtube_downloader.go

build_clip.mp4

Run Directly with Source Code

After installing Go, clone/download this project & enter below command from project's root,

go run ./cmd/go_youtube_downloader.go

direct_run_clip.mp4

Important Notes

  • Systems must have FFmpeg installed or have latest static binary in project's root directory to merge downloaded separate video & audio streams into a single file.

  • Age-restricted videos can not be downloaded due to YouTube's Signature Ciphering.

  • YouTube have bandwidth limitations for each incoming request, around 10 MB per request. If any request gets more data than this size limit, then further requests will throttle download or connection may get terminated. So, to get better performance when downloading data & writing it to output file, it's divided into smaller chunks for consistency. Based on selected quality & size, the download time would be more or less.

Special Thanks to Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.