This is an old revision of the document!
Audio streming
Základní motivace tohoto projektu je realizace audio streamu ze stage do studia na jednom milém malém festivalu (Letní zvěř 2016). Nicméně tyto principy lze použít kdykoli na cokoli…
TODO…
Setup
Tohle se týká konkrétně Letné zvěře a musí se to doplnit. TODO
- Stage:
- audio výstup z mixu, line-out
- PC bazmek s line-in vstupem (digitalizace, streaming)
- WiFi client
- Studio:
- WiFi AP
- PC bazmek s line-out výstupem (příjem streamu)
- mix
- …co dál? TODO…
WiFi
Stage
Studio
Poznámky
Tohle je jen dočasný bordel z předchozího pokusu. Protřídit TODO…
/etc/ices.conf
<input> <module>stdinpcm</module> <param name="rate">44100</param> <param name="channels">2</param> <param name="metadata">1</param> <param name="metadatafilename">/home/ices/metadata</param> </input> <instance> <hostname>stream.slu.cz</hostname> <port>8000</port> <password>********</password> <mount>/dron.ogg</mount> <reconnectdelay>2</reconnectdelay> <reconnectattempts>5</reconnectattempts> <maxqueuelength>80</maxqueuelength> <encode> <nominal-bitrate>64000</nominal-bitrate> <!-- bps. e.g. 64000 for 64 kbps --> <samplerate>44100</samplerate> <channels>2</channels> </encode> </instance>
spustit paman, Devices, najit odpovidajici sink, dat Properties, a zkopirovat si radek Monitor Source.
pak tento source preposleme do ices (a ten to enkodne a posle do icecastu)
parec -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor --raw | ices /etc/ices.conf
yum install pulseaudio-utils paman ices icecast
seznam sinku
LANG=C pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d " " -f2
alsa_output.pci-0000_00_1b.0.analog-stereo.monitor alsa_input.pci-0000_00_1b.0.analog-stereo
parec -d alsa_input.pci-0000_00_1b.0.analog-stereo --raw | ices /etc/ices.conf
nano /etc/icecast.xml
<icecast> <limits> <clients>100</clients> <sources>2</sources> <threadpool>5</threadpool> <queue-size>524288</queue-size> <client-timeout>30</client-timeout> <header-timeout>15</header-timeout> <source-timeout>10</source-timeout> <!-- If enabled, this will provide a burst of data when a client first connects, thereby significantly reducing the startup time for listeners that do substantial buffering. However, it also significantly increases latency between the source client and listening client. For low-latency setups, you might want to disable this. --> <burst-on-connect>0</burst-on-connect> <burst-size>65535</burst-size> </limits> <authentication> <source-password>*******</source-password> <relay-password>*******</relay-password> <admin-user>admin</admin-user> <admin-password>*******</admin-password> </authentication> <hostname>localhost</hostname> <listen-socket> <port>8000</port> <!-- <shoutcast-mount>/stream</shoutcast-mount> --> </listen-socket> <fileserve>1</fileserve> <paths> <!-- basedir is only used if chroot is enabled --> <basedir>/usr/share/icecast</basedir> <!-- Note that if <chroot> is turned on below, these paths must both be relative to the new root, not the original root --> <logdir>/var/log/icecast</logdir> <webroot>/usr/share/icecast/web</webroot> <adminroot>/usr/share/icecast/admin</adminroot> <pidfile>/var/run/icecast/icecast.pid</pidfile> <alias source="/" dest="/status.xsl"/> </paths> <logging> <accesslog>access.log</accesslog> <errorlog>error.log</errorlog> <!-- <playlistlog>playlist.log</playlistlog> --> <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error --> <logsize>10000</logsize> <!-- Max size of a logfile --> <!-- If logarchive is enabled (1), then when logsize is reached the logfile will be moved to [error|access|playlist].log.DATESTAMP, otherwise it will be moved to [error|access|playlist].log.old. Default is non-archive mode (i.e. overwrite) --> <!-- <logarchive>1</logarchive> --> </logging> <security> <chroot>0</chroot> <changeowner> <user>icecast</user> <group>icecast</group> </changeowner> </security> </icecast>
systemctl start icecast