Upgrading a VCR

This page describes how Henrik Carlqvist upgraded his old VCR.

(Year 2005)
CD and DVD

Today

At the time of this writing music and moving video are stored on media looking very similar.

LP and VHS

History

Once upon a time, a long long time ago, music was stored on big black things. During that age moving video was stored on tape in cassette.

Hitachi VCR

My old VCR

I happened to have one of those old relics from the past.

VCR connections

Connectors

It was a high tech VCR with Nicam stereo. It seemed to have dual SCART connectors, but only one of them was really usable.

VCR inside

The inside

Nothing here is useful, everything has to be replaced...

DVD+-RW and HD

Drives

The tape mechanism is replaced with a dual layer DVD±RW and a 250 GB Seagate Barracuda. The 3.5" HD is mounted in a 3.5" to 5.25" converter to make it fit better to the DVD drive.

DVB cards

Electronics

The electronics is replaced with two PCI cards, one for DVB-T and one for DVB-S. Everything is connected to a VIA mini-ITX motherboard running a 1 GHz eden fan-less CPU.

PCI cards

Short of space

Due to lack of space the DVB-cards has to be placed below the motherboard. The only PCI slot on the motherboard is connected to a PCI riser card with two PCI slots by a flexible PCI cable. Yet another flexible PCI cable is used to connect one of the PCI cards to the riser card.

Will it fit?

Will it fit?

I was able to get the drives and the cards into the box, but all those cables... Connected to the back of the box is audio in and out to the both SCART connectors. Also, the upper SCART has S-video out and composite video in. The lower SCART has composite video out and S-video in. Next to the SCART connectors there is a switch to select video input, the DVB-T card has one, but only one analog input. Other connectors on the back are SAT-in, antenna in, keyboard, VGA, network and coaxial and optical SPDIF.

VGA cable

VGA cable

As the motherboard and DVB-cards are built into the box cables are needed to connectors at the back of the box. Soldering a VGA cable is no fun, so I thought that I would save half the work by buying a ready made VGA cable. That way I would only have to solder one end. Unfortunately, it turned out that the cable of brand Wiretek bought at Clas Ohlsson didn't have pin 12 and pin 15 connected. I had to fix that myself with extra wiring. Pin 12 and 15 are used for DDC signals, without these the computer is unable to ask the monitor about name, resolution and refresh rates.

It did fit!

It did fit!

Yes! It did fit! At least it kind of did fit, the top of the box is no longer exactly flat...

Time to boot

Time to boot

As you can see, the hardware work isn't finished yet. There is still room for some kind of VFD display, and as a VHS tape was wider than a DVD drive the front now has a hole that has to be filled.

I've made some minor testing booting knoppix during the building of this machine, verifying that it could see the PCI cards and the drives. But once all was put together the machine simply refused to boot. At power-up the HD would spin up, but that was all. No video signal on the VGA port, no beep from the motherboard, no nothing.

After taking everything apart again I could see that one of the flex cables for one of the PCI extenders had come loose. Once that was put back in place the machine booted knoppix without problem. The drives were found and the PCI cards were found in /proc/pci.

I kept the machine running for some hour in knoppix and checked the temperature of the HD which then was 49 °C. That is pretty OK for a box without any fan at all, but the drive had only been spinning idle all the time.

short circuit

Short circuit

At the next boot the PCI cards were no longer found. It turned out that during my short burn in test the flat cable to the DVB-S card had been penetrated by a sharp soldering pin from the DVB-T card. That cable now had a short circuit between two pins. The problem is marked with a red circle in the picture above.

flat cable

Replacing the flat cable

I sacrificed an ATA-133 cable to replace the broken flat cable.

There is no way to make everything fit into the box without those flexible PCI extenders, but they have caused me a lot of trouble and seem to cause me even more trouble.

It now seems to be more or less random if all PCI cards will be found by BIOS at boot. I don't know if this is because of the fact that the PCI bus wasn't specified to have a 7 cm long stub. Things are probably not getting better by the fact that I'm using two 7 cm PCI extenders. It could also be that something got damaged when half of the PCI bus to one of the cards disconnected or when there was a short circuit between two pins on the PCI bus and a pin on one DVB-card which probably was connected to ground.

If it is hard to find those cards during boot I wonder how things are going to work when the cards will send a lot of data on the PCI bus.

padding

Padding

To avoid another short circuit I added some padding to the DVB-T card.

Slackware

Operating system

I installed Slackware current which probably soon is going to be Slackware 10.2. During the installation I basically followed the first steps at www.edafe.org/vdr.

X.org version 6.8.2 which was included in Slackware current did not out of the box support the XvMC extension which was needed for hardware acceleration of MPEG2 decoding. So I realized that I would have to recompile X for that.

glxgears

Hardware acceleration

I found a really nice project which used a motherboard similar to mine. On that page it was said that it was a P.I.T.A. to get the MPEG decoder and hardware OpenGL acceleration to work. After having read that I realized that I should also get hardware accelerated OpenGL to work :-). After following the instructions in the VIA Unichrome and DRI HOWTO I had it all working.

Without hardware acceleration glxgears gave about 70 fps. With hardware acceleration it gave about 630 fps. I don't think hardware 3D acceleration will be to any use in my application, but at least I know that I'm able to use it if I would like to.

first TV

First TV picture

After using /usr/src/linux-2.6.12.3/Documentation/dvb/get_dvb_firmware and installing the downloaded firmwares to /lib/firmware it seems as if both DVB cards might be working. Some day I might get myself a satellite dish to test the DVB-S card, but the DVB-T card is definitely working. I used the linux-dvb-apps-1.1.0 utilities from http://linuxtv.org/downloads to tune into a channel and was then able to copy directly from a dvb device to a file. That file was then copied to another machine in my network, where it turned out to be an mpeg2 file playable with mplayer :-). The file had a resolution of 720x576 and seemed to be 25 fps non-interlaced images. The pixels were not square as it had wide-screen format.

VDR

VDR

As VDR seems perfect for this kind of DVB appliance I started by installing that software. I was planning to use the softdevice plugin for output as I don't have any full featured DVB card. Unfortunately it turned out that softdevice didn't support XvMC on my VIA unichrome graphics. Instead I had to use the xine device plugin.

I really did like the OSD of VDR. I also really liked that there was a lot of plugins for VDR. Unfortunately, when looking on tv the frame rate wasn't smooth. Also VDR segfaulted a lot.

LIRC

LIRC

LIRC was configured to use the remote that came with the Avermedia DVB-T card. I liked the remote which belonged to my old video, but unfortunately I wasn't able to use that with the Avermedia card.
remote

More segfaults

Trying to use my remote and LIRC together with VDR caused VDR to segfault instantly. All these segfaults made me look for some software to replace VDR.
LIRC

Freevo

Freevo seemed like a nice piece of software even though it wasn't optimized for DVB. Installing Freevo was a lot of work compiling a never ending chain of dependencies of python and perl modules. Once it all was downloaded, compiled and installed Freevo refused to start claiming that a module that I had installed still was missing.

It turned out that Freevo wanted an older version of Python than the latest stable that was included with Slackware. Once I had installed that older version and recompiled the python modules I was able to start Freevo. Freevo can use mplayer or xine for output. I was able to compile them both with support for XvMC, but only xine was able to show any picture with XvMC.

distorted picture

Heat problem

Freevo was a lot more stable than VDR. It didn't segfault and the remote worked fine with LIRC. I also really liked the TV guide in Freevo. Still the system wasn't usable because of a varying framerate and distortions in the picture. The current stable version of Freevo also has the drawback that it only supports one DVB card.

I reverted back to record a file with dvb-apps once again. This time the recorded file also had distortions and a varying frame rate. The recorded file also caused mplayer to segfault.

It seems as if the DVB-T card is able to deliver a valid mpeg stream only for about a minute before it gets hot. This probably also explains some of the segfaults i had with VDR. My video obviously needs some cooling.

Big fan

Space needed for a fan

How will I get a fan into this small box filled with far to much already?
(Year 2006)
Small fans

40 mm fans

I bought two tiny 40 mm fans and used an old box which had been used for cotton buds.
Fans mounted

Fans in place

A saw was used to reshape the old cotton buds box to something completely different. As the width of the box was 80 mm the box was perfect for this purpose.
Fans mounted

Below the motherboard

The fans are completely below the motherboard. I was pleasantly surprised that I couldn't hear them running even when the cover was off. However, I wonder if they are enough to cool the system...

I will never know if the fans are enough to cool my hot PCI cards. After reassembling my video, once again the PCI cards were no longer found by the system. Several attempts to disassemble and reassemble my video didn't help. Obviously something is broken with my PCI bus and it seems to get worse each time the video is taken apart. I suspect the flexible PCI cables to cause my troubles, but now I'm giving up the PCI cards. I intend to take a pause in this project, then I will buy USB DVB devices instead.

It is hard to find good USB devices. They have to be small and at least one of them should have the remote IR receiver on a cable so I can place it where it belongs in the video. I need one DVB-T and one DVB-S device and they should have good support in Linux.

(Year 2007)
mythTV

MythTV

After about a year, mostly by a coincidence I started my old video. To my surprise it found the both DVB cards on the PCI bus and I decided to make some new attempts to get it working.

I have previously tried VDR and Freevo and I have avoided MythTV as I had the impression that my motherboard would not be powerful enough for MythTV. I was pleasantly surprised to see that MythTV seemed to work fine with my slow motherboard as a it doesn't have to compress the video stream from a DVB cord.

MythTV is really nice, it seems to have all the advantages of both VDR and Freevo. I think I will stick with MythTV in my old VCR.

Matrix Orbital

Matrix Orbital VFD display

MythTV supports an LCD display with lcdproc. However a simple LCD display would not be good enough for my old VCR, I decided to buy an expensive VFD display from Matrix Orbital. The display is called LK204-25 and is connected to a serial port.
Behind display window

Behind display window

Somehow I will make the display fit behind the display window...

During this entire project it seems as if every part has almost fitted into the VCR box, but finally I have been able to make it fit in some way.

Removing a tight corner

Cut off a corner

I had to remove some plastic from a tight corner to make the display fit.

One of the advantages with the Matrix Orbital display is that it is possible to connect buttons to connectors on the display circuit board. When those buttons are pressed it results in characters sent by the serial line to the motherboard. This is a nice feature that will make the buttons on my old VCR box useful.

Cut off circuit board

Switches circuit board

Unfortunately I also had to cut off the circuit board with the switches behind the buttons to make the VFD display fit. This makes the buttons unusable, I suppose I will have to control the VCR with a remote instead.
VFD on

VFD on

The VFD looks really nice. It connects by a straight serial cable to the motherboard. Once I got the serial cable right MythTV was able to control the display. I thought that I could press connectors to a flat cable to get a straight cable, but I had to modify the cable as the D-SUB connector puts every second wire on the other row. At first LCDd caused the display to flicker, but by changing a driver option from "vfd" to "vkd" solved that problem.

A problem that goes away by itself usually also comes back by itself. Once again the PCI bus has stopped working. I will have to buy some USB DVB devices.

USB DVB devices

USB devices

In an attempt to get rid of the PCI bus problems I bought two USB DVB-T devices. On the PCI bus I have one DVB-T and one DVB-S card. Unfortunately I wasn't able to find any good DVB-S device that would be small enough for my VCR. I will try to keep the DVB-S card on the PCI bus and hope that the PCI bus works better when it gets shorter and only has one card. The PCI DVB-T card that now gets removed has been a very nice card with a remote receiver on a cable and it also has analog video inputs for S-video and composite using the good old and well known bt878 drivers.

I did some searches on the web to find USB devices with good drivers. It seemed as if the Terratec Cinergy XS hybrid for both DVB-T and analog video would be well supported. It also has a remote receiver on a cable so I can place the receiver in the front behind the IR window.

The Freecom DVB-T which I also bought wasn't so easy to find information about and exists in several different revisions. At least the Freecom stick was rather cheap and if I will be able to use it MythTV will be able to have picture in picture for DVB-T.

USB test setup

Test of USB devices

None of the USB devices worked out of the box with my old kernel. The latest stable drivers from linuxtv.org didn't compile with my kernel, but the version before did compile. That version found the Freecom stick but didn't find the Terracom stick. I used mercury to download the latest development version of the DVB drivers and I was able to compile them and the drivers found both my cards.

The drivers for terratec wasn't as good as I had hoped, but the Freecom card seems to work better than I had hoped. The terratec drivers seem to be unable to use analog inputs at the same time DVB-T is used. I also wasn't able to get the remote working with lirc.

My quick test also gave me some more bad news... The distortions in the picture is still there, they don't come from heat and the don't come from the PCI bus. Right now I think the distortions come from a bad antenna.

Pinnacle remote

Pinnacle serial remote

There is an old saying that trying to get bad hardware work fine with Linux is a lot harder than buying good hardware that works fine with Linux. I decided to ditch the Terratec remote that others have reported works like an USB keyboard. Instead I got myself a Pinnacle remote that connects to the serial port. That remote is supposed to work fine with lirc and I will have no problems in the future if I decide to to switch DVB devices.
Below motherboard

USB sticks below motherboard

I removed the PCI DVB-T card and have now instead placed the two USB DVB-T sticks below the motherboard. Also the serial cable for the remote receiver goes below the motherboard. With all this stuff there is no longer any room for the fans so I had to remove them.
Removed stuff

A lot of removed stuff

The nice PCI DVB-T card had an analog input which probably could be useful and it was connected to the scart connectors. Now I might just as well remove those scart connectors and some cabling as well as part of the PCI bus. All that space is now needed for other things.
Connectors

New connectors

The old scart connectors was replaced with new connectors only to fill the holes, they are not connected to anything. Instead of the switch which previously was used to select scart connector I have now added a connector for stereo headphones. That connector might be useful for debugging sound.
Finished front

Finished front

I have finally filled the last hole in the front. For this I used plastic from the old opening for the VHS tape. If I am really lucky all the hardware work might be finished by now. Still a lot of work remains. The new remote must be configured and tested and the DVB devices must be tested and configured in MythTV.

I was unable to get the USB DVB-T sticks working reliably. The PCI cards seemed better, but I needed a new PCI bus.

(Year 2008)
Bracket from network card

New PCI bus

I got an old 1 GHz PIII machine with a PCI bus and placed the cards in that machine. Unfortunately I could no longer find the PCI brackets for the DVB cards which I removed when I placed them in the VCR. I needed new brackets and drilled a hole in a spare bracket and sacrificed an old network card with holes in the right positions.
PCI brackets

PCI Brackets on place

The new PCI brackets did fit rather good. The 1 GHz PIII is running mythbackend and my VCR PC is running mythfrontend. As the computers are connected by ethernet the VCR is still able to use the DVB cards. This backend/frontend design of MythTV is really nice.

Unfortunately I still have the distortions in the picture that I thought came because of heat problems.

Samsung LE40R87BD

Samsung LE40R87BD

I bought a 40 inch Samsung LCD TV to use as a monitor for my VCR. It has a native resolution of 1360x768 at 60 Hz. Unfortunately I found that the builtin unichrome graphics on the VIA mini-ITX card is unable to give any higher resolution than 1024x768@60Hz. Trying to use a modeline for the resolution 1360x768 gives an error message about not enough memory bandwidth. Fortunately the image looks OK in 1024x768 resolution and I really like this TV when it is working.

The TV also has a builtin DVT-T receiver and using this I could see that the distortions I thought was because of heat problems also shows up with this DVB-T receiver. Once I saw this it was easy to solve the problem with an antenna amplifier.

VCR sync signals on oscilloscope PC sync signals on oscilloscope

Problem with Samsung TV

Unfortunately there is one major problem with the nice Samsung LCD TV. When the TV is powered on it says that there is no signal on the VGA input. If the TV is powered on to watch the internal DVB-T receiver it is able to display the VCR VGA input a few minutes later. This is very annoying.

I have tried different combinations of monitors and PCs. The samsung TV is able to without problem display VGA input from some PCs but not all PCs that I have tested. The problem is not related to resolution, refresh rate or polarity of sync signals, I have tried to tune the modelines but it doesn't help.The PCs that doesn't work with Samsung work fine with another monitor.

At first I thought this could be because of floating ground voltage potentials. However, measuring showed that the ground potential only differed 40-50 mV when the TV and VCR was disconnected and when connected by the VGA cable the difference was only about 20 mV.

I borrowed an oscilloscope and looked at the sync signals of the VCR (left) and two PCs which worked without problem. The VCR sync signals has an amplitude of a little more than 3 V. One of the working PCs (right) had amplitudes of about 5 V. Another working PC had amplitudes about 4 V. It seems as if the Samsung monitor requires higher sync amplitudes than my VCR gives. According to the specification the sync signals in the VGA cable shall have TTL levels and anything above 2.4 V should be considered high according to the TTL specification. To me it seems as if the Samsung TV doesn't comply to the specifications.

Receiver and speakers

Sound

I returned the broken TV to Dustin and got a new identical but working TV on warranty without having to pay for the return shipping. Once the problem with the TV was solved I continued the project by adding a receiver and speakers to get 5.1 sound.
(Year 2009)
7.1 speakers

More speakers

At first I only had enough speakers for 5.1 sound. However, I misplaced the rear speakers for optimal sound. Instead of moving those rear speakers to right behind my sofa I bought yet another pair of speakers so I now have enough speakers for 7.1 sound. So far I haven't found anything to watch with 7.1 sound, but the receiver still does a pretty good job using all speakers when listening to mp3 files.
Satellite dish

Satellite dish

I almost regret connecting a satellite dish to the system. The first thing that happened was that I got hundreds of channels inserted among my previously carefully sorted list of channels. Trying to sort out and categorize all these channels is a job which never seems to end. The dish is aimed for Sirius, its position on my house makes it impossible to aim for Astra. Most of the channels are really junk, so far I think that I have been able to count to 3 channels which on rare circumstances might have something worth watching.

Final words

Once I had everything working it really is a fantastic system. MythTV is a great piece of software. The only part of the system that could have been a little better is the remote. The remote works fine for controlling the VCR. Unfortunately also the remote for my TV and the remote for my receiver also controls the VCR in accidental ways. Changing the volume on the receiver with the remote often causes the VCR to start navigating among its menus.

If I would build myself another such system I would buy myself some kind of HTPC computer case. Most of my problems in this project has been related to the lack of space in my current box. The project has taken a few more years to finish than I first thought, but all those problems has only been part of the fun.

(Year 2010)
Broken PSU

Time for service

My refurbished VCR has now been working fine since May 2008, but suddenly it was completely dead. It turned out that the PSU had some leaked capacitors. Lately I have also had some problems with timeouts when my VCR tries to connect to the mythtv backend PC.

The timeouts are caused by mysqld taking 100% CPU on the backend machine. I tried to fix this by running myisamchk, but it didn't help.

New PSU

New smaller PSU

I replaced the broken PSU with a new smaller PSU. It is not only physically smaller, unfortunately it is not as powerful. The old PSU was specified for 200W, the new PSU is only 125W.

Being unable to fix mysql I instead did choose an easy fix; adding yet another CPU to the backend PC. The motherboard with a single 1 GH Pentium III was replaced with another old motherboard with dual 900 MHz Pentium III CPUs.

New PSU in place

New PSU in place

I don't think this lack of power will be any problem as the PSU no longer needs to give current to any DVB cards.

Even though mysql hogs down an entire CPU the backend PC is now responsive. With both the backend PC and my VCR frontend upgraded I hope my system will last for many years.

(Year 2011)
Broken Motherboard

Time for BIG service

Again my video was dead. It turned out to once again be caused by leaking capacitors, this time on the motherboard. I will have to replace the entire motherboard.
New motherboard

New motherboard

Today there are lots of interesting motherboards to choose from. Many of them have fanless intel Atom CPUs. My old motherboard had two IDE channels and I used them both having both HD and CDROM as IDE masters for best performance. Now it is hard to find Mini-ITX boards with IDE channels. I finally found a VIA board which at least has one IDE channel, I will rejumper the CDROM to IDE slave.

It is a rather nice motherboard with a lot of serial ports and two gigiabit ethernet ports. I will only use one ethernet port, but at least it will be faster than my old motherboard which only had 100 Mb/s ethernet.

Unfortunately the serial ports on the motherboard have non standard connectors with 2 mm distances instead of standard 2.5 mm distances. I will need new serial cables to connect the remote and the VFD.

Keyboard cable

Keyboard cable

The old motherboard used a special cable to connect ps/2 mouse and keyboard. I used that cable to get a ps/2 keyboard connector to the back of my video. The new motherboard doesn't have any such internal connector, instead I modified the cable using a USB cable and a USB-ps/2 adapter to connect it to the back panel of the motherboard.

The result with a brand new motherboard? First the good news:

  • Quick network with 1 Gb/s speed
  • The graphics chipset is capable of an image resolution of 1368x768 using the VESA driver.
Then the bad news:
  • The sound chipset is not recognized by Slackware ~10.2 from 2005, now I have no sound.
  • I have no working VFD in lack of cable and/or working serial port.
  • I have no remote in lack of cable and/or working serial port.
  • The old installed Unichrome driver does not recognize the new graphics chipset. The VESA driver works, but video lags so much that it isn't usable.
The back panel serial ports cannot be configured as ttyS0 or ttyS1 (com1 and com2 in MS-DOS). So far I haven't got any cables for the motherboard serial connectors.

To get graphics working I downloaded a driver from VIA. Unfortunately that driver was only for kernels 2.6.24 - 2.6.28. My old installation from 2005 has kernel 2.6.12. I realize that I will have to do a total reinstall. According to Distrowatch Slackware version 12.1 and 12.2 might be usable with that driver, however I will try latest Slackware 13.37, if I'm lucky the driver is included in newer kernels.

IR LED on remote

Remote control debugging

As the remote no longer worked with the new motherboard I spent some hours trying to debug what was wrong. Even though I could use a digital camera or mobile phone camera to see that the remote gave a signal I tried to replace the batteries, but it didn't help.
Serial debugging

Serial debugging

Using a serial port debugger I tried to see if the remote control generated any traffic on the serial line. I couldn't see any such traffic, nor could I see anything in the minicom window connected to the serial port.

Finally I got the serial port working on my VCR by using a null modem cable connected to a laptop. With some setserial magic I got the odd addresses and IRQs right for the external VIA serial ports to become usable as /dev/ttyS0 and /dev/ttyS1. Once those values were right both the serial port and the VFD display started working again.

Slackware

32 bit Slackware 13.37

I upgraded to 32 bit Slackware 13.37. This solved all the problems with hardware compability. Sound works, video gives the right resolution 1360x768 and I can now use DMA on the HD again! Everything seemed great, but the bad news is that MythTV version 0.20.2 which I used no longer compiles as it requires QT 3 and Slackware now comes with QT 4. I will probably have to upgrade to a newer version of MythTV. Doing so I will probably also have to upgrade my backend server. Doing so I fear I will loose all my recordings on the server...

mythTV
(Year 2012)

My VCR is fully working again with MythTV!

I had some fear about upgrading MythTV on the backend server, however it was really smooth and MythTV automagically converted the database to its new format.

My VCR running the frontend server finally also works great. It took a few weekends to configure MythTV from scratch for my new motherboard and my old remote.

The end result is great and it really feels like the new motherboard as well as the new version of MythTV was good upgrades. With my new version of MythTV I am able to do all I could do before but also use my video to watch photos, the old version of MythTV showed 4:3 photos with 16:9 ration on my TV. The new installation is also using the internal player of MythTV to watch DVDs instead of mplayer like before. This makes the remote work better for watching DVDs as all buttons work exactly as when looking at TV or recorded TV. The only drawback with the internal player for DVD is that I haven't found any setting for a default subtitle language. Every time I watch a DVD I have to choose language for subtitling.

New HD
(Year 2013)

Broken HD

When using partimage in System Rescue CD to make a backup I found that the HD gave IO errors when trying to read. Fortunately I was able to read the system partition without any trouble and the problematic partition only contained media files (mp3 music and jpeg photos) which I also had on other computers. I had a spare disk laying around and after replacing the HD restored the system partition from the partimage backup and the media partition from my other computers. Finally I ran lilo with the -r switch from System Rescue CD and quickly got my working video system back again after this bare metal recovery.

The old HD was eight years old and had been going 24/7 during most of this time in a system without any cooling fan at all.


Last modified: Sun Apr 7 00:14:49 CEST 2013