menu Contact Us Dizzy Patients Health Care Providers Dizzy Culture Research Site DVD BPPV DVD Tai Chi DVD Understanding Dizziness Acknowledgements Disclaimer Quoting

Digital Video Recorders and Eye Movements

How I do it.

Timothy C. Hain, MD Page last modified: May 30, 2011

Computers and multimedia have made a huge impact in the world at large, and also in the oculomotor laboratory. It is possible to use readily available equipment to record video eye movements and public domain "free" programs to create movies out of your recordings. Herein I have outlined the how to do this.

Micromedical Technology monocular eye movement recording apparatus (Visual Eyes) Location of seondary camera -- a Panasonic security type camera.

Hardware

You should expect to spend about $4000 on your entire setup, almost all of it on the Micromedical goggle.  You should expect to spend several hours ordering these parts, and another hour to hook them all up.

Device

Cost (roughly)

Real-eyes goggle (Micromedical Tech) 2500
PIP processor (see below) -- these are needed but fortunately cheap. 150
Room CCTV camera, and mounting mechanism. wv-bp144 and mount. Doesn't matter much -- best to get one that adapts to light automatically. Don't forget to get cable (BNC), lens, and 12 volt power supply too. 200
Large monitor with Composite input (17" LCD, or CC-TV monitor) $400 (big and "industrial strength" is good).
Panasonic DVR DMR-EZ28K, cabling (various phono or BNC adaptors). $225, 100$
CE-labs audio and video amplifier, model 400 $40. (optional)

Video Input: I use a Micromedical Technology "Real-Eyes" system. This is a single camera set in a Scuba goggle. It is monocular, with a normal, "NTS" video output. At this writing, my advise is don't get the version with firewire output (although it MIGHT work with this particular DVR, which does have firewire input).

The other eye can be allowed to view or not, as the examiner desires. See this page for more comments.

We currently use the AMBERY 4 channel PIP processor (costs about $150) . The PIP box combines video from another camera that views the room, so that there is an inset on the eye of the examiner and examinee. This makes the entire editing process much easier. Generally about all you can tell from the PIP is the gender of the patient, their hair color, and what is being done. This is a good situation.

The current video camera that we use is a Panasonic WV-BP144. This camera is no longer made, and we are replacing it with LX-620SHW High Resolution Sony CCD CCTV Security Camera - 1/3 540 Lines.

The camera must be mounted and angled properly -- many camera stores sell appropriate devices for between $20 and $30.  We like the system of putting the camera on an IV pole, using a universal mount that allows it to be positioned.

 

Electrically,  the way this works is that the two cameras go to the PIP. The PIP goes to the DVR, and the DVR goes to the monitor. 

If you have the extra parts and cables, you can also set it up so that you also send the eyeball camera to the monitor 2nd input, so when you record you just see the eye, but when you play back, you see eye and what you were doing in the inset.

The output of the PIP processor goes into a distribution amplifier (unnecessary in reality), and then an appropriate DVR recorder (see above). Then the output of the DVR goes to a very large TV monitor. The audio signal from the goggles also goes to the DVD recorder.

The Panasonic DVR is a very handy device that writes a new title to the DVD for each patient. I currently have a Panasonic EX17. Toshiba is the current equivalent.

I have also tried a Sony brand DVR, but I much prefer the Panasonic/Toshiba. The Sony is much touchier with what type of video it will accept, and strangely enough, writes files that cannot be copied (easily). I guess Sony, in their zeal to prevent pirating, decided that their customers should not even be able to copy their own content ! Recall, Sony is the company that put a rootkit on their customer's music CD's !

Panasonic's DVR works fine and you don't have to fight with the Sony content management system to read your own material.   A nice feature of the Panasonic is that after you record your 20 or so patient files, when you push the eject button, it offers to burn your final DVD. This is handy.  The remote is also very handy -- as you can do everything from afar.

The Panasonic EZ17 recorder has a firewire input -- but it is useless. Seems to be a software problem.  A recorder that really does DV might be worth it, but not sure where to get one.

The CE-labs audio/video amplifier (optional) isolates your DVR-recorder and monitor from each other.  This is not necessary with the Panasonic DVR as everything you put into it can go right to your monitor, but might be useful for other situations. It is nice to be able to switch from full screen input to PIP mode on playback.

Typically each patient consumes about 5 minutes of the DVD. Usually one can get by with one DVD/week, but on very busy weeks, or days where one forgets to stop recording after a patient, sometimes it takes two. This costs you about $1.00 in media costs. I use Ritek 8X DVD+ disks.  It is not very touchy about media, and I have never had a "bad" DVD produced from this system.

At the start of each patient, I scan the camera over the patient's demographic information. This is to allow me to match up patients with video's later.

A days worth of patients might thus include about 8 to 12 titles (patients). At the end of each week, or when I forget to turn the recorder off (still do this after years), I "finalize" the DVD, write the date on it with a sharpie, and stick it in a drawer. Finalization takes about 1 minute.

Extraction of video content

At this point, you will have a DVD that you can play, but it will contain a lot of junk -- most recordings won't have anything worth preserving for posterity.    If you want to give a talk and show that really neat case from last week, this is what you do next.

 

Extract the title you want --

At present, I use "imtoo dvd to avi 6" to "rip" video from my own DVD's that I created myself using my DVR. Imtoo is a commercial "rip" program. It is fast, but somewhat buggy, and always seems to be undergoing revisions accompanied by a request for more money.

Well, it works well enough, and the next step is to convert the "chapter" of the disk you want into an "AVI" file. It is best to do it as high a quality as you can.

For this, you will need some additional freeware video editing programs:

  1. avisynth 2.5
  2. virtualdub
These are used to select the piece of video you want, put a subtitle on it, and compress it using a codec. I have tried using movie editing packages such as Adobe Premeire, but they just seem to be far more expensive, take longer to load and longer to write. They also crash frequently. Virtualdub is stable.

Compressed vs. uncompressed:

These are big file, generally not usable for presentations because the files are too big. However, it is a good idea if you are planning to do more editing. If you save the output as an uncompressed avi file, it is best to select out the piece you want, and just save that rather than a long stretch (like 5 min). Practically, about the most you can easily deal with is 1 minute.

Allternatively, you can select out the piece you want, compress it, and you are done. We suggest using a very old codec, such as the "Cinepak codec by Radius", rather than something newer, as while files may be a little bigger, they will run on nearly any computer. You are taking your chances if you use a newer codec, it may work on your PC, but not run off of anything else. This is the big problem with all of these "codecs" -- newer ones may not run on the PC that you plug your USB drive into. Any type of compression is going to take a lot longer (but use much less space) than uncompressed.

Making it prettier

Assuming that you want to make it prettier, once you get the video out of the MPEG format into an avi format, you can manipulate it -- clip it, title it, with the combination of avisynth and virtualdub. If all you want to do is to just show it as a clip, you don't need to do anything other than recompress it.

The way this works is that you create a small "avs" file, and open this up with virtualdub. Virtualdubmod doesn't seem to do this as well.

An example of an avs file is :


ShowSMPTE(x=600, text_color=$ffffff, size=32) # elapsed time stamp
-- we think this is generally a very good idea. Can use smaller size.
SelectEvery(2,1) # decimate to 15 fps # reduce frame rate -- don't do this for saccadic nystagmus
Subtitle("Posterior canal BPPV", text_color=$FFFFFF, size=32) # use your own title
Subtitle("Copyright Timothy C. Hain, M.D. 2006",text_color=$FFFFFF, size=28, align=1) # use your own nameReduceBy2 # pretty small -- don't do this if you need high resolution. Makes a big difference in size.

Another way to do this is to use dgmpgdec

First, you run dgindex to convert out of the mpeg format.

This gets you an uncompressed video and audio stream. Then you use virtualdub, with an avs file something like this:

LoadPlugin("C:\Program Files (x86)\dgmpgdec\DGDecode.dll")
MPEG2Source("VIDEO_TS\vts_01_1.d2v") # serves AVI frames from MPEG source
# To get audio, you need to add an audio stream using virtual dub mod

ReduceBy2 # pretty small

ShowSMPTE(x=220, text_color=$ffffff, size=10) # Elapsed timer
SelectEvery(2,1) # decimate to 15 fps

Subtitle("Meniere's -- wrong way nystagmus", text_color=$FFFFFF, size=20)
Subtitle("Copyright Timothy C. Hain, M.D. 2011",text_color=$FFFFFF, size=10, align=1)

 

Virtualdub allows you to cut what you want and save it as an avi file. Virtualdub is pretty crude with the subtitles, but it is very fast. Usually crude and fast is fine for a 10-60 second video.  The "filters" in Virtualdub will do almost everything but subtitles and showSMPTE - -in other words, you can reduce by 2 and select every other within virtualdub, rather than on in the AVS file.

At this point, you have an avi file that is generally pretty small, and suitable for use in your powerpoint or on the web.

References:

  1. http://www.avisynth.org/
  2. http://www.virtualdub.org/index

Dvddecrypter was bought by Macrovision Europe who announced that it's distribution is illegal. (boo). Copies can be easily located on the internet though, and as this use is entirely legal, it is difficult to see how anyone would object.

 

© Copyright April 6, 2012 , Timothy C. Hain, M.D. All rights reserved. Last saved on April 6, 2012