Git Product home page Git Product logo

network-audio-controller's People

Contributors

chris-ritsen avatar mo-way avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

network-audio-controller's Issues

SIGPIPE problem on Windows 10

Netaudio was installed using pip

Microsoft Windows [Version 10.0.19044.1766]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Alex>netaudio
Traceback (most recent call last):
File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\Scripts\netaudio.exe_main
.py", line 4, in
File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\site-packages\netaudio_init
.py", line 10, in
from .console.application import main
File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\site-packages\netaudio\console\application.py", line 1, in
from signal import signal, SIGPIPE, SIG_DFL
ImportError: cannot import name 'SIGPIPE' from 'signal' (C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\signal.py)

C:\Users\Alex>

TimeoutError when trying to list devices or IP addresses

Only lx-dante in the network.

List devices:

[nils@localhost network-audio-controller]$ ./network_audio_controller.py -l
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 121, in dante_command
    response = sock.recvfrom(2048)[0]
TimeoutError: timed out
'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 316, in get_controls
    self.name = response[10:-1].decode('ascii')
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 121, in dante_command
    response = sock.recvfrom(2048)[0]
TimeoutError: timed out
'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 316, in get_controls
    self.name = response[10:-1].decode('ascii')
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 121, in dante_command
    response = sock.recvfrom(2048)[0]
TimeoutError: timed out
'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 316, in get_controls
    self.name = response[10:-1].decode('ascii')
TypeError: 'NoneType' object is not subscriptable

List device IPs:

[nils@localhost network-audio-controller]$ ./network_audio_controller.py -a
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 121, in dante_command
    response = sock.recvfrom(2048)[0]
TimeoutError: timed out
'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 316, in get_controls
    self.name = response[10:-1].decode('ascii')
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 121, in dante_command
    response = sock.recvfrom(2048)[0]
TimeoutError: timed out
'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 316, in get_controls
    self.name = response[10:-1].decode('ascii')
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 121, in dante_command
    response = sock.recvfrom(2048)[0]
OSError: [Errno 113] No route to host
'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/nils/Development/network-audio-controller/dante/device.py", line 316, in get_controls
    self.name = response[10:-1].decode('ascii')
TypeError: 'NoneType' object is not subscriptable
10.42.31.18
10.42.31.17
10.42.31.10

SIGPIPE unavailable on Windows10/11 : catch exception ?

Hi,

EDIT: not seen previous open issue related to it: #9

netaudio device list
gives me error on Windows 11:
site-packages\netaudio\console\application.py", line 1, in <module> from signal import signal, SIGPIPE, SIG_DFL ImportError: cannot import name 'SIGPIPE' from 'signal' (C:\Program Files\Python312\Lib\signal.py). Did you mean: 'SIGFPE'?

Seen there: https://stackoverflow.com/questions/58718659/cannot-import-name-sigpipe-from-signal-in-windows-10

Replacing this solved in https://github.com/chris-ritsen/network-audio-controller/blob/master/netaudio/console/application.py the problem for me:

try:
    from signal import signal, SIGPIPE, SIG_DFL
    signal(SIGPIPE, SIG_DFL)
except ImportError:  # If SIGPIPE is not available (win32),
    pass             # we don't have to do anything to ignore it.

But don't know if it's the best solution.

Adding subscriptions by channel number not working

Attempting to add a subscription by channel number does not work (results in RuntimeError: coroutine raised StopIteration).

I think this is because it's attempting to match channel.number (which is an int) against self.option('rx-channel-number') (which is a str). I added a line of debugging to commands/subscription/_add.py as follows:

# ...
elif self.option("rx-channel-number"):

            for ch in rx_device.rx_channels.values():
                print('Considering', ch.number, type(ch.number), type(self.option('rx-channel-number')), ch.number == self.option('rx-channel-number'))
# ...

resulting in:

$ netaudio subscription add --tx-device-name StreamPC --tx-channel-name Right --rx-device-name VisualsPC --rx-channel-number 1
Considering 1 <class 'int'> <class 'str'> False
Considering 2 <class 'int'> <class 'str'> False
Considering 3 <class 'int'> <class 'str'> False
Considering 4 <class 'int'> <class 'str'> False
Considering 5 <class 'int'> <class 'str'> False
Considering 6 <class 'int'> <class 'str'> False
Considering 7 <class 'int'> <class 'str'> False
Considering 8 <class 'int'> <class 'str'> False
Considering 9 <class 'int'> <class 'str'> False
Considering 10 <class 'int'> <class 'str'> False
Considering 11 <class 'int'> <class 'str'> False
Considering 12 <class 'int'> <class 'str'> False
Considering 13 <class 'int'> <class 'str'> False
Considering 14 <class 'int'> <class 'str'> False
Considering 15 <class 'int'> <class 'str'> False
Considering 16 <class 'int'> <class 'str'> False

In case it makes a difference, this is on both Python 3.8 and 3.9, using v0.0.10 of netaudio.

Should DanteDevice.add_subscription use channel friendly names?

DanteDevice.add_subscription passes tx_channel.name to its command_add_subscription method. Dante naming weirdness means that channel "names" are always '01', '02' etc.

This works, and audio is routed appropriately, but it confuses Dante Controller into not knowing where that subscription is coming from: it gives green checkmarks against the tx device, but doesn't know which column to put them in.

By way of example: here ATEM-Input is subscribed to channels 1 and 2 from SQ6-Broadcast. The subscriptions were made with netaudio.

dante_1

These channels have friendly names of Broadcast L and Broadcast R respectively. You can see that Dante Controller thinks the subscriptions are actually to channels called 01 and 02 - which, surprisingly, works and audio gets passed appropriately.

dante_2

Should add_subscription be using these friendly names if present? (Come to think of it, should these friendly names be used in place of names everywhere they're used?)

Errors in demo.zsh

pip install netaudio

root@DidNoutVMubuntu:~/network-audio-controller/demo# uname -a
Linux DidNoutVMubuntu 5.4.0-110-generic #124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@DidNoutVMubuntu:~/network-audio-controller/demo# cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@DidNoutVMubuntu:~/network-audio-controller/demo# ./demo.zsh

netaudio device list
FPX6000R-022792
FPX6000T-022e70

netaudio channel list --device-name=avio-output-2

netaudio channel list --device-name=avio-usb-2

netaudio subscription list | head -n15 | sort -R | head -n10 | sort
Center@FPX6000R-022792 <- Center@FPX6000T-022e70 [Connected (Unicast)]
LeftCenter@FPX6000R-022792 <- LeftCenter@FPX6000T-022e70 [Connected (Unicast)]
Left@FPX6000R-022792 <- Left@FPX6000T-022e70 [Connected (Unicast)]
LeftSurround@FPX6000R-022792 <- LeftSurround@FPX6000T-022e70 [Connected (Unicast)]
LFEScreen@FPX6000R-022792 <- LFEScreen@FPX6000T-022e70 [Connected (Unicast)]
RIghtCenter@FPX6000R-022792 <- RIghtCenter@FPX6000T-022e70 [Connected (Unicast)]
Right@FPX6000R-022792 <- Right@FPX6000T-022e70 [Connected (Unicast)]
RightSurround@FPX6000R-022792 <- RightSurround@FPX6000T-022e70 [Connected (Unicast)]

netaudio subscription remove --rx-channel-name=128 --rx-device-name=lx-dante

  RuntimeError

  coroutine raised StopIteration

  at /usr/lib/python3.8/asyncio/base_events.py:616 in run_until_complete
       612│             future.remove_done_callback(_run_until_complete_cb)
       613│         if not future.done():
       614│             raise RuntimeError('Event loop stopped before Future completed.')
       615│
    →  616│         return future.result()
       617│
       618│     def stop(self):
       619│
       620│

netaudio subscription add --tx-device-name='lx-dante' --tx-channel-name='128' --rx-channel-name='128' --rx-device-name='lx-dante'

  RuntimeError

  coroutine raised StopIteration

  at /usr/lib/python3.8/asyncio/base_events.py:616 in run_until_complete
       612│             future.remove_done_callback(_run_until_complete_cb)
       613│         if not future.done():
       614│             raise RuntimeError('Event loop stopped before Future completed.')
       615│
    →  616│         return future.result()
       617│
       618│     def stop(self):
       619│
       620│

netaudio config --set-device-name='DI Box' --device-host='dinet-tx-1'

  ValueError

  None does not appear to be an IPv4 or IPv6 address

  at /usr/lib/python3.8/ipaddress.py:53 in ip_address
        49│         return IPv6Address(address)
        50│     except (AddressValueError, NetmaskValueError):
        51│         pass
        52│
    →   53│     raise ValueError('%r does not appear to be an IPv4 or IPv6 address' %
        54│                      address)
        55│
        56│
        57│ def ip_network(address, strict=True):

netaudio device list | grep -i 'DI Box'

netaudio config --set-device-name='dinet-tx-1' --device-host='192.168.1.41'
Device not found

netaudio device list | grep -i 'dinet-tx'
./demo.zsh:44: command not found: underscore
./demo.zsh:44: command not found: underscore
root@DidNoutVMubuntu:~/network-audio-controller/demo#

image

"timed out getting mDNS service" error

When using basic tool commands (device/subscription list) mdns service seams to timeout. This test deployment has quite a lot of Dante devices present in the space (about 50-60). In the end some device list is reported, but it does not represent all devices present in network.

Example:

^C[@ ~]$ netaudio device list --name=
timed out getting mDNS service
timed out getting mDNS service
timed out getting mDNS service
timed out getting mDNS service
timed out getting mDNS service
timed out getting mDNS service
timed out getting mDNS service
timed out
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/netaudio/dante/device.py", line 277, in get_controls
response = await self.dante_command(*self.command_device_name())
File "/usr/local/lib/python3.9/site-packages/netaudio/dante/device.py", line 96, in dante_command
response = sock.recvfrom(2048)[0]
socket.timeout: timed out
timed out
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/netaudio/dante/device.py", line 277, in get_controls
response = await self.dante_command(*self.command_device_name())
File "/usr/local/lib/python3.9/site-packages/netaudio/dante/device.py", line 96, in dante_command
response = sock.recvfrom(2048)[0]
socket.timeout: timed out
timed out
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/netaudio/dante/device.py", line 277, in get_controls
response = await self.dante_command(*self.command_device_name())
File "/usr/local/lib/python3.9/site-packages/netaudio/dante/device.py", line 96, in dante_command
response = sock.recvfrom(2048)[0]
socket.timeout: timed out

DanteCache Missing?

Hey,
I would like to help to develop.

But it looks like some code is missing on master?

Traceback (most recent call last):
File "/home/marc/Projects/network-audio-controller/netaudio/main.py", line 12, in
from netaudio.console.application import main
File "/home/marc/Projects/network-audio-controller/netaudio/init.py", line 10, in
from .console.application import main
File "/home/marc/Projects/network-audio-controller/netaudio/console/init.py", line 1, in
from .commands.channel import ChannelCommand
File "/home/marc/Projects/network-audio-controller/netaudio/console/commands/init.py", line 5, in
from .subscription import SubscriptionCommand
File "/home/marc/Projects/network-audio-controller/netaudio/console/commands/subscription/init.py", line 5, in
from ._list import SubscriptionListCommand
File "/home/marc/Projects/network-audio-controller/netaudio/console/commands/subscription/_list.py", line 13, in
from netaudio.dante.cache import DanteCache
ModuleNotFoundError: No module named 'netaudio.dante.cache'

ImportError Running Netaudio

Hi, I've installed Netaudio on Manjaro/Arch and when I run any of the commands such as Netaudio Device List I get the following...

netaudio device list
Traceback (most recent call last):
File "/usr/bin/netaudio", line 33, in
sys.exit(load_entry_point('netaudio==0.0.10', 'console_scripts', 'netaudio')())
File "/usr/bin/netaudio", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/netaudio/init.py", line 10, in
from .console.application import main
File "/usr/lib/python3.10/site-packages/netaudio/console/init.py", line 1, in
from .commands.channel import ChannelCommand
File "/usr/lib/python3.10/site-packages/netaudio/console/commands/init.py", line 1, in
from .channel import ChannelCommand
File "/usr/lib/python3.10/site-packages/netaudio/console/commands/channel/init.py", line 1, in
from cleo import Command
ImportError: cannot import name 'Command' from 'cleo' (/usr/lib/python3.10/site-packages/cleo/init.py)

Add related projects

I propose to add a section with related projects in README.md.

I'm developing an open source reverse-engineered unofficial Dante implementation - Inferno. Currently it emulates Dante receiver and can be used for recording audio.

The earliest public attempt of reverse engineering Dante is wycliffe. I haven't tried running it, but looks like it implements requesting subscriptions from Dante devices. It probably won't be visible in Dante Controller.

dante-aes67-relay.js - this small Node.js program relays a Dante multicast stream to AES67

I couldn't find any other open source projects related to Dante, but many Dante devices are AES67-compatible, so this list of AES67 audio resources could be linked to as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.