Skip to content

tizonia/docker-tizonia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tizonia on Docker container

Containerized Tizonia cloud music player that uses the host's sound system.

Audio Output

Tizonia connects as a client directly to the hosts PulseAudio server and uses its configuration/devices to output the sound. This is achieved by mapping the UNIX socket used by PulseAudio in the host into the container and configuring its use.

Credits: Method borrowed from docker-pulseaudio-example.

Launch Command

Use the convenience script docker-tizonia.

The script bind mounts the host's '$HOME/.config/tizonia' to make 'tizonia.conf' available inside the container.

NOTE: The Tizonia process running inside the container needs 'rwx' permissions on this directory.

The script also bind mounts the host's '$HOME/.cache' to allow debug logs to be written to disk. For example, gmusicapi logs for Google Play Music can be found at '$HOME/.cache/gmusicapi/log/gmusicapi.log'

Once the script is in your path, and the permissions of '$HOME/.config/tizonia' have been changed, just use the usual Tizonia commands:

# Change Tizonia's config dir permissions
$ chmod a+wrx $HOME/.config/tizonia

# Install the wrapper script in a location in your PATH
$ sudo install docker-tizonia /usr/local/bin

# Pass the usual Tizonia commands to the wrapper
$ docker-tizonia --youtube-audio-mix-search "Queen Official"

Mac Support

Step 1)

It is required that PulseAudio to be installed via homebrew (brew install pulseaudio), and the following lines in /usr/local/Cellar/pulseaudio/13.0/etc/pulse/default.pa to be uncommented:

load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp

Step 2)

To choose the device being used for output, bring up a list of possible output devices and select one as the default sink:

pactl list short sinks

pacmd set-default-sink n  # where n is the chosen output number

Step 3)

Start the Pulseaudio daemon:

pulseaudio --load=module-native-protocol-tcp --exit-idle-time=-1 --daemon

You should now be able to utilize the docker-tizonia script to route audio from the docker container to the host machine!

License

The Unlicense.

Tizonia's main repo

See tizonia-openmax-il.