Streaming Audio

From NMTWiki

Jump to: navigation, search

Image:Yellowvsmall.jpg Medium difficulty requiring some technical skills, or some parts require more than basic knowledge.

The NMT devices can pick up supported audio streams from either a local or internet source. This guide walks you through a way to listen to unsupported media, such as a web radio station transmitting over the mms:// protocol. The principle is transcoding the stream to a supported format on a local PC or server. The NMT device can then playback this stream.

There are various ways and tools to do this. Here is one way, originally described by user jofa on the NMT forum using edcast and Icecast. The same could also be acheived with Shoutcast and Winamp with Shoutcast DSP combination, or VLC.

Contents

Using edcast and Icecast

  • Install edcast (you can use standalone version, no need for foobar)
  • Install Icecast
  • Configure Icecast. Make sure to set the port to something not used by other service such as myiHome. e.g. 8080.

Change/check the password.

  • Configure edcast. Enter the url to icecast. Typically
http://localhost:8080/stream.ogg

Change the password to the same as for icecast. (Not sure about this, but it works.) Check the name of the mount point: "/stream.ogg"

In edcast: - Click "Add encoder" button. A line saying something like "Vorbis: Quality 0/..." appears. - Double click the line, and a configuration window appears. There you see mount point.

Otherwise, if your happy with the default it is also viewable in icecast, once you have connected with edcast. A line saying "/stream.ogg" appears in icecast. Click that and you'll see the "listenurl".

  • Create an html file containing this (optimized for HD resolutions)
<html>
<head>
<title>Audio playback</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<head>
<meta SYABAS-FULLSCREEN>
<meta SYABAS-BACKGROUND="file:///opt/sybhttpd/localhost.images/hd/bg.jpg">
<style type="type/css">.menu {font-size:22px;color:#B1D3F6;font-weight:bold;} 
 		.menu_h {font-size:22px;color:#FFCC00;font-weight:bold;}
 		.txt {font-size:20px;color:#A8D1E6;font-weight:bold;}
 		.boxtxt {font-size:18px;color:#91B3D0;font-weight:bold;}
 		.status {font-size:20px;color:#639FBE;}
 		.server {font-size:20px;color:#5C9CC2;font-weight:bold;} 
 		.button {font-size:20px;color:#A8D1E6;}
 		.pagination {font-size:18px;color:#80B2D9;font-weight:bold;}
 		.list {font-size:20px;color:#B1D3F6;font-weight:bold;}
 		.title {font-size:24px;color:#CEE9F0;font-weight:bold;}
	</style>
</head>
<body bgcolor="#0A446F" onloadset="link" alink="#05BDF9" focustext="#FFCC00">
<p class="title">Audio plaback</p>
<a class="menu" href="http://192.168.0.100:8080/stream.ogg" aod>Listen to Spotify</a>
</body>
</html>

Where IP address should be the one your PC/server use and stream.ogg the same as you specify in "mount point", and exchange "Spotify" to what you want your link to be called.

  • Put this in a html file on the local NMT disk or a share where it can be reached. This html file is optimized for HD. SD TV users may want to change the background image to an optimized size. In the upper corner is the "Spotify" link. Select it, wait for it some time (could be around 20 seconds) while it connects and buffers, and then enjoy the music!

edcast config

Double-click on the Vorbis encoder setting at the bottom to enter the settings for the connection.

Change the following:

  1. Check the "use bitrate" box and type in e.g. 320 in the bitrate box
  2. Set the server port to 8080 (remember to use the same port in the html playlist file later!)
  3. Change the password to "mypass" or something equal to your Icecast setting

Icecast config

<!-- This config file contains a minimal set of configurable parameters,
     and mostly just contains the things you need to change.  We created
     this for those who got scared away from the rather large and heavily
     commented icecast.xml.dist file. -->
<icecast>
    <limits>
       <sources>2</sources>
       <queue-size>256000</queue-size>
       <burst-size>128000</burst-size>
    </limits>
    <authentication>
        <source-password>mypass</source-password>
        <relay-password>mypass</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>mypass</admin-password>
    </authentication>

    <hostname>localhost</hostname>
    <listen-socket>
        <port>8080</port>
    </listen-socket>
    <fileserve>1</fileserve>
    <paths>
        <logdir>./logs</logdir>
        <webroot>./web</webroot>
        <adminroot>./admin</adminroot>
        <alias source="/" dest="/status.xsl"/>
    </paths>
    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
          <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    </logging>
</icecast>

Other tips

Activating the bitrate-setting for quality in edcast to 192, it may improve the quality of the sound.

To disable audio on your Windows XP PC or Laptop while streaming music to your PCH:

  • Open Control Panel, click "Sounds and Audio Devices"
  • On Volume Tab, in Device Volume section, click "Advanced..." button
  • On Playback Control window, click "Advanced" button
  • Enable "1 Digital Output Only"
  • Click "Close"
Personal tools