Good video performance on spitz/akita with openzaurus 3.5.4.1 and opie

WARNING: This guide is severely deprecated. Look elsewhere for more updated instructions. This is only being left here for historical purposes.

WARNING!!! The following MAY NOT work with anything other than SL-C3000. CONFIRMED it does NOT work with kernel 2.6.16. There's a bit of qvga code in 2.6.17 and clearly this is needed. The spitz kernel is available at http://aoi.atari-source.com/~mduckworth/zaurus. WARNING, this kernel has malfunctioning SD and USB host support. If you need to flash back to 2.6.16 prepare it on CF. This is an experimental kernel and is not supported officially by OZ. Use this only if you're desparate for qvga action.

This site historically has been primarily atari focused, but now I'm going to start writing articles about Linux, coding and Zaurus's. The first, being an article about the Zaurus.

Those who own a Zaurus SL-C3X or C1X probably have used Sharp distro or Cacko. These have the most support from our Japanese developers and are blessed with things like great full screen video playback thanks to BVDD enhanced mplayer as well as kino. They're also blessed with a BVDD enhanced SDL which rotates perfectly and has no issues whatsoever, also getting great performance.

For those who want to move to Openzaurus (version 3.5.4.1) you'll be delighted and disappointed at the same time. I noticed a couple of things, Konqueror is awesome and seems to work better (if a little slower) than Netfront 3. Most of the apps launch very very quickly, the system boots quickly and is very stable. Most of the fine details like special buttons, power button, etc are all working quite well. Wifi seems to drain less power thanks to better driver support for power management most likely. However, the multimedia support is utter crap. Openzaurus regrettably doesn't have a colossal amount of developers.

The reason the multimedia support is crappy is because of multiple things, but it mostly has to do with the differences between the old generation clamshells and hte new generation clamshells as well as the kernel upgrade to 2.6. Kernel 2.4 never really worked too well with openzaurus and is widely considered a giant hack, so all the effort was concentrated into 2.6. 2.6 is not allowing hacks like BVDD so basically you're stuck with no multimedia acceleration whatsoever. The old generation clamshells have a very nicely supported ATI graphics chip, but the new generation have a special QVGA framebuffer overlay that is not very well supported (this is what BVDD is in essence).

So if you want to play fullscreen video you can go about it in a number of ways. 640x480 just won't work. Too many pixels to move. Ok, so try 320x240 QVGA. Well that works fine but it plays in a tiny box in the center of your screen. Ok software scale it up to 640x480, looks fine except the framerate sucks badly. Maybe we could try to prerotate it in the encode to make it better? Nope, doesn't work. What's a guy to do? If you look around you'll find bogus guides for getting into QVGA mode but they're all aimed for SL-6000. Here's what you do:

Flashing the kernel. Download it from the URL above and download the updater.sh from 3.5.4.1 download site. Download the modules, extract and move the resulting 2.6.17 directory to /lib/modules. Prune modules you don't want or need to save space. Rename the zImage file to zImage.bin paying attention to capitalization. Put the files on a CF or SD card and reboot using the instructions on the oz website to get the "OK button" maintenance menu. This will only flash the kernel as long as only the kernel is in your root directory. Again, this is for experienced users! You're playing with fire here! Once the kernel is installed it will reboot with the new kernel. I found I have to hit ctrl-c on the kernel warning to proceed. Once you reboot you'll find your SD support is broken. You'll need to have another device to move your old kernel to zImage.bin on your card to flash back, though you can flash back since the maintenance kernel is different. I'm stuck because I don't have another device that reads/writes SD.

Next you need to get the video encoded into a reasonable format for Zaurus. I find this line works great:

mencoder -quiet -of avi -ofps 25 -sws 10 -vf scale=320:-2::: -ovc lavc -lavcopts vcodec=msmpeg4:vme=4:autoaspect:mbd=1:vbitrate=250 -oac mp3lame -lameopts preset=cd inputfile.avi -o outputfile.avi

Once you have the video you need to play it. Install mplayer from the feed. Then install the following lines into /etc/fb.modes:

mode "qvga"
geometry 240 320 240 320 16
timings 134617 20 46 1 0 20 2
accel false
endmode

mode "480x640-117"
# D: 51.999 MHz, H: 75.252 kHz, V: 116.851 Hz
geometry 480 640 480 640 16
timings 19231 46 125 1 0 40 3
accel false
endmode

mode "vga"
# D: 51.999 MHz, H: 75.252 kHz, V: 116.851 Hz
geometry 480 640 480 640 16
timings 19231 46 125 1 0 40 3
accel false
endmode

Once you're finished use this command to play your movies:

mplayer -vo fbdev -fbmode qvga -vf rotate=1,crop=240:320 -fs -framedrop -vm -cache 8192 -really-quiet filename.avi

For some reason most of the stuff I encode with the command is out of sync. Simply add this to correct: "-delay -.5".

What you'll get is high performance (25fps) 320x240 video full screen. Enjoy your tv shows/movies on the go.

Mplayer doesn't respond to keyboard commands for some reason. To escape the video you need to click around on the screen where the task bar would be where your console session would be. You need to "raise" the console even though you won't see it well. Once it's raised you can press "Q" to quit. Your screen may be distorted. When you get done with the video the screen can sometimes be split screen with the top on the bottom and bottom on the top. It's a little distressing but you can just touch the screen where the start menu would be, go to Terminal 1. Once it moves to terminal 1, hit FN and the right arrow to go back to opie. The screen will look normal now. This screen issue might be something in my instructions.

I know this isn't much, but the developers don't really intend for us to use this yet. I'm releasing this info for the video on the go junkies like me. I have way too much mythtv recordings to only watch it at home :-P

Article Type: