Problem with trx (sound forward) on LAN

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
user1111

Problem with trx (sound forward) on LAN

Post by user1111 »

Installed trx from gslapt, ran tx on one system, specifying the -h <IP> of another box on the same LAN. Ran rx on that other box ... and ... silence.

If I run tx with no parameters, and run rx -h <IP> of that host box, I see repeated flows of bad packets.

eztables is disabled, so not a firewall issue.

Anyone got trx (tx/rx) to work with Fatdog?

user1111

Re: Problem with trx (sound forward) on LAN

Post by user1111 »

Tried : viewtopic.php?p=57745#p57745

... seems to work, but no sound heard. Network activity and all looks like working, just nothing being heard.

As a alternative ...

I compiled/installed sndiod, along with compiling/installing alsa-sndio and set ~/.asoundrc to

pcm.!default { type sndio }

on the sound server/source (desktop) device. Starting sndiod on that server and then running

sndiod -dddd -a on -f rsnd/1 -L-

on my laptop (rsnd/1 as I use card 1 for sound, not card 0 (rsnd/0)) and that worked, vnc'd into the server and started chome on the server (IP 192.168.1.4) with
AUDIODEVICE=snd@192.168.1.5/0 /opt/google/chrome/chrome --no-sandbox
and sounds from playing youtubes worked, vlc session viewed youtube and played sound on my 192.168.1.5 ip laptop device ok. As did starting vlc (and aplay) in a similar manner. I say ok in the sense that it worked, to a degree, sound was very jittery/stalled, but 'getting towards working' (perhaps just rate tweaks/whatever being required).

If I don't pump sound through alsa, run via sndiod directly then sounds play very well (normal). Start sndiod on server, however that requires whatever player you run to also support sndio device sound output.

User avatar
rcrsn51
Posts: 1253
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 291 times

Re: Problem with trx (sound forward) on LAN

Post by rcrsn51 »

rufwoof wrote: Tue May 24, 2022 7:56 am

Tried : viewtopic.php?p=57745#p57745

... seems to work, but no sound heard. Network activity and all looks like working, just nothing being heard.

It works for me. I used Fatdog as the sender and the Bullseye Starter Kit as the receiver. I just had to rename the binaries.

I then used the Starter Kit as the sender and Fatdog as the receiver. That also worked.

It also streamed audio from Seamonkey when run as root.

User avatar
rcrsn51
Posts: 1253
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 291 times

Re: Problem with trx (sound forward) on LAN

Post by rcrsn51 »

No reply. Another waste of my time.

user1111

Re: Problem with trx (sound forward) on LAN

Post by user1111 »

rcrsn51 wrote: Thu May 26, 2022 12:51 am

No reply. Another waste of my time.

Sorry mate, I did sort of reply with a 'thanks' - as in good to know and giving it another try - but thus far with no luck. Very much looks like my multiple cards alsa configuration being the issue.

User avatar
rcrsn51
Posts: 1253
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 291 times

Re: Problem with trx (sound forward) on LAN

Post by rcrsn51 »

rufwoof wrote: Thu May 26, 2022 5:57 pm

Very much looks like my multiple cards alsa configuration being the issue.

That shouldn't be a problem - trx creates its own sound card called Loopback. Try moving /root/.asoundrc.trx to /etc/asound.conf

With that setup, I can stream Seamonkey as the spot user.

user1111

Re: Problem with trx (sound forward) on LAN

Post by user1111 »

Thanks.

I'm putting it on the back burner for now, I need to do a clean Fatdog install for testing purposes and with my existing setup I already have sound forwarding working fine (but using sndiod instead). The next version of Fatdog I believe will contain trx as part of the base system - so may just wait for that.

EDIT: Just noticed it may be a 'device busy' issue. I use sndiod, with that installed (I compiled the source myself) on my (Fatdog) laptop, in a terminal running sndiod -dddd -an on -f rsnd/1 -L- invokes it listening for card 1 (rsnd/1), however you can also daeomonise that. With that listening you can forward sound to it by setting export AUDIODEVICE=snd@192.168.1.5/0 (where 192.168.1.5 is my laptops IP). For instance on my Fatdog server (different box), with the export AUDIO.... setting exported, opening /opt/google/chrome/chrome --no-sandbox ... and any youtubes played have the sound output from my laptop speakers/headphones. Or locally on the laptop with that same AUDIODEVICE setting, aucat -i /usr/sounds/bell.wav plays the sound on the speakers. Very similar to trx in may respects but without having to mess around with .asound.conf.

Supplementing that I set my server to have sshd running, with the /etc/ssh/sshd_config for that having the 'compression' option set to 'no'. I can ssh into that from my laptop, or set up a ssh tunnel, for instance on my laptop (192.168.1.5 IP) set that to tunnel 5900 (vnc) port traffic to my server (IP 192.168.1.4)

ssh -L 5900:localhost:5900 192.168.1.4

So then running tigervnc on the server ('vncserver' command), means I only have to run
vncviewer localhost
on the laptop to connect to that. Opting for the default vnc settings for compression etc. and that works very well. If sshd compression were set on then that's just compressing already compressed data through the ssh tunnel (pointless overhead). Set up that way and video quality is good, and the above sndiod sound forwarding is also OK. Typically uses around 2MB/sec bandwidth when a youtube is playing in a quarter screen or so region (so around 16Mbs of bandwidth). As my server is hard wired (ethernet) whilst my laptop is wifi, internet speed tests indicate 110Mbs type general download speeds for surfing such that general browsing is quicker/snappier when I'm vnc'd into my server and browsing that way than if I surfed directly from my laptops browser.

I'm still using 100T LAN kit, so when that is upgraded to GigaBit ... so more the better.

More a case of it it ain't broke don't fix it, I don't want to mess around with trx to then find that my presently working sndiod setup stops working. Presently I think its the other way around, where sndiod is breaking trx.

In the following image normally I'd have F8 and set to fullscreen the server window, so it looks like a regular desktop, but have 'restored' that so the image shows multiple windows. Lower right terminal window is a laptop terminal window running ifconfig to show its wifi net connection.

i.jpg
i.jpg (80.77 KiB) Viewed 939 times

Running the same test from my laptop indicates 47.7Mbs download speed. The server also has twice as many cores as my laptop, so also processes quicker (for instance a kernel compile that might take 50 minutes on my laptop runs through in around 15 minutes on my server box).

Post Reply

Return to “FatDog”