Monday, November 24, 2008

HandBrake with Live Video Previews

The HandBrake team has released version 0.9.3, which includes official, sanctioned builds of the GTK GUI in both 32- and 64-bit formats. This new version also brings a number of improvements that have been enjoyed by those of us using the SVN builds for some time to the rest of the HB users. However, new features are constantly being added, and the codec pool is always being updated, so I will continue to post the latest bleeding-edge builds here on my site, starting with svn1952, which includes live video previews (!), as well as a more recent version of the x264 and ffmpeg codecs.

Update (5/15/09): I have working binaries of the latest code available in my PPA repository. Directions for adding it to your package manager are available here.

Here's how the live preview looks. You can really get in there and see the direct impact of your changes. This leads to better cropping and a better sense for your end product. (this is my Mac x-forwarding GHB from my Ubuntu box. As you can see, the live previews even work through that):

For those of you who wish to compile on your own hardware (recommended for those with newer Core 2 Duo CPUs), the process is exactly the same as my previous SVN instructions, except for the addition of 2 new dependencies: libgstreamer0.10-dev and libgstreamer-plugins-base0.10-dev. I've updated the instructions there to reflect the change.

Saturday, November 15, 2008

How to run ZSNES Super Nintendo Emulator on 64-bit Ubuntu Linux

ZSNES is my favorite SNES emulator in the Windows world, but it can be a real pain to get going in 64-bit Linux. Most tutorials will suggest you set up a chroot jail and maintain a parallel set of 32-bit libs so that you can run the 32-bit version, but this is both a hassle and overly complex for many users.

I tried to compile my own binaries from source to avoid this, but I kept running into architecture errors and ended up throwing in the towel after a few hours of fiddling. Luckily, a ZSNES developer known as Nach has provided specialized precompiled binaries for a variety of architectures that worked a treat for me.

Just follow this link, scroll down a bit, and then download the binary that matches your architecture. I have an Athlon 64 X-2 4000+, so I selected the Athlon64-SSE3 binary.

Next, install libsdl-dev either through Synaptic or by typing sudo aptitude install libsdl-dev into a terminal.

Once downloaded and decompressed, you should find your binary inside, which you can run by double-clicking it or typing ./zsnes into a terminal. If you double-click and nothing happens, try running it through the terminal to spot any errors. I personally encountered this error:
Unable to poll /dev/input/event8. Make sure you have read permissions to it
repeated 9 times (1 for each /dev/input/event* 0-8).

I was able to get around this by running ZSNES as root (i.e., sudo ./zsnes), which is certainly not ideal, but I haven't found a way around it yet.

If you take this route, be aware that the default location for saved games will not be ~/.zsnes as it normally would be. Instead, it will be located in /root/.zsnes (since you're running as root). This in mind, you may have to copy your .srm files into this directory for them to be recognized. When I first got my copy to run, I couldn't get it to recognize any of my saved files, even though I tried changing the path for saved files under the preferences. However, once I copied the files into the /root/.zsnes directory, everything showed up just dandy.

Using the native 64-bit binary referenced above also had another unexpected (perhaps coincidental) positive effect of making my gamepad's d-pad work correctly. Using dfreer's zsnes32 binary worked well for me in most respects, but it just wouldn't recognize my Logitech Precision gamepad's d-pad. The buttons worked fine, but when it came time to assign the directions, it would just sit there dumbly, even though jscalibrator and cat /dev/input/js0 both showed plenty of action. This problem remained no matter how many kernel modules I loaded (usbhid, analog, etc.), until I tried Nach's binary. Now it works just fine. Go figure...

This information was written for Ubuntu 8.10 Intrepid Ibex, but it should be applicable to other distros as well.