rafael2k / darkice

DarkIce is a live audio streamer. It records audio from an audio interface (e.g. sound card), encodes it and sends it to a streaming server. This is the official development repository of Darkice.

Home Page:http://www.darkice.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JACK server sample rate is different than sample rate in darkice config file

allegfede opened this issue · comments

Hello, i have jack to be run with a 192Khz sampling rate to provide armonics for stereo and RDS, but i also need to stream the incoming signal (indeed is generated inside the same machine) to an icecast server (aac plus and mp3).

In my /etc/darkice.cfg i got:
duration = 0
bufferSecs = 5 # size of internal slip buffer, in seconds
reconnect = yes # reconnect to the server(s) if disconnected
realtime = yes # run the encoder with POSIX realtime priority
rtprio = 3 # scheduling priority for the realtime threads

this section describes the audio input that will be streamed

[input]
device = jack
sampleRate = 48000
bitsPerSample = 16 # bits per sample. try 16
channel = 2

... etc etc ...

but i got this error:
JACK server sample rate is different than sample rate in darkice config file

Any hint on how to resample the signal in darkice or jack to solve the issue?

Thanks.

Federico

Just a quick shot without having first-hand experience:

If your jackd intentionally streams 192kHz, then you need to tell darkice that it will receive 192kHz on its input. If that doesn't match, you'll get the provided error message.

If your destination (here: Icecast) needs a different sample rate, you need to change the samplerate of the darkice output instead.

Quote from the darkice.cfg manpage, section "icecast2-x"

sampleRate
The sample rate of the encoded output. If not specified, defaults to the value of
the input sample rate. Please note that Ogg Opus only supports 48kHz sample rate,
and will resample to this rate.

thanks a lot, this solved (my) problem.