A music streaming service
  • Go 99.8%
  • Makefile 0.2%
Find a file
2019-07-02 18:29:30 +02:00
.idea Add idea files 2018-05-03 19:17:08 +02:00
api users: Log verification change 2019-01-28 18:23:17 +01:00
database Parse charts directly from trending page 2018-12-13 19:39:33 +01:00
logger Add go dep and run goimports 2018-05-20 00:19:07 +02:00
miniserver Fix content type 2018-11-30 22:25:53 +01:00
testing Get hostname from http request 2018-05-20 01:12:51 +02:00
utils Add go dep and run goimports 2018-05-20 00:19:07 +02:00
ytdl Copy fix from fent/node-ytdl-core 2019-07-02 18:29:30 +02:00
.gitignore Parse charts directly from trending page 2018-12-13 19:39:33 +01:00
.travis.yml Update build instructions 2018-05-20 01:39:01 +02:00
app.iml Add idea files 2018-05-03 19:17:08 +02:00
Gopkg.lock Directly parse title and duration from search html 2018-11-14 23:24:27 +01:00
Gopkg.toml Add go dep and run goimports 2018-05-20 00:19:07 +02:00
LICENSE Add license 2018-04-11 21:16:55 +02:00
main.go Don't lower bitrate 2018-11-30 17:47:45 +01:00
Makefile Update build instructions 2018-05-20 01:39:01 +02:00
README.md Fix content type 2018-11-30 22:25:53 +01:00

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