Re: Streaming audio over home network w/ alsaloop & [m]trx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 2 September 2018 20:20,
Caelia Chapin <crc@xxxxxxxxxx> put forth the proposition:
> Hello, all --
>
> I am attempting to set up an audio stream on my home network for music
> listening. I have a desktop PC and a little headless server, both running
> Arch Linux. The server is attached to speakers and contains all my music
> files on disk (and I've been using MPD to play those files for some time -
> no problem with that), but I need to use the desktop machine to reliably
> access some of the streaming music services that I use ... so, long story
> short, after a lot of web browsing and experimentation, I have determined
> that I need to run an audio stream from the desktop machine to the server.
>
> [Oh, BTW, my answer to anything involving PulseAudio is NO. Don't have it,
> don't want it, don't want to hear about it. Thank you. However, I would
> definitely consider using Jack if my current effort fails. I use, like, and
> trust Jack. But for this purpose it seems like the fewer components
> involved, the better.]
>
> Anyway, I found a document entitled "Streaming desktop audio on Linux
> without PulseAudio or JACK" (
> http://www.pogo.org.uk/~mark/trx/streaming-desktop-audio.html), which seems
> to address my need, and I have followed the recipe up to the point where
> you manually send the audio stream. Except that I am using mtrx (
> https://github.com/VittGam/mtrx) instead of trx. That's because I found
> mtrx before I installed trx, and based on its name and the fact that the
> code is more recent, presumably its author believes it is an improvement on
> trx - and since I don't have the expertise to be able to independently
> judge that claim, I just have to assume he knows what he's doing ;-) .
> Anyway, I also tried trx when I ran into the issue I'm about to describe,
> but the 'rx' program segfaulted when I sent the stream, so that's probably
> not going to work.
>
> So, when I send an audio stream according to the instructions, I can hear
> the music over the speakers as expected, but the quality is not really
> acceptable. There are constant momentary dropouts. I suspect that this has
> to do with network performance and/or buffering, because the 'mrx' program
> running on the server is emitting error messages about buffer underruns. So
> I have a rough idea of what might fix this:
>
> 1) Adjust the buffer size? However, unlike trx, which allows you to specify
> a specific buffer size, mtrx has an 'alsa buffer multiplier' parameter,
> with a default value of 3. However, I have no idea what exactly that
> represents, or what the range of reasonable values is. Also, if I am
> setting this parameter, do I need to set it on both the server and the
> client - and do I need to set it to the *same value* on both sides?
>
> 2) Fix something in the network. I guess that's slightly off-topic, but
> I've never done anything with UDP over a network, so any tips would be
> appreciated. Note that while the desktop is connected via ethernet, the
> server is on WiFi.
>
>      a) Tweak some settings on the router. But I have no idea what settings
> to tweak.
>
>      b) Run an ethernet cable to the server. Not hard, but as a renter I am
> trying not to
>           attach too many things to the walls.
>
> TIA for any assistance!

Interesting. Your setup seems pretty much identical to mine, except
that I use moc to play music on my server rather than mtp.

I haven't heard of rtx/mrtx before, but it sounds an awful lot like
NAS (Network Audio Sound), which I used for some years before
switching to jack. When I switched to 64 bit NAS would keep locking
up for some reason.

My setup uses jack both ends, with alsa loopback to catch things that
don't support it on my laptop. Mostly web browsers, which seem to
live in their own world when it comes to integrating with linux.

I'd say, before doing anything else, try a cable. I'm no expert on
networking, but I tried gaming with wifi when I got my first laptop
and it kept lagging every now, and then and I was moaned at quite a
lot about it online too.

I think the problem is that wifi has too much stuff going on in the
background like encryption, decryption, key negotation etc. let alone
any random problems with signal etc.

So, try cable first. If that fails and you want to see my setup for
jack I'll gladly document it.

-Dave

--

(I tried to get some documentation out of Digital on this, but as far as
I can tell even _they_ don't have it ;-)
  -- Linus Torvalds, in an article on a dnserver

                                                            .--.  oo
                                                           (____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux