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.
http://www.darkice.org
198 stars 46 forks source link

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

Open allegfede opened 5 years ago

allegfede commented 5 years ago

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

DanielEckl commented 5 years ago

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.

allegfede commented 5 years ago

thanks a lot, this solved (my) problem.