Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schollz/getsong
Download any song mp3 with no dependencies except ffmpeg
https://github.com/schollz/getsong
downloader ffmpeg mp3 music songs spotify youtube
Last synced: 3 months ago
JSON representation
Download any song mp3 with no dependencies except ffmpeg
- Host: GitHub
- URL: https://github.com/schollz/getsong
- Owner: schollz
- License: mit
- Created: 2019-01-12T15:52:38.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T14:26:56.000Z (about 4 years ago)
- Last Synced: 2024-07-27T12:41:53.171Z (3 months ago)
- Topics: downloader, ffmpeg, mp3, music, songs, spotify, youtube
- Language: Go
- Homepage: https://schollz.com/software/spotify/
- Size: 145 KB
- Stars: 129
- Watchers: 5
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# getsong
[![travis](https://travis-ci.org/schollz/getsong.svg?branch=master)](https://travis-ci.org/schollz/getsong)
[![go report card](https://goreportcard.com/badge/github.com/schollz/getsong)](https://goreportcard.com/report/github.com/schollz/getsong)
[![coverage](https://img.shields.io/badge/coverage-62%25-green.svg)](https://gocover.io/github.com/schollz/getsong)
[![godocs](https://godoc.org/github.com/schollz/getsong?status.svg)](https://godoc.org/github.com/schollz/getsong)This is a simple library that utilizes the [rylio/ytdl YouTube downloader](https://github.com/rylio/ytdl) and [ffmpeg](https://www.ffmpeg.org/) to get almost any m4a of a song that you want to listen to. I wrote this so I could [download m4as of my favorite Spotify playlists](https://github.com/schollz/spotifydownload).
**Disclaimer:** Downloading copyright songs may be illegal in your country. This tool is for educational purposes only and was created only to show how YouTubes's API can be used to download music. Please support the artists by buying their music.
## Install
```
go get -u github.com/schollz/getsong/...
```## Usage
The aim of this library to have a low (or zero) false positive rate, so it works best when the entered title + artist are spelled correctly.
### Use as a program
```bash
$ getsong 'Getting in Tune' 'The Who'
Downloading 'Getting in Tune by The Who (W6-3rnD7FSc).webm'...
524289 / 524289 [==========================] 100.00%
...converting to m4a...
Downloaded 'Getting in Tune by The Who (W6-3rnD7FSc).m4a'
```### Use as a library
```golang
// download "True" by "Spandau Ballet"
fname, err := getsong.GetSong("True", "Spandau Ballet")
if err == nil {
fmt.Printf("Downloaded '%s'\n", fname)
}
```## Contributing
Pull requests are welcome. Feel free to...
- Revise documentation
- Add new features
- Fix bugs
- Suggest improvements## License
MIT