WIS-GO Multimedia

Intro

WIS's Go7007 MPEG-4 encoder chip is used in many video encoder boxes including the Plextor ConvertX (PX-M402U) which I own. The best part about this chip is it's fully supported under Linux if you have the appropriate driver (which I might add is open source!). To see what devices are supported visit this page: http://oss.wischip.com

The problem is that WIS hasn't updated their driver in a while so it won't work on most modern Linux distributions. Thanks to some talented programmers the driver will work with their patches. I've patched the wis-go7007-linux-0.9.8 source so it works on Fedora Core 5/6, Fedora 7/8/9 and Ubuntu Dapper/Edgy/Feisty/Gutsy/Hardy. I've also patched the gorecord program with an audio/video sync patch and most recently made it possible to record huge video files instead of being limited to 1GB recordings.

All the patches are available in the patches directory of the source tarball

Installation

Installation is a bit different for each distro so follow the instructions for your distro. You can probably just copy the commands as one big chunk into your terminal but it's better to do them one at a time.

Ubuntu Hardy with kernel <= 2.6.46-17

The above instructions allow to compile the driver but it is not working. The driver crashed during the initialization of the ALSA sound input. For a detailed outline of the errors attempting to load the drivers, see this thread: http://ubuntuforums.org/showthread.php?t=791842.

However, recompiling the kernel, after verifying that the required drivers are included, leads to working setup on Ubuntu with kernel 2.6.24. You can, e.g., follow the instructions by Benjamin Schleinzer

The exact cause is not clear, however:

the wis-go7007 readme lists certain kernel configuration flags which habe to be set and are not on the stock kernel, most notably CONFIG_SND.

the stock kernel provides ALSA 1.0.16 (cat /proc/asound/version.h), whereas the include files state that version 1.0.15 is used (more /usr/include/alsa/version.h).

Other solution for Hardy 8.04 (maybe better?)

It is not necessary to recompile the kernel! CONFIG_SND is not enabled in the kernel, but alsa driver and modules are provided via linux-ubuntu-modules (or LUM)

There's a simple workaround to compile the wis-go7007 driver: Here, to simplify, I suppose that the current kernel version is 2.6.24-19-generic. If not, replace everywhere needed.

Make sure the following packages are installed:

linux-headers-lum-2.6.24-19-generic
linux-headers-2.6.24-19-generic

Get rid of the incorrect sound kernel headers (which should never be included): for example, rename

/usr/src/linux-headers-2.6.24-19-generic/include/sound

to

/usr/src/linux-headers-2.6.24-19-generic/include/sound-blacklisted

In the wis-go7007 source, add the following line at the beginning of kernel/Makefile to take the right LUM alsa headers into account:

Ubuntu

Fun

GoGomini

I wrote a very simple little frontend to gorecord that can be found here: here

Video Streaming

You can use wis-streamer to stream video from your go7007-based device to your local network or even onto the internet. There is a cool piece of software on this page that lets you easily control wis-streamer and there's also a patched version of wis-streamer that will work with the go7007 devices.

Recording audio only

To record only audio, first you must initialize the device:

gorecord -adevice /dev/dsp -vdevice /dev/video0 -nowrite
Note: /dev/dsp must not be the audio input of the device, use your sound card's input otherwise this won't work.

Fire up audacity or any other audio recording software that can use an alsa input and start recording!

For audacity, in the preferences window the device will look something like this: „ALSA: Plextor PX-M402U: (hw:1,0)“

Remember to use a 2 channel (stereo) recording

Making long recordings

Note: This shouldn't be needed anymore when using the new version of gorecord because there is no longer is a filesize limit. The „%d“ option is still provided but must be used with the -maxsize option to have any effect.

Because of the filesize limitation by the old gorecord program, you can't make really long recordings that are stored in one big avi file. The workaround is to use gorecord's %d option to continue recording to a new file after hitting the limit. We can then put the files back together again into one big avi using mencoder.

gorecord [options] filename-"%d".avi
mencoder -oac copy -ovc copy filename-*.avi -o final_video.avi
* Note: The individual files might not be playable until you string them back together with mencoder.

Troubleshooting

Ubuntu usbfs fix

In enable for the fxload program to load the firmware onto your device you must have usbfs (or usbdevfs) mounted on /proc/bus/usb. To enable this /etc/init.d/mountdevsubfs.sh must be modified.

There is a simple patch that can be applied which is included in the latest driver source package, apply it as follows:

GoRecord fails to find the ALSA audio node

At least for Ubuntu 8.04 with Kernel 2.6.24, GoRecord from the 0.9.8.2 provided here fails to find the ALSA audio input provided by the snd_go7007 module. A simple fix is to change line 217 in gorecord.c

Resources

A tutorial on how to make DVDs of video recorded from the Plextor ConvertX boxes

Footnote

I don't know where the best place for this is, but I've found an bug in the wis-sony-tuner.c module which doesn't seem to have made it into any of the patches. Not needed for gorecord, but other v4l experiments may result in system instability:

In the VIDIOC_G_TUNER ioctl, where it says:

memset(t, 0, sizeof(*tun) );

it should be:

memset(tun, 0, sizeof(*tun));

Unfortunately, the bug results in system instability if the VIDIOC_G_TUNER ioctl is ever invoked.–Bifferos 06:13, 16 July 2008 (EDT)