Skip to content

Instantly share code, notes, and snippets.

@dz0ny
Last active May 9, 2023 12:39
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dz0ny/d803ee4b2e96bb3c2e4a to your computer and use it in GitHub Desktop.
Save dz0ny/d803ee4b2e96bb3c2e4a to your computer and use it in GitHub Desktop.
Gapless streaming for mopidy

Liquidsoap + Mopidy

  1. Install liquidsoap from your distribution repo apt-get install liquidsoap
  2. Save mopidy.liq
  3. Open terminal and write liquidsoap then drag and drop mopidy.liq script to terminal and press ENTER
  4. Open mopidy config file and change òutput line to output= shout2send mount=input ip=127.0.0.1 port=8800 password=changeme
  5. Restart mopidy and open in any player URL http://{IP address assigned to device}:8800/mopidy
#!/usr/bin/liquidsoap
set("log.file.path", "/dev/null")
set("log.stdout", true)
set("server.telnet", false)
set("harbor.bind_addr","0.0.0.0")
# tweak these values if you have lag, skipping, buffer underrun etc
# set("frame.duration",0.04)
# set("root.max_latency",60.)
live = mksafe(input.harbor(port=8800, password="changeme", "/input"))
output.dummy(fallible=true, live)
output.harbor(%mp3(bitrate=128), port=8800, mount="/mopidy", live)
# Add to mopidy audio section
# [audio]
# output= shout2send mount=input ip=127.0.0.1 port=8800 password=changeme
# Stream will be available at http://0.0.0.0:8800/mopidy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment