First steps with NMM

October, 08th 2004

Copyright (c) 2002-2005
  NMM work group,
  Computer Graphics Lab,
  Saarland University, Germany,
  http://www.networkmultimedia.org

Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation; with no Invariant Sections,
no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be
found in the file COPYING.FDL.

This document gives an introduction on how to use NMM.


Table of Contents
1. Using NMM
1.1. A simple mp3 player
1.2. A networked MP3 player
2. clic - command line interaction and configuration
3. Multimedia-Box

1. Using NMM

To install NMM you can either compile NMM from a source archive or you can use one of the precompiled binary packages. The source archive and the binary packages including an installation description can be found here. In this document we assume that NMM is located in the directory /home/bob/nmm.

1.1. A simple mp3 player

After installing NMM, you can try to run your first NMM application. Therefore, you should use the example helloworld11 which is located in examples/helloworld and realizes a simple mp3 player.

cd /home/bob/nmm/examples/helloworld    (if you use a source package)
./helloworld11 <my-mp3-file>

cd /home/bob/nmm/bin                    (if you use a binary package)
./helloworld11 <my-mp3-file>
   

This example consist in three nodes. The GenericReadNode reads the mp3 file, the MPEGAudioDecodeNode decodes the mp3 data and the PlaybackNode is responsible for audio play-back. To exit the application enter 'q' and press enter.

1.2. A networked MP3 player

NMM is especially designed to transparently access distributed devices. Consider an environment with two PCs, e.g. host1 that stores several mp3 files and host2 that should be used for play-back, because it is connected to a hi-fi system. To use distributed devices, you have to install NMM and start the serverregistry application on each host. This application manages all available nodes on the corresponding host and enables other applications to request and use them. Please read the documentation about this application, that can be found here, for further information.

The application hellonmm1 realizes a networked mp3 player, that reads an mp3 file from host1, decodes and playback audio on host2. To start this application you have to start the serverregistry application on host2:

cd /home/bob/nmm/apps/registry         (if you use a source package)
./serverregistry

cd /home/bob/nmm/bin                   (if you use a binary package)
./serverregistry
   

If the serverregistry application was successfully started, you can start the example hellonmm1 on host1.

cd /home/bob/nmm/examples/helloworld   (if you use a source package)
./hellonmm1 <my-mp3-file> host2

cd /home/bob/nmm/bin                   (if you use a binary package)
./hellonmm1 <my-mp3-file> host2
   

After starting the application, audio play-back should be performed on host2. To exit the application enter 'q' and press enter.

If both PC's are synchronized by the Network Time Protocol (NTP), you can use the application hellonmm2 to play-back the mp3 file on both hosts synchronously. To setup NTP for NMM see here. Now, start the serverregistry on host2 again.

cd /home/bob/nmm/apps/registry        (if you use a source package)
./serverregistry

cd /home/bob/nmm/bin                  (if you use a binary package)
./serverregistry
   

Then start the application hellonmm2.

cd /home/bob/nmm/examples/helloworld  (if you use a source package)
./hellonmm2 <my-mp3-file> host2

cd /home/bob/nmm/bin                  (if you use a binary package)
./hellonmm2 <my-mp3-file> host2
   

A description of the source code of these applications can be found here. If you would like to write your own node, please read the document "Developing Plug-ins for NMM", that can found here.