Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with setup: ALSA fails, -a auto results in mono and no audio #40

Closed
Matzeee opened this issue Oct 22, 2018 · 3 comments
Closed

Help with setup: ALSA fails, -a auto results in mono and no audio #40

Matzeee opened this issue Oct 22, 2018 · 3 comments

Comments

@Matzeee
Copy link

Matzeee commented Oct 22, 2018

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.

@Matzeee
Copy link
Author

Matzeee commented Oct 22, 2018

Reinstalling with python 2.7 gave the exact same error(s).

@Matzeee
Copy link
Author

Matzeee commented Oct 24, 2018

Found it: the package gstreamer1.0-alsa was missing.
This should be added to doc/source/tutorial.rst

Could you maybe add the setup instructions to the README.md or mention the doc-folder? Because right now, the first thing one finds is the outdated tutorial at
https://jamesharrison.github.io/openob/tutorial.html#installing-prerequisites

Or may I add a pull request for it?

@jonty-comp
Copy link
Contributor

jonty-comp commented Oct 25, 2018 via email

JamesHarrison added a commit that referenced this issue Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants