I'm streaming audio from my Windows 7 laptop to a sound card attached to a router. I have a little batch script to start streaming.
REM Kill any instances of vlc
taskkill /im vlc.exe
"c:\Program Files\VideoLAN\VLC\vlc.exe" <parameters to start http streaming>
REM Wait for vlc
TIMEOUT /T 10
REM start playback on router
plink -ssh me@192.168.1.1 -pw password killall -9 madplay
plink -ssh me@192.168.1.1 -pw password wget -q -O - http://192.1.159:8080/audio | madplay -Q --no-tty-control - &
As you see the http stream is hard coded. It would be nice to get the address dynamically to reuse the script on other machines. Any ideas?
smbclient+nss_wins) and Apple Bonjour (avahi+nss_mdns). (I could also suggest LLMNR, but I'm not sure if there are any Linux resolvers for it.) This would remove the need for specifying the address in the router. – u1686_grawity Jan 07 '11 at 12:53wget -q -O - http://villepc:8080/audio(where instead ofvillepcyou would put the actual hostname your computer has). You would need a little configuration on the router, though. – u1686_grawity Jan 07 '11 at 18:25ping www.google.com,ping 4.2.2.2,ping superuser.com. You do not ping an URL or a path;ping //hostname/will never work. – u1686_grawity Jan 07 '11 at 18:26sshd, you could usewget -q -O - "http://${SSH_CONNECTION## *}:8080/audio", and the IP address would be filled in automatically by your router. (I'm not sure if this is OpenSSH-specific or if it will work with Dropbear too.) – u1686_grawity Jan 07 '11 at 18:29|and&(change to^|and^&), because otherwise they will be interpreted by your computer's local shell - it will actually try to runmadplayin your own computer. (I would also add that-pwcan be quite insecure, and one should use key-based authentication instead...) – u1686_grawity Jan 07 '11 at 18:32