random/mumble-bot/README.md

48 lines
852 B
Markdown
Raw Normal View History

2020-04-06 13:34:07 +02:00
mumble-bot
==========
prende l'audio del canale, ne fa stdout.
2020-04-15 21:32:20 +02:00
Install
2020-04-06 13:34:07 +02:00
--------
```
2020-04-17 02:08:51 +02:00
pip3 install git+https://github.com/azlux/pymumble # quest non sta su pypy
2020-04-06 13:34:07 +02:00
```
2020-04-15 21:32:20 +02:00
Usi
---
### Ascolta
2020-04-06 13:34:07 +02:00
con pulseaudio
```
2020-04-17 02:08:51 +02:00
python3 bot.py --stream --channel "canale" | paplay -n mumblebot --raw --rate=48000 --format=s16le --channels=2
2020-04-15 21:32:20 +02:00
```
### Stream to icecast
```
python3 bot.py --stream --channel "canale" | ffmpeg -ac 2 -ar 48000 -f s16le -i pipe: -codec:a libvorbis -qscale:a 3 -content_type 'audio/ogg' -vn -f ogg icecast://username:passwordsicura@ice.cast:8000/test.ogg
2020-04-15 16:25:01 +02:00
```
2020-04-15 21:32:20 +02:00
### Use inside liquidsoap
2020-04-15 16:25:01 +02:00
```
2020-04-15 21:32:20 +02:00
(
id: "antani",
buffer: 2.0,
channels: 2,
max: 10,
restart: true,
restart_on_error: true,
samplerate: 48000,
"python3 /path/to/bot.py --channel canale"
)
2020-04-06 13:34:07 +02:00
```
2020-04-15 21:32:20 +02:00
Poi entri in chat e fai il comando `/start` per iniziare la diretta, `/stop` per fermarla.