vban/README.md

124 lines
6.8 KiB
Markdown
Raw Permalink Normal View History

2021-12-13 09:53:51 -06:00
vban - Linux command-line VBAN tools (fork)
2015-12-02 14:58:09 -06:00
======================================================
2021-12-13 09:53:51 -06:00
This is a fork of Benoît Quiniou's VBAN cli tools.
EMITTER and JACK-BACKEND have been little bit reworked:
1. No turn off when packet is invalid - just message and ignoring this packet.
2. Jack backend is now READY FOR EMITTER!
2022-10-13 11:24:05 -05:00
3. Reworked Autoconnect function in JACK backend mode
4. Added pearl script for emitter (of course, based on receptor's one)
5. Buffer size for Emitter in ALSA-mode is a parameter now
2015-12-02 14:58:09 -06:00
vban project is an open-source implementation of VBAN protocol.
2018-05-09 02:49:45 -05:00
VBAN is a simple audio over UDP protocol proposed by VB-Audio, see [VBAN Audio webpage](https://www.vb-audio.com/Voicemeeter/vban.htm)
2018-10-03 14:42:40 -05:00
It is composed of several command-line tools allowing to stream audio coming from audio backend interfaces to VBAN stream (vban_emitter) or playout incoming VBAN stream to audio backend interfaces (vban_receptor), or send text over the vban protocol (vban_sendtext).
Up to now, for audio tools, Alsa, PulseAudio and Jack audio backends have been implemented. A fifo (pipe) output is also existing, to allow chaining command-line tools, and a file output too (writing raw pcm data).
2015-12-02 14:58:09 -06:00
Compilation and installation
----------------------------
Depending on which audio backends you want to compile in, you need corresponding library and source headers.
Usual package names are:
2015-12-02 14:58:09 -06:00
* Alsa: libasound(X) and eventually libasound(X)-dev
* PulseAudio: libpulse(X) and eventually libpulse(X)-dev
* Jack: libjack(X) and eventually libjack(X)-dev
vban is distributed with autotools build scripts, therefore, to build, you need to install autoconf and automake, and to invoke:
2015-12-30 03:41:33 -06:00
$ ./autogen.sh # probably only once for ever
$ ./configure # with or without options (--help to get the list of possible options)
$ make # with or without options
2015-12-30 03:30:24 -06:00
To install, simply invoke:
2015-12-30 03:41:33 -06:00
# make install
2015-12-02 14:58:09 -06:00
By default, vban tools will be compiled with all 3 audio backends. To disable them, configure options are:
--disable-alsa
--disable-pulseaudio
--disable-jack
2015-12-02 14:58:09 -06:00
Usage
-----
2017-08-10 11:29:58 -05:00
Invoking vban_receptor or vban_emitter without any parameter will give hints on how to use them :
2015-12-02 14:58:09 -06:00
2017-08-16 02:42:53 -05:00
Usage: vban_receptor [OPTIONS]...
-i, --ipaddress=IP : MANDATORY. ipaddress to get stream from
-p, --port=PORT : MANDATORY. port to listen to
-s, --streamname=NAME : MANDATORY. streamname to play
-b, --backend=TYPE : audio backend to use. Available audio backends are: alsa pulseaudio jack pipe file . default is alsa.
2018-10-03 14:42:40 -05:00
-q, --quality=ID : network quality indicator from 0 (low latency) to 4. This also have interaction with jack buffer size. default is 1
-c, --channels=LIST : channels from the stream to use. LIST is of form x,y,z,... default is to forward the stream as it is
-o, --output=NAME : DEPRECATED. please use -d
-d, --device=NAME : Audio device name. This is file name for file backend, server name for jack backend, device for alsa, stream_name for pulseaudio.
-l, --loglevel=LEVEL : Log level, from 0 (FATAL) to 4 (DEBUG). default is 1 (ERROR)
2016-12-02 15:00:06 -06:00
-h, --help : display this message
2015-12-02 14:58:09 -06:00
Usage: vban_emitter [OPTIONS]...
-i, --ipaddress=IP : MANDATORY. ipaddress to send stream to
-p, --port=PORT : MANDATORY. port to use
-s, --streamname=NAME : MANDATORY. streamname to use
-b, --backend=TYPE : TEMPORARY DISABLED. audio backend to use. Only alsa backend is working at this time
-d, --device=NAME : Audio device name. This is file name for file backend, server name for jack backend, device for alsa, stream_name for pulseaudio.
-r, --rate=VALUE : Audio device sample rate. default 44100
-n, --nbchannels=VALUE : Audio device number of channels. default 2
-f, --format=VALUE : Audio device sample format (see below). default is 16I (16bits integer)
2018-10-03 14:42:40 -05:00
-c, --channels=LIST : channels from the stream to use. LIST is of form x,y,z,... default is to forward the stream as it is
-l, --loglevel=LEVEL : Log level, from 0 (FATAL) to 4 (DEBUG). default is 1 (ERROR)
-h, --help : display this message
Recognized bit format are 8I, 16I, 24I, 32I, 32F, 64F, 12I, 10I
Usage: vban_sendtext [OPTIONS] MESSAGE
2018-10-03 14:42:40 -05:00
-i, --ipaddress=IP : MANDATORY. ipaddress to send stream to
-p, --port=PORT : MANDATORY. port to use
-s, --streamname=NAME : MANDATORY. streamname to use
-b, --bps=VALUE : Data bitrate indicator. default 0 (no special bitrate)
-n, --ident=VALUE : Subchannel identification. default 0
-f, --format=VALUE : Text format used. can be: 0 (ASCII), 1 (UTF8), 2 (WCHAR), 240 (USER). default 1
-l, --loglevel=LEVEL : Log level, from 0 (FATAL) to 4 (DEBUG). default is 1 (ERROR)
-h, --help : display this message
2018-10-03 14:42:40 -05:00
About --channels option, a bit more tips:
* channels indexes are from 1 to 256 (as specified by VBAN specifications, and well, its probably enough for any soundcard or jack configuration)
* you can repeat channels
* if you use in-existent channels, you will get silence but no error
Examples:
2016-12-02 15:40:34 -06:00
vban_receptor -i IP -p PORT -s STREAMNAME -c1 # keep only channel 1 and play out as mono
vban_receptor -i IP -p PORT -s STREAMNAME -c1,1,1,1 # keep only channel 1 and play it out on 4 output channels (given that your output device is able to do it)
vban_receptor -i IP -p PORT -s STREAMNAME -c2,41,125,7,1,45 # select some channels and play them out on 6 output channels (same comment)
vban_emitter -i IP -p PORT -s STREAMNAME -c1,1,1,1 # use audio source channel 1 (opening it in mono therefore, and build up a 4 channels stream with copies of the same data in all channels)
2018-10-04 01:44:08 -05:00
vban_sendtext -i IP -p 6980 -sCommand1 "Strip(0).mute = 1;" # mute strip 1 of VoiceMeeter Banana. see [VoiceMeeter Banana manual](https://www.vb-audio.com/Voicemeeter/VoicemeeterBanana_UserManual.pdf) for more info
2018-05-09 02:49:45 -05:00
2018-05-11 07:20:42 -05:00
LATENCY
-------
vban_receptor does its best to keep latency reasonable, according to the -q (--quality) parameter.
A buffer size is computed according to the quality parameter, following the recommandation of VBAN Protocol specification document.
Then:
2018-05-11 07:27:29 -05:00
* data is read from / written to network in chunks of buffer size
2018-05-11 07:20:42 -05:00
* for alsa, buffer size is used to require an adequate latency
* for pulseaudio, it is directly used to set the stream buffer size
* for jack, it is used to set an internal buffer size to the double
2018-05-09 02:49:45 -05:00
GUI
---
This project is only componed of command line tools. If you are looking for a gui, you can take a look at: [VBAN-manager project on GitHub](https://github.com/VBAN-manager/VBAN-manager)
2021-12-13 09:53:51 -06:00
TODO
---
2022-10-13 11:24:05 -05:00
1. Normal (non-WEB) GUI
2. Emitter: Rework the network packet transmission for Jack mode (without Ringbuffer - just send all taken audiodata after getting from ports)
3. Receptor: Try to make it able to get more than one stream in Jack mode