GoYTFetcher

command module
v0.0.0-...-986a7cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 13 Imported by: 0

README

GOYTFetcher

GoYTFetcher is a server application written in Golang to serve Youtube videos as audio files through HTTP.

It also comes with a simple login system, so you can manage users easily.

Installation

Dependencies
  • Golang (You need Go 1.9 or higher)
  • FFmpeg (Install with libvorbis enabled)
  • youtube-dl
Build
$ go get github.com/Grarak/GoYTFetcher
$ cd $GOPATH/src/github.com/Grarak/GoYTFetcher
$ make install

Compiled executable should be in $GOPATH/bin.

Usage

$ ./GoYTFetcher [-p Port] [-yt Youtube API key] [-i Webpage path (where index.html is stored)]

All flags are optional. When no port is given it will use 6713.

Youtube API key is used for searching and getting video information. When no key is given then it will rely on youtube-dl. Only feature which totally depends on the Youtube API is getting popular videos.

Webpage path is the directory where your index.html is stored, in case you want to host a website on the same port.

The first user who sign ups will automatically promoted to administrator and can unlock other users. When you request a video, then the server will first return the audio link from google and start the downloading of the video at the same time. Once the download is finished and the same video is requested again, it will serve the local audio file. Both the link from google the local audio file are encoded in vorbis format. (Audio bitrate: 160kb/s)

Clients

If you want write your own client. Please let me know, then I can write up a documentation for API calls.

Libraries

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL