jamesharrison / openob Goto Github PK
View Code? Open in Web Editor NEWThe Open Outside Broadcast project for radio contribution links and studio-transmitter links.
The Open Outside Broadcast project for radio contribution links and studio-transmitter links.
Openob does not show the help for the cli options for rx and tx mode.
Here is a patch:
diff --git a/bin/openob b/bin/openob index 64ee4c2..4ce9b44 100755 --- a/bin/openob +++ b/bin/openob @@ -9,8 +9,27 @@ from openob.node import Node from openob.link_config import LinkConfig from openob.audio_interface import AudioInterface -parser = argparse.ArgumentParser(prog='openob', formatter_class=argparse.ArgumentDefaultsHelpFormatter) +class _HelpAction(argparse._HelpAction): + + def __call__(self, parser, namespace, values, option_string=None): + parser.print_help() + + subparsers_actions = [ + action for action in parser._actions + if isinstance(action, argparse._SubParsersAction)] + for subparsers_action in subparsers_actions: + for choice, subparser in subparsers_action.choices.items(): + print("Subparser '{}'".format(choice)) + print(subparser.format_help()) + + parser.exit() + + +parser = argparse.ArgumentParser(prog='openob', formatter_class=argparse.ArgumentDefaultsHelpFormatter, add_help=False) + parser.add_argument('-v', '--verbose', action='store_const', help='Increase logging verbosity', const=logging.DEBUG, default=logging.INFO) +parser.add_argument('-h', '--help', action=_HelpAction, help='Show help') + parser.add_argument('config_host', type=str, help="The configuration server for this OpenOB Node") parser.add_argument('node_name', type=str, help="The node name for this end") parser.add_argument('link_name', type=str, help="The link name this OpenOB Manager is operating on; must be the same on both Nodes") @@ -51,8 +70,8 @@ parser_rx_jack.add_argument('-jn', '--jack_name', type=str, default='openob', he parser_rx_jack.add_argument('-aj', '--jack_auto', action='store_false', help="Disable auto connection for JACK inputs") parser_rx.set_defaults(mode='rx') -opts = parser.parse_args() +opts = parser.parse_args() logger_factory = LoggerFactory(level=opts.verbose) link_config = LinkConfig(opts.link_name, opts.config_host)
The documentation on the website was last built in 2014, according to the front page. Can the current documentation be deployed?
sudo openob 192.168.0.10 test-rx-node test-link rx
Traceback (most recent call last):
File "/usr/local/bin/openob", line 4, in
import('pkg_resources').run_script('OpenOB==4.0.2', 'openob')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1445, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/OpenOB-4.0.2-py2.7.egg/EGG-INFO/scripts/openob", line 8, in
File "build/bdist.linux-armv7l/egg/openob/node.py", line 4, in
File "build/bdist.linux-armv7l/egg/openob/rtp/tx.py", line 2, in
File "/usr/lib/python2.7/dist-packages/gi/init.py", line 100, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gst not available
As of commit to add setting of sample rate, tx will now always be in stereo.
Can this be ported to android? How would one do this?
After a basic install with easy_install:
pi@raspberrypi ~ $ openob
Traceback (most recent call last):
File "/usr/local/bin/openob", line 5, in <module>
pkg_resources.run_script('OpenOB==2.3', 'openob')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/OpenOB-2.3-py2.7.egg/EGG-INFO/scripts/openob", line 7, in <module>
from openob.manager import Manager
File "/usr/local/lib/python2.7/dist-packages/OpenOB-2.3-py2.7.egg/openob/manager.py", line 3, in <module>
from openob.rtp.tx import RTPTransmitter
File "/usr/local/lib/python2.7/dist-packages/OpenOB-2.3-py2.7.egg/openob/rtp/tx.py", line 7, in <module>
from colorama import Fore, Back, Style
ImportError: No module named colorama
First pass at a GUI
Feature request!
If either the 'server' or 'client' are unable to connect to Redis, we should auto re-try. Maybe with exponential backoff or similar.
I've got two RPi's that I use as TX & RX units. Sometimes the TX doesn't connect to reddis on boot (Probably because network isn't ready and I'm only starting it with @reboot in crontab), but if the RX comes up before the TX (With TX hosting the 'server'), it needs a reboot to automatically connect.
Using Openob rx with redis running on the tx server, piped over spiped on internet with two ISP companies in loop.
Link had run for about a week before crashing.
Hopefully this is the right venue to report this bug.
Transmitter command line: (was still running)
/usr/bin/python /usr/local/bin/openob 127.0.0.1 studio-node STL-link tx -a jack -jn STL -l 1 --dtx -j 900 -b 96 -jp stereo_tool:fm 199.193.vvv.xxx
Command line of receiver that crashed:
/usr/local/bin/openob 127.0.0.1 FMTX-node STL-link rx -a jack -jn ob-STL -jp On_Air:in_2.
Error output:
2020-01-17 07:04:58,183 - openob.node.FMTX-node.link.STL-link.rx - CRITICAL - No data received for 3 seconds!
2020-01-17 07:05:03,099 - openob.node.FMTX-node.link.STL-link.rx - INFO - Receiving stereo audio transmission
2020-01-20 04:19:48,435 - openob.node.FMTX-node.link.STL-link.rx - CRITICAL - No data received for 3 seconds!
2020-01-20 04:19:48,435 - openob.node.FMTX-node.link.STL-link.rx - CRITICAL - Shutting down receiver for restart
2020-01-20 04:19:48,517 - openob.node.FMTX-node.link.STL-link - INFO - Waiting for transmitter capabilities...
2020-01-20 04:19:53,520 - openob.node.FMTX-node.link.STL-link - ERROR - Unknown exception thrown - please report this as a bug! Error while reading from socket: (104, 'Connection reset by peer')
Traceback (most recent call last):
File "/home/broadcast/.local/lib/python2.7/site-packages/openob/node.py", line 56, in run_link
caps = link_config.blocking_get("caps")
File "/home/broadcast/.local/lib/python2.7/site-packages/openob/link_config.py", line 43, in blocking_get
value = self.get(key)
File "/home/broadcast/.local/lib/python2.7/site-packages/openob/link_config.py", line 63, in get
value = self.redis.get(scoped_key)
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/client.py", line 1332, in get
return self.execute_command('GET', name)
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/client.py", line 839, in execute_command
return self.parse_response(conn, command_name, **options)
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/client.py", line 853, in parse_response
response = connection.read_response()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 700, in read_response
response = self._parser.read_response()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 310, in read_response
response = self._buffer.readline()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 242, in readline
self._read_from_socket()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 209, in _read_from_socket
(ex.args,))
ConnectionError: Error while reading from socket: (104, 'Connection reset by peer')
Traceback (most recent call last):
File "/usr/local/bin/openob", line 87, in
node.run_link(link_config, audio_interface)
File "/home/broadcast/.local/lib/python2.7/site-packages/openob/node.py", line 56, in run_link
caps = link_config.blocking_get("caps")
File "/home/broadcast/.local/lib/python2.7/site-packages/openob/link_config.py", line 43, in blocking_get
value = self.get(key)
File "/home/broadcast/.local/lib/python2.7/site-packages/openob/link_config.py", line 63, in get
value = self.redis.get(scoped_key)
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/client.py", line 1332, in get
return self.execute_command('GET', name)
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/client.py", line 839, in execute_command
return self.parse_response(conn, command_name, **options)
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/client.py", line 853, in parse_response
response = connection.read_response()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 700, in read_response
response = self._parser.read_response()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 310, in read_response
response = self._buffer.readline()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 242, in readline
self._read_from_socket()
File "/home/broadcast/.local/lib/python2.7/site-packages/redis/connection.py", line 209, in _read_from_socket
(ex.args,))
redis.exceptions.ConnectionError: Error while reading from socket: (104, 'Connection reset by peer')
[1]+ Exit 1 /usr/local/bin/openob 127.0.0.1 FMTX-node STL-link rx -a jack -jn ob-STL -jp On_Air:in_2.
Not really an 'issue' as such, and I realise that the documentation isn't complete and that you're probably working on it (amongst other things you're doing I guess!), but one thing that seems properly missing from the documentation is that when setting this up to run externally, as well as opening ports 3000-3002 for OpenOB itself, you also need to open port 6379 for redis-server.
-- Unhandled exception occured, please report this as a bug!
Traceback (most recent call last):
File "/usr/local/bin/openob", line 5, in
pkg_resources.run_script('OpenOB==2.3', 'openob')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/OpenOB-2.3-py2.7.egg/EGG-INFO/scripts/openob", line 29, in
manager.run(opts)
File "/usr/local/lib/python2.7/dist-packages/OpenOB-2.3-py2.7.egg/openob/manager.py", line 84, in run
receiver = RTPReceiver(audio_output=opts.audio_output, audio_device=opts.device, base_port=port, encoding=encoding, caps=caps, bitrate=bitrate, jitter_buffer=jitter_buffer, jack_name=("openob_tx_%s" % opts.link_name) )
File "/usr/local/lib/python2.7/dist-packages/OpenOB-2.3-py2.7.egg/openob/rtp/rx.py", line 50, in init
caps = caps.replace('', '')
AttributeError: 'NoneType' object has no attribute 'replace'
It is possible to tell jack what ports to autoconnect to (so you can for example connect to the ardour mixer instead of soundcard output)
Here is a patch:
diff --git a/bin/openob b/bin/openob index 4ce9b44..82af62f 100755 --- a/bin/openob +++ b/bin/openob @@ -44,6 +44,7 @@ parser_tx_alsa.add_argument('-d', '--alsa_device', type=str, default='hw:0', hel parser_tx_jack = parser_tx.add_argument_group('jack', 'Options when using JACK source type') parser_tx_jack.add_argument('-jn', '--jack_name', type=str, default='openob', help="JACK port name root") parser_tx_jack.add_argument('-aj', '--jack_auto', action='store_false', help="Disable auto connection for JACK inputs") +parser_tx_jack.add_argument('-jp', '--jack_port_pattern', type=str, default=None, help="JACK port pattern") parser_tx.add_argument('-r', '--samplerate', type=int, default=0, help="Set the sample rate to request from the input (Hz)") parser_tx.add_argument('-e', '--encoding', type=str, choices=['pcm', 'opus'], default='opus', help="The audio encoding type for this link; PCM for linear audio (16-bit), or Opus for encoded audio") parser_tx.add_argument('-p', '--port', type=int, default=3000, help="The base port to use for audio transport. This port must be accessible on the receiving host") @@ -68,6 +69,8 @@ parser_rx_alsa.add_argument('-d', '--alsa_device', type=str, default='hw:0', hel parser_rx_jack = parser_rx.add_argument_group('jack', 'Options when using JACK output type') parser_rx_jack.add_argument('-jn', '--jack_name', type=str, default='openob', help="JACK port name root") parser_rx_jack.add_argument('-aj', '--jack_auto', action='store_false', help="Disable auto connection for JACK inputs") +parser_rx_jack.add_argument('-jp', '--jack_port_pattern', type=str, default=None, help="JACK port pattern") + parser_rx.set_defaults(mode='rx') diff --git a/openob/audio_interface.py b/openob/audio_interface.py index d9dcd7b..a62f000 100755 --- a/openob/audio_interface.py +++ b/openob/audio_interface.py @@ -49,3 +49,5 @@ class AudioInterface(object): self.set("jack_name", opts.jack_name) else: self.set("jack_name", "openob") + if opts.jack_port_pattern is not None: + self.set("jack_port_pattern", opts.jack_port_pattern) diff --git a/openob/rtp/rx.py b/openob/rtp/rx.py index 3771533..6ff1a60 100755 --- a/openob/rtp/rx.py +++ b/openob/rtp/rx.py @@ -68,6 +68,8 @@ class RTPReceiver(object): sink.set_property('connect', 'none') sink.set_property('name', self.audio_interface.jack_name) sink.set_property('client-name', self.audio_interface.jack_name) + if self.audio_interface.jack_port_pattern: + sink.set_property('port-pattern', self.audio_interface.jack_port_pattern) elif self.audio_interface.type == 'test': sink = Gst.ElementFactory.make('fakesink') diff --git a/openob/rtp/tx.py b/openob/rtp/tx.py index 90481e8..6831be0 100755 --- a/openob/rtp/tx.py +++ b/openob/rtp/tx.py @@ -82,6 +82,9 @@ class RTPTransmitter(object): source.set_property('buffer-time', 50000) source.set_property('name', self.audio_interface.jack_name) source.set_property('client-name', self.audio_interface.jack_name) + if self.audio_interface.jack_port_pattern: + source.set_property('port-pattern', self.audio_interface.jack_port_pattern) + elif self.audio_interface.type == 'test': source = Gst.ElementFactory.make('audiotestsrc')
Port number is a transmitter parameter, but receiver use only default port 3000.
To set port parameter in tx and rx, move out of tx arguments.
EGG-INFO/scripts/openob
parser.add_argument('link_name', type=str, help="The link name this OpenOB Manager is operating on; must be the same on both Nodes")
parser.add_argument('-p', '--port', type=int, default=3000, help="The base port to use for audio transport. This port must be accessible on the receiving host")
subparsers = parser.add_subparsers(help="The link mode to operate in on this end")
openob/link_config.py
self.set("name", opts.link_name)
self.set("port", opts.port)
if opts.mode == "tx":
self.set("jitter_buffer", opts.jitter_buffer)
Now the new usage:
usage: openob [-h] [-v] [-p PORT] config_host node_name link_name {tx,rx} ...
Maybe some docs will be update too.
Great work, thanks!
PS: Sorry my English and very new in Git to pull well.
First pass at a graphical interface for transmission and reception.
I'm trying to install packages dependent on openob on raspian street, but it can't be found in the repositories. How do I solve this problem?
cant start TX test mode. RX test looks start normaly.
how do i fix it?
(my IP 192.168.0.4)
OS(from /etc/os-release)
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
pi@raspberrypi:~ $ openob 192.168.0.4 test-tx-node test-link tx 192.168.0.4
2019-01-12 02:59:40,772 - openob.link.test-link.config - INFO - Connecting to configuration host 192.168.0.4
Traceback (most recent call last):
File "/usr/local/bin/openob", line 4, in <module>
__import__('pkg_resources').run_script('OpenOB==4.0.2', 'openob')
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 739, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1501, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/OpenOB-4.0.2-py2.7.egg/EGG-INFO/scripts/openob", line 81, in <module>
File "build/bdist.linux-armv7l/egg/openob/link_config.py", line 89, in set_from_argparse
File "build/bdist.linux-armv7l/egg/openob/link_config.py", line 51, in set
File "build/bdist.linux-armv7l/egg/redis/client.py", line 1394, in set
File "build/bdist.linux-armv7l/egg/redis/client.py", line 754, in execute_command
File "build/bdist.linux-armv7l/egg/redis/connection.py", line 619, in send_command
File "build/bdist.linux-armv7l/egg/redis/connection.py", line 659, in pack_command
File "build/bdist.linux-armv7l/egg/redis/connection.py", line 113, in encode
redis.exceptions.DataError: Invalid input of type: 'bool'. Convert to a byte, string or number first.
pi@raspberrypi:~ $
pi@raspberrypi:~ $ openob 192.168.1.109 recepteur transmission rx
2018-08-20 15:09:35,519 - openob.link.transmission.config - INFO - Connecting to configuration host 192.168.1.109
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 484, in connect
sock = self._connect()
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 541, in _connect
raise err
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 529, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/redis/client.py", line 667, in execute_command
connection.send_command(*args)
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 192.168.1.109:6379. Connection refused.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 484, in connect
sock = self._connect()
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 541, in _connect
raise err
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 529, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/openob", line 81, in
link_config.set_from_argparse(opts)
File "/usr/local/lib/python3.5/dist-packages/openob/link_config.py", line 83, in set_from_argparse
self.set("name", opts.link_name)
File "/usr/local/lib/python3.5/dist-packages/openob/link_config.py", line 51, in set
self.redis.set(scoped_key, value)
File "/usr/local/lib/python3.5/dist-packages/redis/client.py", line 1171, in set
return self.execute_command('SET', *pieces)
File "/usr/local/lib/python3.5/dist-packages/redis/client.py", line 673, in execute_command
connection.send_command(*args)
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 192.168.1.109:6379. Connection refused.
Dear desire guidance on how to use the receiver_host file for multicast transmission
Not sure what's causing this; only happens on the one sound card. Receiver seems happy.
IndexError: list index out of range
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/OpenOB-2.3-py2.7.egg/openob/rtp/tx.py", line 126, in on_message
if int(message.structure['peak'][0]) > -1 or int(message.structure['peak'][1]) > -1:
IndexError: list index out of range````
Rip the RTP classes to bits and split pipeline construction up to be more modular, expose public APIs for adding outputs (udpsink) and inputs (udpsrc).
This will require moving some more logic about pipeline construction into the manager class, but that's fine - it should be there anyway.
OpenOB currently assumes stereo audio for all bitrates. There should ideally be two flags - one for 'mono below bitrate X' and one for 'force mono always'.
I installed OpenOB on two Debian machines by:
sudo aptitude install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gir1.2-gstreamer-1.0 python3-gst-1.0 python3-redis python3-gi python3-setuptools
sudo aptitude install redis-server
sudo sed -i.bak 's/bind 127.*/bind 0.0.0.0/' /etc/redis/redis.conf && sudo service redis-server restart
sudo aptitude install python3-pip
sudo pip3 install OpenOB
sudo aptitude install alsa-utils
sudo alsactl init
I think in the doc in "If you wish to use Python 3, you must install python3-redis, python3-gst-1.0 and python3-setuptools instead of the Python 2 equivalents." python3-gi
is missing. Maybe two lines to copy would be easier. And maybe add python-pip
/python3-pip
Here, Redis is at the transmitter.
TRANSMITTER
Quick test:
arecord -D hw:1 -f CD test1.wav -V stereo
which shows a moving vu meter.
However
openob 192.168.0.188 test-tx-node test-link tx 192.168.0.137 -a alsa -d hw:1
2018-10-22 00:48:37,431 - openob.link.test-link.config - INFO - Connecting to configuration host 192.168.0.188
2018-10-22 00:48:37,449 - openob.node.test-tx-node - INFO - Link test-link initial setup start on test-tx-node
2018-10-22 00:48:37,450 - openob.node.test-tx-node.link.test-link - INFO - Starting up transmitter
2018-10-22 00:48:37,451 - openob.node.test-tx-node.link.test-link.tx - INFO - Creating transmission pipeline
2018-10-22 00:48:37,452 - openob.node.test-tx-node.link.test-link - ERROR - Transmitter crashed for some reason! Restarting...
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/openob/node.py", line 45, in run_link
transmitter = RTPTransmitter(self.node_name, link_config, audio_interface)
File "/usr/local/lib/python3.5/dist-packages/openob/rtp/tx.py", line 21, in __init__
self.build_pipeline()
File "/usr/local/lib/python3.5/dist-packages/openob/rtp/tx.py", line 52, in build_pipeline
self.source = self.build_audio_interface()
File "/usr/local/lib/python3.5/dist-packages/openob/rtp/tx.py", line 75, in build_audio_interface
source.set_property('device', self.audio_interface.alsa_device)
AttributeError: 'NoneType' object has no attribute 'set_property'
2018-10-22 00:48:37,955 - openob.node.test-tx-node.link.test-link - INFO - Starting up transmitter
2018-10-22 00:48:37,957 - openob.node.test-tx-node.link.test-link.tx - INFO - Creating transmission pipeline
2018-10-22 00:48:37,959 - openob.node.test-tx-node.link.test-link - ERROR - Transmitter crashed for some reason! Restarting...
Invoking without -a alsa
results in no audio and
openob 192.168.0.188 test-tx-node test-link tx 192.168.0.137 -d hw:1
2018-10-22 01:12:50,445 - openob.link.test-link.config - INFO - Connecting to configuration host 192.168.0.188
2018-10-22 01:12:50,463 - openob.node.test-tx-node - INFO - Link test-link initial setup start on test-tx-node
2018-10-22 01:12:50,464 - openob.node.test-tx-node.link.test-link - INFO - Starting up transmitter
2018-10-22 01:12:50,465 - openob.node.test-tx-node.link.test-link.tx - INFO - Creating transmission pipeline
2018-10-22 01:12:50,513 - openob.node.test-tx-node.link.test-link.tx - INFO - Set receiver to 192.168.0.137:3000
2018-10-22 01:12:50,537 - openob.node.test-tx-node.link.test-link.tx - WARNING - Waiting for audio interface/caps
2018-10-22 01:12:51,552 - openob.node.test-tx-node.link.test-link.tx - INFO - Started mono audio transmission
An external interface that was recognized at hw:2
gave the same result.
RECEIVER
Also did a successful quick test with aplay piano2.wav
and aplay piano2.wav -D hw:0
openob 192.168.0.188 test-rx-node test-link rx -a alsa -d hw:0
2018-10-21 19:41:51,114 - openob.link.test-link.config - INFO - Connecting to configuration host 192.168.0.188
2018-10-21 19:41:51,120 - openob.node.test-rx-node - INFO - Link test-link initial setup start on test-rx-node
2018-10-21 19:41:51,122 - openob.node.test-rx-node.link.test-link - INFO - Waiting for transmitter capabilities...
2018-10-21 19:41:51,124 - openob.node.test-rx-node.link.test-link - INFO - Got caps from transmitter
2018-10-21 19:41:51,124 - openob.node.test-rx-node.link.test-link - INFO - Starting up receiver
2018-10-21 19:41:51,126 - openob.node.test-rx-node.link.test-link.rx - INFO - Creating reception pipeline
2018-10-21 19:41:51,139 - openob.node.test-rx-node.link.test-link - ERROR - Receiver crashed for some reason! Restarting...
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/openob/node.py", line 60, in run_link
receiver = RTPReceiver(self.node_name, link_config, audio_interface)
File "/usr/local/lib/python3.5/dist-packages/openob/rtp/rx.py", line 20, in __init__
self.build_pipeline()
File "/usr/local/lib/python3.5/dist-packages/openob/rtp/rx.py", line 42, in build_pipeline
self.output = self.build_audio_interface()
File "/usr/local/lib/python3.5/dist-packages/openob/rtp/rx.py", line 62, in build_audio_interface
sink.set_property('device', self.audio_interface.alsa_device)
AttributeError: 'NoneType' object has no attribute 'set_property'
2018-10-21 19:41:51,244 - openob.node.test-rx-node.link.test-link - INFO - Waiting for transmitter capabilities...
2018-10-21 19:41:51,247 - openob.node.test-rx-node.link.test-link - INFO - Got caps from transmitter
2018-10-21 19:41:51,247 - openob.node.test-rx-node.link.test-link - INFO - Starting up receiver
2018-10-21 19:41:51,250 - openob.node.test-rx-node.link.test-link.rx - INFO - Creating reception pipeline
2018-10-21 19:41:51,260 - openob.node.test-rx-node.link.test-link - ERROR - Receiver crashed for some reason! Restarting...
openob 192.168.0.188 test-rx-node test-link rx -d hw:0
2018-10-21 19:49:56,249 - openob.link.test-link.config - INFO - Connecting to configuration host 192.168.0.188
2018-10-21 19:49:56,254 - openob.node.test-rx-node - INFO - Link test-link initial setup start on test-rx-node
2018-10-21 19:49:56,256 - openob.node.test-rx-node.link.test-link - INFO - Waiting for transmitter capabilities...
2018-10-21 19:49:56,257 - openob.node.test-rx-node.link.test-link - INFO - Got caps from transmitter
2018-10-21 19:49:56,258 - openob.node.test-rx-node.link.test-link - INFO - Starting up receiver
2018-10-21 19:49:56,267 - openob.node.test-rx-node.link.test-link.rx - INFO - Creating reception pipeline
2018-10-21 19:49:56,310 - openob.node.test-rx-node.link.test-link.rx - INFO - Listening for stream on 192.168.0.137:3000
2018-10-21 19:49:57,440 - openob.node.test-rx-node.link.test-link.rx - INFO - Receiving mono audio transmission
EDIT1:
Using hw:1,0
instead hw:1
makes no difference for arecord
and openob โฆ tx
My next try would be python2.
EDIT2:
I also tried trx from http://www.pogo.org.uk/%7Emark/trx/
https://github.com/eugenehp/trx (old version only)
Installed via
sudo aptitude install libasound2-dev libopus-dev libortp-dev checkinstall
git clone http://www.pogo.org.uk/~mark/trx.git
cd trx
make
sudo checkinstall
It works with tx -d plughw:1 -h 192.168.0.137
and just rx
on the receiver. Interestingly, it gives me noise after the tx is stopped. OpenOB stays totally silent.
Invoking
openob 192.168.0.188 test-tx-node test-link tx 192.168.0.137 -a alsa -d plughw:1
leads to the exact same error as written above.
Hi @JamesHarrison and @jonty-comp
It seems that there is an issue with pcm audio and latest version.
I tried first with latest openob version (for Gst 1.0) and opus audio and all works fine.
With pcm audio it doesnt work at all, rx seems to get data but stuck and no audio is out.
After inserting an error trap inside on_message function while on pcm audio and run again i got this error from receiver Error: gst-stream-error-quark: Internal data flow error. (1)
When i tried this setup : tx (last version Gst 1.0) and rx (old version of openob gst 0.10 - i manually add caps in redis for old version cause there are not compatible between Gst 1.0 and Gst 0.10 ) then pcm works fine, so the problem might be on Receiver class.
By having a look in redis caps and in code everything seems fine for pcm audio though but i'm not very familiar with Gst code so i can't help further.
Could someone verify that pcm audio works with latest version and it's not a specific issue with jessie ?
All Gstreamer libraries for old and new version are installed with all the plugins also..
This issue happens on Raspbian jessie with python 2.7.
Redis has made some unfortunate licensing changes lately, and we don't actually use redis for much in OpenOB, just transferring some basic information about the link.
It would be better to either use an RPC mechanism between client/server to exchange information, with direct communication instead of using a server to mediate communication, or to use standard protocols in-band to transfer information from server to client.
Clean up the source queue and associated filters
Minor issue in display
There's some oddities with timing in the receiver.
Removing the audiorate element appears to do the job.
The decoder appears to spit out audio with some delay in some cases, causing audiorate to insert blank chunks of audio then discard real audio.
There perhaps should be a queue between the decoder and rest of the pipeline but this seems highly variable; some root cause analysis is required first!
Hi,
I've started playing with this software today, and first of all, thanks for your work!
I'm interested in creating a multicast link to stream the same audio on many buildings of the school I work.
Trying the package I was having a continues "CRITICAL - No data received for 3 seconds!" message so I've red all the code and found that the multicast selection is not set correctly on the receiver.
In particular, in the LinkConfig object the multicast (and all the bool value) is set as a int on redis (line 54), read back as a string and compared with the string 'True', that could never work.
So I've changed the line 54 to
value = ('True' if value else 'False')
and now it work.
Hope this can help.
Let me know if you need the PR with the modification or you can integrate it directly ;)
Cheers Mix
Hello guys!
I know gstreamer can be used also under macOS/OS X.
Does openob require modifications to access CoreAudio interfaces?
Thank you.
Ivan
This message always appears to me.
### redis.exceptions.DataError: Invalid input of type: 'bool'. Convert to a byte, string or number first.
CELT does not work at higher bitrates like Opus does and needs limiting/error message on CELT+>192k selection.
OpenOB should be aware of what GStreamer elements are available and auto-default between Opus and CELT as appropriate.
Hello guys!
I'm trying to transmit stereo audio acquired by a Griffin iMic, but when I run openob I always obtain:
INFO - Started mono audio transmission
How can I force stereo transmission?
Thanks so much.
Ivan
Hi there!
I would like to suggest the feature, that openob also provides an optional channel back from the receiver to the transmitter.
We want to use openob for a studio-studio-connection, but we would also like to have a link back from the receiving studio.
I know we could just setup a second link on the same devices going the other way round, but it would be way easier if you would just need to specifiy "I want also a channel in the oppsite direction".
Cheers,
Martin
Hello James,
First thank you for you nice project; I appreciate it!
I was able to run successful a forward and backward link with 2 RPI2/3 and 2 UCA202. So the docs should be changed, that from RPI2 and up, the USB SoundCard could be used.
Now the question: Do you have any plans to port OpenOB to Jessie for RPI3? There are some minor changes in the packages.
Thank you and regards from Switzerland
Lukas
Hi,
i've to make a test between two pc with Linux Ubuntu or Windows and Linux one.
Can you help me to realize this configuration?
I've a lot of problem with installation of Gstremer0.10 .
Let me know if you can help me.
Thank you.
Hello!
This was a great project, but is it still alive?
A refresh of the dependencies and tutorials is needed.
As per discussion on the mailing list: http://lists.talkunafraid.co.uk/pipermail/openob-users/2013-October/000016.html
When running OpenOB Tx on some embedded ARM platforms (details to be filled in), intermittant "tic" sounds are heard.
There's some problems even with PCM on the RPi being glitchy - this probably is a driver bug but wants at least addressing in documentation.
OpenOB needs some way to be aware of link quality and bandwidth so it can perform bandwidth flexing, report connectivity issues, etc.
This should at least provide:
Buffer state may also be worth monitoring.
This should all be exposed via a callback interface in Python.
Simplify everything by removing CELT support, as Opus is now widely supported. 2.3.7 will be the last OpenOB release to support CELT.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.