Trying to send local soundcard to icecast FLAC #4237
grainsoflight
started this conversation in
User Support
Replies: 1 comment
-
Hi @grainsoflight, Your code# set the path and permissions for the logfile
set("log.file.path", "/var/log/liquidsoap/phono.log")
set("log.file.perms", 0o777)
set("log.unix_timestamps", true)
#input from soundcard
phono = input.alsa(bufferize=true)
#stream it to local icecast, default port and password
output.icecast(
%flac(samplerate=44100, channels=2),
phono,
mount="/phono",
name="Phono",
format="audio/ogg",
description="Turntable FLAC",
host="localhost",
port=8000
) I want to refactor it a bit. # Do you need a log file?
# I prefer to log to stdout+stderr because I use journald and docker.
#
# settings.log.file := true
# settings.log.file.path := "/var/log/liquidsoap/phono.log"
# settings.log.file.perms = 0o777 # 0o640
# input from soundcard
# phono = input.alsa(bufferize=true, fallible=false)
# In 2.3.0 the input.alsa function has different definition, so use buffer.
phono = buffer(input.alsa())
# I prefer to use ffmpeg
encoder = %ffmpeg(%audio(codec="flac"), format="ogg")
# %ffmpeg(%audio(codec="flac", ar=44100, channels=2), format="ogg")
#
# encoder = %flac(samplerate=44100, channels=2)
# stream it to local icecast with default port and password
output.icecast(
encoder,
phono,
mount="/phono",
name="Phono",
description="Turntable FLAC",
host="localhost",
port=8000,
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe someone here can help me. I am attempting to capture audio from a sound card and send it to Icecast (well, final destination before speakers is Music Assistant in Home Assistant, so even better if I can send it directly there, but using icecast is fine), but Im having trouble getting it to work. The author that wrote up the tutorial did so in 2016 and a lot has changed. My current config is below:
`r/bin/liquidsoap
set the path and permissions for the logfile
set("log.file.path","/var/log/liquidsoap/phono.lo>
set("log.file.perms",777)
set("log.unix_timestamps",true)
#input from soundcard
phono = input.alsa(bufferize=true,fallible=false,>
#stream it to local icecast, default port and pas>
output.icecast(%ogg(%flac(samplerate=44100,channe>
mount="/phono",
name="Phono",
format="audio/ogg",
description="Turntable FLAC",
host="localhost",
port=8000,)
`
When I attempt to run liquidsoap, I get this error:
`At /etc/liquidsoap/phono.liq, line 17 char 0 - line 23 char 11:
output.icecast(%ogg(%flac(samplerate=44100,channels=2,compression=5,bits_per_sample=16)),
mount="/phono",
...
host="localhost",
port=8000,)
Error 15: Missing arguments in function application: source(audio=pcm(stereo), video=none, midi=none).`
If anyone could assist in getting this running, that would be really great
Beta Was this translation helpful? Give feedback.
All reactions