Delco MJPEG Box
The Delco MJPEG Box is a piece of videoconferencing equipment available
for loan to the Internet2 member community. Bob Riddle, Internet2
Technologist shown in the picture on the right, built and configured
Internet2´s Delco MJPEG Box. The Delco MJPEG Box is a point-to-point
or multicast PC-based videoconferencing unit. MJPEG (Motion JPEG)
provides high-quality, full-frame video. The Delco MJPEG Box supports
both the PAL (European) and NTSC (U.S.) video standards.
The Delco MJPEG Box is named for Matthew Delco, a grad student
at University of California at Berkeley, who used the RTPtv
"Real Time Protocol" to implement the application
that synchronizes the outgoing audio and video streams. The Delco
MJPEG Box is inexpensive to build (approximately $1500) and some
members of the Internet2 community are building their own. Each
unit contains two MJPEG video cards for encoding/decoding (approximately
$400 each) and a SoundBlaster Live sound card. A minimum network
connection of 10 Mbps is required for standard quality videoconferencing;
15-20 Mbps is preferred in order to get the best quality videoconferencing.
To request the Internet2 loaner Delco MJPEG Box, complete our Resource
Request form. Here is information about shipping
and insuring Internet2 loaner equipment. To learn more about
building one yourself, contact Bob Riddle <bdr@internet2.edu>.
The following sections describe how Bob Riddle configured and operated
the Internet2 Delco MJPEG Box. If you’re configuring your
own Delco MJPEG Box your implementation might be different, depending
on which sound card or other equipment you have.
Installing RedHat 7.1
Installing RTPtv
Installing ALSA audio support
Running a Videoconference
Installing RedHat 7.1
Run the normal GUI install process -— choosing "Custom
System" to avoid installing things that you don´t need.
You must also install the Development Environment as well as the
Kernel source and headers in case you want to build your own kernel
to support this code. Make sure you install the SSH clients &
server so you won´t have to run the Telnet or FTP server on
these machines.
Use the Disk Druid on the initial install and perform simple partioning
of the disk as follows:
64MB for /boot
517MB for swap file
8157MB for / (everything else left on the disk!)
Finally, set the machines to come up in "Text" mode "no
windows manager" because Xconfigurator might have to be run
since these machines will be shipped around without monitors. This
isn't a big deal, since you login in the text window and then issue
the "startx" command which will start the Gnome Window
Manager.
Also, install the following RedHat 7.1 ERRATA updates from the
RedHat website:
xloadimage
SYSVinit
mouseconfig
Xconfigurator
Mount
losetup
update
updategnome
netscape-common
netscape-communicator
Install the ntp RPM because these machies have to be in time-synch
for the audio and video to synch correctly. The ntp files can be
found on the install CDROM #2 (ntp-4.0.99k-15.i386.rpm). After the
install, run "chkconfig --list" and make sure "ntpd"
shows up in the list of services that can be run.
Use "chkconfig --del XXX" to disable network services
you don't care or need too run, where "XXX" is:
atd
kudzu
lpd
sendmail
apmd
portmap
nfs
nfslock
anacron
xinetd
Use "chkconfig --level 345 sshd on" to turn on the sshd
service, and "chkconfig --level 345 ntpd on" to turn on
the ntpd service. To finish setting up the ntp service, change the
/etc/ntpd.conf to use the Internet2 NTP servers. (You'll have to
contact Bob Riddle <bdr@internet2.edu>
or Mike LaHaye <mjl@internet2.edu>
if you want to know how to find these servers.)
Then change the /etc/profile file to add "./" to the
system PATH. Finally, reboot the system.
Installing RTPtv
Follow the instructions on Matthew
Delco's web page. Don't foget to:
- change the lilo.conf file (and to run lilo)!
- to add lml33.o to the /etc/modules.conf file!
In addition, perform the following steps:
- Retrieve the latest version of the code (version 29B as of
11/20/01), unzipped and untarred it which left a directory of
"current".
- Do a "cd current" then a "make", a "chmod
+x mkvidnodes" and finally a "mkvidnodes"
- Following a succesful make, copy the mjpeg board driver to
the appropriate place.For example, if you´re running this
on a SMP system, the copy command will look like "cp lml33.o
/lib/modules/2.4.2-2smp/kernel/drivers/media/video"
- Add the following line to /etc/module.conf "alias char-major-194
lml33"
- Run following command "depmod -a 2.4.2-2smp" to cause
lml33 module to be loaded when needed.
- Reboot
Installing ALSA audio support
Obtain the alsa driver and related files. Again, refer to Matthew
Delco's web page for guidelines. While RTPtv does support the
newer 9.x version of the alsa driver, you might have better luck
with the older 5.x version, which works better with some of the
more popular sound cards.
Here is a suggested implementation:
alsa-driver-0.5.11
alsa-lib-0.5.10b
alsa-utils-0.5.10
In order to build alsa - start with driver, then lib, then utils.
The example below shows an implementation for a SoundBlaster Live
sound card.
first, create the correct symlink to the kernel source - "ln
-s /usr/src/linux-2.4 /usr/src/linux"
cd alsa-driver-0.5.11
./configure --with-cards=emu10k1
make
make install
./snddevices
cd alsa-lib-0.5.10b
./configure --with-cards=emu10k1
make
make install
cd alsa-utils-0.5.10
./configure --with-cards=emu10k1
make
make install
Now the /etc/modules.conf file must be changed in the following
way:
get rid of the default audio support insatlled by the RedHat install
by commenting out (put a "#" at the beginning of the line)
the following items in the modules.conf file:
alias sound-slot-0 emu10k1
post-install sound-slot-0 ...
pre-install sound-slot-0 ....
Then add the following line to the modules.conf file:
alias snd-card-0 snd-card-emu10k1
alias snd-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
Also add these lines if you want the gnome audio mixer to work
(or you could just use the alsamixer!):
alias snd-card-1 snd-card-emu10k1
alias snd-slot-1 snd-card-0
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
Now, run the "depmod -a 2.4.2-2smp" command to tell the
kernel which audio modules to load and reboot!
Finally, after reboot, run "alsamixer" and set volume
and unmute then run "alsactl store" which will create
a "/etc/asound.conf " file which will be used by the /etc/rc.d/init.d/asound
startup script. If you want to save your current alsa settings,
you´ll have to run "alsactl store".
Running a Videoconference
Make sure you have the camera hooked up correctly and the audio
equipment plugged in and setup. Each Delco box has at least one
soundcard and two lml33 mjpeg boards. Here's what the back of the
delco box looks like:
.jpg)
- The yellow cable is the ethernet connection.
- The yellow plug with the black cable is the camera input - it
must go in that card because linux makes that lml33 card #1 -
which is the default card!
- The gold plug with the black cable goes to the NTSC monitor
- linux thinks this is lml33 card #2.
- The little gray plug & cable is the PC microphone which
goes into the red (or pink) soundcard port. If you choose to use
line-in audio input, use the blue port above the gray cable and
make sure you adjust the soundcard settings using alsamixer &
gmix.
- The green plug on the little grey cable goes to the PC speakers.
Always test the audio using the RealPlayer to make sure the speakers
are hooked up correctly.
You can read more about these applications on Matthew
Delco's web page. There are basically four programs that need
to be run.
vserver - transmits the video sent from the local camera, using
a lml33 board
vclient - a video receiver for stuff sent by an vserver, using
a lml33 board
aserver - transmits the audio captured by the mic (or line-in)
port on your sound card
aclient - receives the audio sent by an aserver
You need to be in the RTPtv directory to run these programs. So,
the first thing you should do after logging in as root (and starting
the window manager) is to open four shell (Gnome terminal) windows
and issue the following command in each window: "cd current/rtp"
Assuming you're trying to do a video conference, here's the order
and the parameters to get things going, one application per window:
"vserver -B 10000000" This says to transmit video at
10 Mbps (-B 10000000)
Note: To transmit video at 5 Mbps or 20 Mbps instead, use
one of the following:
"vserver -B 5000000" This says to transmit video at
10 Mbps (-B 5000000)
"vserver -B 20000000" This says to transmit video at
10 Mbps (-B 20000000)
"aserver -I" this says to transmit the audio
"vclient -2 -Z 0.07 dns.delcobox.vserver.edu" this is
the video receiver, which will use the second lml33 card (-2) with
latency set to 70 ms (-Z 0.07) from the vserver on whatever the
IP address or DNS name of the transmitting machine (dns.delcobox.edu).
Of course, the vserver machine could be the same machine - localhost
(not a bad idea for testing). For local testing, you can choose
not to use the "-Z" option at all, which will introduce
a few second latency that makes it easier to do local testing.
"aclient -Z 0.07 dns.delcobox.vserver.edu" this is the
audio receiver with latency set to 70 ms (-Z 0.07) from the vserver
on whatever the IP address or DNS name of the transmitting machine
(dns.delcobox.edu). the latency parameter should be set to the same
value as chosen for the vclient.
Of course, you can also transmit the audio and video on a multicast
channel, and run the vclient and aclient to pick up on those channels
- see Matthew
Delco's web page for those parameters.
|