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

Fixed SHOUTCast password #138

Closed alexolivan closed 6 years ago

alexolivan commented 6 years ago
rafael2k commented 6 years ago

This this breaks comments in the config file?

alexolivan commented 6 years ago

Hi. In the tests I did (where I basically tested that both SHOUTCast 1.9.8 / 2.x worked again) the config file was full of comments indeed, that is, lines preceded by '#' and well .... it worked. those where config files from 1.2 version that simply 'worked again' ... I payed no much attention on comments.

Today I'm going to do some tests, so, I'll put lot of comments around, at start and end of files and I'll see what happened... I guess the hot spot is comments at the end of line, where DNAS2.x gets stream ID...

I'll report. Thank you very much. Best regards

alexolivan commented 6 years ago

Here's test1 ... config file has indeed several kind of comments and even daring with aacp format. It is against legacy plain-old DNAS 1.9.8 server working. though libaacplus lib doesn't seems to work well ... sound very bad and server doesn't seems to identify it as AACP but mpga... but still, it works (IP / port address are masked as letters)

# sample DarkIce configuration file, edit for your needs before using
# see the darkice.cfg man page for details

# this section describes general aspects of the live streaming session
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
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          = plug:dsnoop  # ALSA DSP soundcard device for the audio input
sampleRate      = 44100     # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 2         # channels. 1 = mono, 2 = stereo

# this section describes a streaming connection to a ShoutCast server
# there may be up to 8 of these sections, named [shoutcast-0] ... [shoutcast-7]
# these can be mixed with [icecast-x] and [icecast2-x] sections
[shoutcast-0]

#bitrateMode (cbr | abr | vbr) contant,average,variable
format      = aacp
bitrateMode     = cbr
bitrate         = 32
#quality (0 to 1)
quality         = 0.5      # encoding quality
sampleRate  = 44100
channel     = 2

#target server data
server          = aaa.bbb.ccc.ddd
port            = XXXX
password        = verysecret

#Stream data
name            = darkicetest1
url             = http://www.example.net
genre           = Other

#YP control
public          = no
alexolivan commented 6 years ago

Here's test2 ... DNAS2.x, so 2 'mountpoints' / 'stream IDs' using '#' after password. Comments around the config file.... it works perfect for me

# sample DarkIce configuration file, edit for your needs before using
# see the darkice.cfg man page for details

# this section describes general aspects of the live streaming session
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
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          = plug:dsnoop  # ALSA DSP soundcard device for the audio input
sampleRate      = 44100     # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 2         # channels. 1 = mono, 2 = stereo

# this section describes a streaming connection to a ShoutCast server
# there may be up to 8 of these sections, named [shoutcast-0] ... [shoutcast-7]
# these can be mixed with [icecast-x] and [icecast2-x] sections
[shoutcast-0]

#bitrateMode (cbr | abr | vbr) contant,average,variable
format      = mp3
bitrateMode     = cbr
bitrate         = 128
#quality (0 to 1)
quality         = 0.4      # encoding quality
sampleRate  = 44100
channel     = 2

#target server data
server          = aaa.bbb.ccc.ddd
port            = XXXX
password        = verysecret:#1

#Stream data
name            = darkicetest2
url             = http://example.net
genre           = Other
mountpoint  = test2

#YP control
public          = no

[shoutcast-1]
#bitrateMode (cbr | abr | vbr) contant,average,variable
format      = aacp
bitrateMode     = cbr
bitrate         = 64
#quality (0 to 1)
quality         = 0.4      # encoding quality
sampleRate      = 44100
channel         = 2

#target server data
server          = aaa.bbb.ccc.ddd
port            = XXXX
password        = verysecret:#2

#Stream data
name            = darkicetest22
url             = http://example.net
genre           = Other
mountpoint      = test22

#YP control
public          = no

Built and tested right now... on Debian Buster. Hope this helps...

Best regards.

rafael2k commented 6 years ago

Well, so I'm accepting the pull request, and please, let people in the darkice mailing list aware of the modification, so people can test! Thanks! ; )

alexolivan commented 6 years ago

Hi ... hope I didn't made something wrong ... It's my first pull request and I'm quite noob with all this environment. so ... darkice mailing list ... I'll try to find it and somehow ask them for testing.

Thank you very much Best regards.

yahoosam commented 3 years ago

Thank you for merging this! :)