Streaming system audio from windows to another pc (linux)

So I want to hear what’s going on with my secondary (windows) pc on my headphones (connected to ubuntu).

Get system audio

My onboard realtek 888 does list ‘Stereo Mix’ as a recording option but it was always silent.
So, tried various virtual sound cards, they always either didn’t work/didn’t appear as a recording device, or they just cost more than I want to spend compared to running out and getting a 3.5mm audio cable and looping speaker plug to line-in.

Finally stumbled upon a suggestion:

How to fix Realtek ‘Stereo Mix’ silence? Select Speakers as your default playback device!

Next problem, I can’t select Loudspeaker unless something is plugged into that port because of the port sensing. The Realtek HD Audio Manager on my pc (asus re-branded realtek app) does not have any options to turn off jack sensing, so lets go deeper:
Regedit -> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\GlobalSettings\EnableDynamicDevices  = 0
And reboot. Still Jack sensing. Kept looking in regedit, the 0000 folder was just one audio driver on the system, the rest of the numbered folders after it (0001, 0002….) were for other drivers that had ever been installed for any sound device. I found another realtek HD one at 0018 and changed the setting there. Reboot. Still wont let me enable Loudspeaker.

Keep hunting…. in:
Regedit -> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0018\Settings\
there’s a setting ‘JackCtrl’ which I decided to start experimenting with. It was originally set to ” 3f e7 00 00 “. First trial, set to ” ff ff 00 00 ” and reboot. All of a sudden in playback devices I’ve got a “Realtek HD Audio 2nd output”. Looking into it I think it’s the front port, and with the previous setting jack sensing on ti is disabled, so I can select it. That doesn’t help though, as stereo mix still doesn’t get sound.

I eventually give up on finding a software fix, and instead found a short piece of plastic rod, ~ 3mm diameter, and shoved it in the speaker jack. Windows sees it, lets me enable Speakers as playback, job done. Set Speakers as playback default and stereo mix as recording default and we’re ready to stream!

Another option that could be investigated: WASAPI

Stream the audio

For my initial setup I used Vacard Streamer 2.0 that came with “Vacard 2.b1″. It’ll let me stream from system recording device to a rtp location. Just set the target to rtp://x.x.x.x:4444 where x.x.x is ip or resolvable hostname of linux box. It’ll happily stream as mp3 to reduce bandwidth.

I’ve since switched to using vlc to stream from the pc, started from a batch file.

start /b vlc.exe dshow:// :dshow-vdev=none :dshow-adev=”Line In (High Definition Audio Device)” :dshow-caching=20 :live-caching=50 :sout=#transcode{vcodec=none,acodec=mp3,ab=192,channels=2,samplerate=44100}:rtp{dst=alelec.local,port=5004,mux=ts,sap,name=Radio,ttl=1} :sout-mux-caching=100 :sout-rtp-caching=100 :sout-all :sout-keep

The dshow-adev line is correct for Windows 8, but in Windows 7 I needed it to ba called “Stereo Mix (2- Realtek High Def”

The name can be found initially by running vlc normally and going to file->open capture device

Select the desired audio device in the the drop down box next to Audio Device Name, and then click the “show more options” checkbox down the bottom of the screen. This then gives a printout of the command line name to user.


On linux (or mac) box I’ve got vlc running from the console in the background:
# vlc -I telnet –telnet-password vlc rtp://@:5004 –volume 128 &
And it faithfully plays whatever is streamed to it!

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment