1.3 KiB
1.3 KiB
https://dev.to/shilleh/stream-audio-from-raspberry-pi-to-local-computer-1a1c icecast/darkice
sudo apt install icecast2 sudo apt install darkice
sudo vim /etc/darkice.cfg
[general]
duration = 0 # Stream indefinitely
bufferSecs = 5 # Buffer for the input, in seconds
reconnect = yes # Reconnect to the server if disconnected
[input]
device = plughw:1,0 # Your audio capture device
sampleRate = 44100
bitsPerSample = 16 # Bits per sample
channel = 1 # 2 = stereo, 1 = mono
[icecast2-0]
bitrateMode = cbr # Constant bit rate
format = mp3 # Audio format
bitrate = 128 # Bitrate in kbps
server = localhost # Server name or IP
port = 8000 # Port number
password=emergence # Your Icecast password
mountPoint = portal # Mount point to stream to
name = Black Portal # Name of the stream
description = Black Portal Project # Description of the stream
url = http://192.168.0.203 # URL related to the stream
genre = politics # Genre of the stream
public = no # Do not list on public lists
sudo vim /lib/systemd/system/owncast.service
[Unit] Description=Darkice Service [Service] User=root Type=simple Restart=on-failure RestartSec=5 WorkingDirectory=/home/grace ExecStart=/usr/bin/darkice -c /etc/darkice.cfg [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload