From 1acf2c5022da32e49a025c9d7c2c21c7b53785ca Mon Sep 17 00:00:00 2001 From: encrypt Date: Wed, 15 Apr 2020 21:32:20 +0200 Subject: [PATCH] update docs --- mumble-bot/README.md | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/mumble-bot/README.md b/mumble-bot/README.md index 9289664..a7186be 100644 --- a/mumble-bot/README.md +++ b/mumble-bot/README.md @@ -3,7 +3,7 @@ mumble-bot prende l'audio del canale, ne fa stdout. -install +Install -------- ``` @@ -13,18 +13,38 @@ pip3 install --user -r requirements.txt python3 setup.py install --user ``` -ascolta -------- +Usi +--- + +### Ascolta con pulseaudio ``` -python3 bot.py | paplay --raw --rate=48000 --format=s16le --channels=2 +python3 bot.py --stream --channel "canale" | paplay --raw --rate=48000 --format=s16le --channels=2 ``` -streama -------- +### Stream to icecast ``` - python3 bot.py | 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 +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 ``` + +### Use inside liquidsoap + + +``` +( +id: "antani", +buffer: 2.0, +channels: 2, +max: 10, +restart: true, +restart_on_error: true, +samplerate: 48000, +"python3 /path/to/bot.py --channel canale" +) + +``` + +Poi entri in chat e fai il comando `/start` per iniziare la diretta, `/stop` per fermarla.