Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
.gitignore
COPYING
Makefile
README.md
httpd.c
httpd.h
logger.c
logger.h
output.c
output.h
streams.c
streams.h
vban.c
vban.h
vban2pipe.c

README.md

VBAN receiver

This program receives audio data sent using VB-Audio software and send it to named pipe.

Usage:

vban2pipe <port> <pipe> [exec-on-connect] [exec-on-disconnect]

Example for pulseaudio:

Load pipe-source module

$ pactl load-module module-pipe-source source_name=pipe \
  file=/tmp/vban.input format=s16le rate=48000 channels=2

Start vban2pipe

$ vban2pipe 6980 /tmp/vban.input

Enable VBAN stream on sender side and you should see

$ vban2pipe 6980 /tmp/vban.input
[Stream1] stream connected from 172.16.0.2:59708, s16le, 48000 Hz, 2 channel(s)
[Stream1] stream online, primary
...

This program can receive several streams simultaneously. All streams should use the same format and sample rate. Backup streams will be used to restore lost packets after streams synchronization:

$ vban2pipe 6980 /tmp/vban.input
[Stream1] stream connected from 172.16.0.2:56503, s16le, 48000 Hz, 2 channel(s)
[Stream1] stream online, primary
[Stream2] stream connected from 172.16.0.2:56504, s16le, 48000 Hz, 2 channel(s)
[Stream2] stream online, offset -180480 frames
[Stream3] stream connected from 172.16.0.2:56505, s16le, 48000 Hz, 2 channel(s)
[Stream3] stream online, offset -435456 frames
...

If lost packets cannot be restored, vban2pipe reports lost output:

$ export DEBUG=1
$ vban2pipe 6980 /tmp/vban.input
...
[Stream2] expected 3490818, got 3490821: lost 3 packets
[Stream3] expected 3490818, got 3490821: lost 3 packets
<out> lost 256 frames
[Stream2] expected 3490843, got 3490845: lost 2 packets
[Stream3] expected 3490843, got 3490845: lost 2 packets
...

Output latency is only 2 packets in stream.

The pipe name parsed each time the primary stream is connected. The following placeholders in pipe name can be used:

Character Replacement
%% single character %
%f sample format, i.e. s16le, s24le, etc
%r sample rate, i.e. 44100, 48000, 96000, etc
%c channels number
You can’t perform that action at this time.