You need to have all your media stored in an S3-compatible service. Many options are available, including Wasabi, Backblaze, AWS, and MinIO for local use.
rclone and other tools are available to help transfer and manage files in S3 services.
In your S3 bucket, store all music with a common path prefix. The following is recommended:
bucket/prefix/artist/album/track
A complete example would be:
MyBucket/Music/Herbie Hancock/Maiden Voyage/02-The Eye of the Hurricane.flac
Takeout uses artist, release, and track names from the S3 bucket objects to obtain metadata. Here are some naming guidelines to help match your media.
Maiden Voyage | Album title without year |
Maiden Voyage (1965) | Album title with year - recommended |
1-track.mp3 | Track #1 on a single disc album |
01-track.mp3 | Track #1 on a single disc album |
2-track.mp3 | Track #2 on a single disc album |
13-track.mp3 | Track #13 on a single disc album |
1-01-track.mp3 | Track #1 on a multi-disc album |
1-13-track.mp3 | Track #13 on a multi-disc album |
Use underscore (_) for any special characters not typically found in
file names. Picard is an
excellent music tagger and handles file naming very well.
mp3, flac, ogg, and m4a file extensions are supported.
You should store all movies under a common path prefix. The following is recommended:
bucket/prefix/path/movie
An example would be:
MyBucket/Movies/Horror/Night of the Living Dead (1968).mkv
Title (year).mkv | Title and year in mkv container |
Title (year) - HD.mkv | Same with optional and ignored text after and including they dash |
The title and year are used to obtain movie metadata.
mkv and mp4 file extensions are supported.
Internet radio and podcasts are media stored on other systems. Enable these inside media configuration files.
Install the latest version of the server:
$ go install github.com/takeoutfm/takeout/cmd/takeout@latest
Create your server takeout.yaml configuration file and specify directories for DataDir, MediaDir, and ImageCache.CacheDir. The table below includes the configuration items that may need to be changed or have no defaults and must be specified.
Name | Description | Default |
---|---|---|
Server.DataDir | Server directory for databases | . |
Server.MediaDir | Server directory for media configs | . |
ImageClient.CacheDir | Image cache directory | ./imagecache |
Auth.AccessToken.Secret | Example: 3foE3qLxN+koIGdt | n/a |
Auth.MediaToken.Secret | - | n/a |
Auth.CodeToken.Secret | - | n/a |
The rest of the page assumes that defaults are used and that the server is running in /var/lib/takeout which would be "." (current directory). Ensure you generate your own random secrets (min 16 bytes) for all token secrets and keep them secret. The command below can help.$ openssl rand -base64 12
Create your media directories in MediaDir and within each one, create a config.yaml with bucket(s) and other configuration.
Takeout requires API keys to obtain certain metadata. For TMDB and Fanart, defaults are provided. For lastfm, you must obtain your own.
Name | Description | Default |
---|---|---|
Lastfm.Key | Your lastfm key | n/a |
Lastfm.Secret | Your lastfm secret | n/a |
TMDB.Key | TMDB API Key | provided |
Fanart.ProjectKey | Fanart Key | provided |
Summary of commands to create a media directory with a config file.
$ cd /var/lib/takeout
$ mkdir mymedia
$ cd mymedia
$ vi config.yaml
The server will use the media directory to store databases and
search indices. You will see something like this after a sync.
config.yaml
music.bleve/
music.db
podcast.bleve/
podcast.db
video.bleve/
video.db
Create a user with associated media directory. A user is mapped to a media configuration.
$ cd /var/lib/takeout
$ takeout user --add --media=mymedia --user=ozzy --pass=changeme
Setup Nginx with TLS using Let's Encrypt. This setup will vary depending on your needs and there are many other options as well. It is recommended to have a TLS upstream service that services requests for the takeout server listening on a port such as 3000.
For each media directory, do the first sync to obtain all the associated metadata for music, video, and podcasts. This can later be setup to run automatically. A full sync may take a long time depending on the amount of media files.
$ cd /var/lib/takeout/mymedia
$ takeout sync
This is also a good time to create some radio stations.
$ cd /var/lib/takeout/mymedia
$ takeout radio
Start the server.
$ cd /var/lib/takeout
$ takeout serve
Install the mobile app, watch app, Android TV app, and the command line player. These are all available on Github.