Thursday, March 30, 2006

The 409 � Convert Google Video FLV’s into AVI, MPG, etc…in LINUX

Recently I've been browsing for some 80' goodies and I must say they have a lot of them (here's my favourite). Nevertheless, watching the videos inside the browser in my case sucks because of lack of sunc between video and audio. Here's an nice link how to convert streaming flash used on into something more usable:

ffmpeg -i video.flv -ab 56 -ar 22050 -b 500 -s 320x240 test.mpg

This results in MPEG file and if you want to convert it into AVI (like me, to be able to display it on my GP2X), you can use following:

mencoder file.mpg -ovc lavc -lavcopts vcodec=msmpeg4:vpass=1 -oac copy -o movie.avi
mencoder file.mpg -ovc lavc -lavcopts vcodec=msmpeg4:vpass=2 -oac copy -o movie.avi

This re-encodes MPEG into DivX 3 and GP2X can display it!

Tuesday, January 10, 2006

Crosscompiling for GP2X

I was playing for some time with cross-compiling GNU utilities for my GP2X. I followed this interesting article on GP2X Wiki about preparing development environment based on OpenEmbedded. It is supposed to make it easier to compile packages for proper architectures of embedded devices called OpenEmbedded. It took some time to properly set it up (the project doesn't have `official' documentation, only a wiki), but I got it working properly, i.e. it produces packages (yet another packaging format - ipkg, `Itsy package') that can be installed and uninstalled easily. This means that various packages that can be found on `normal' (i.e. not embedded) systems, so now we can port... Emacs?! :-)

I have also managed to get terminal emulation via USB cable working, so that I can use minicom (or any other terminal emulation software, like Windoze's HyperTerm) to talk directly to a device present on GP2X. There is ready shell script that you need to run from GP2X, which creates (if it's not already there) proper device in /dev, loads USB Gadget kernel module and starts shell with stdin and stdout pointing to abovementioned device. Now, all you need to do on your workstation side is to load USB ACM modem module (which is called 'cdc-acm' on my system) unless hotplug subsystem didn't do it for you and start up properly configured minicom.

Here's 'USB shell start script' run from GP2X:


rm -f *.txt


mknod /dev/ttygs0 c 127 0

insmod /lib/modules/2.4.25/kernel/drivers/usb/gadget/net2272.o
insmod g_serial.o use_acm=1


sleep 3

/bin/bash --login --noprofile -i -s < /dev/ttygs0 > /dev/ttygs0 2>&1 &

cd /usr/gp2x

USB Gadget code is availabe here.

Saturday, January 07, 2006

staring devving for GP2X Linux based console

Since November 2005 I have a very nice device: GamePark's GP2X, Linux-based portable gaming device (if I'm quoting the official sources correctly). It is really cool device and although it is almost a prototype, it works great - because it can emulate lots of other gaming hardwares (SEGA Megadrive, ZX Spectrum or Commodore 64, to mention only couple of them). It is also great because it was created with homebrew developers in mind (no problems like those in PSP whatsoever).

Now I decided to do something more than just gaming and I'm thinking about developing for this console. So probably this writeup is the first installment in longer series :-).

I have decided that I should start with something easier than real development - with porting. I have built development environment using a very nice script from here that downloads, patches, compiles and installs necessary development environment.

Than I have decided that I want to have my favourite personal information manager, abook, on GP2X. Here's what I have used to get it configured correctly, using GNU's configure utility:

CC=/usr/local/devkitPro/devkitGP2X/bin/arm-linux-gcc LD=/usr/local/devkitPro/devkitGP2X/bin/arm-linux-ld AR=/usr/local/devkitPro/devkitGP2X/bin/arm-linux-ar ./configure --host=i686-pc-linux-gnu --target=arm-linux --prefix=/usr/local/devkitPro/devkitGP2X

Right now I don't have spare batteries to upload the application to GP2X and test it. I'll do it ASAP. There is other problem too: there is no terminal emulation software (ie. no "console" mode) on GP2X so I was planning to use the same "trick" that sterm, GP2X shell app is using: it is basically a wrapper based on SDL graphics library, together with simple keyboard emulation to interact with it.

UPDATE: after recompilation of sterm on my laptop (handy way to debug applications!) I tried to run abook to see how it works and I got error message, that the console is... too small to display abook: right now the window is 53x23 and the minimum is 70x20. This makes it more complicated... I have either to use smaller font (which is not too huge, 6x10) or to find different PIM program! :-(. The font file is in sterm generated from XFree's fonts and there is only one available that's smaller : 5x7 but I'm afraid it can be too tiny to read and still not small enough to fit 70 columns.


Friday, December 30, 2005

SpeedTouch 330 USB ADSL modem & Linux

Right now I'm in Poland and my parents are proud (sic!) subscribers to local ISP. In its cheapest option it is using simple USB based ADSL modem made by Thompson called SpeedTouch 330. It took me more than a week to get it working (christmas vacation or not, I can't stop h4ckIng!!! :-) so I thought I should put here some notes.

First thing: forget about Linux drivers that come on the CD - anyone with modern distribution using hotplug subsystem will not get it working because it comes with modem driver that sits in user- instead of kernelspace (at least I have tried to get it to worked and failed). Instead, I have used kernel driver (comes in standard 2.6.15 kernel). The modem need specially prepared firmware that is loaded bu hotplug subsystem. All information can be found here (Polish only),

Now it works all right... and I can ditch Windoze. V!

Friday, November 18, 2005

cornstarch and water video - c00l!

Here's what I've found on amazing video of cornstarch mixed with water and than shaken - with vibrations applied from the generator. The initially liquid solution starts to behave really, ehm, trippy!

Friday, November 04, 2005

WPA configuration: slowly getting there

Following up the previous post on WPA configuration I've been exploring the matter today and found out, that ipw2100 driver (version 1.1.3, the latest from the repository) does not work with LEAP authentication (the one that uses RADIUS to authenticate). As I'm not that good in Linux driver hacking (I tinkered with it for some time but I had to give up), I'll inquire the mailing list/bugzilla of ipw2100 project.

At least now I know what is happening! :-)

Tuesday, November 01, 2005

KiSS DP-1500 and real shuffle mode

Today I got this `bright' idea how to implement real shuffle in my KiSS DP-1500 multimedia player (by default, the playback options are, well, limited: you can only play the objects as they come in the order, at least with the version of the software I'm using: EzLink NG).

If you telnet to the KiSS box and see the processes, you'll probably see something like that:

/ # Uid VmSize Stat Command
1 0 SW msh
2 0 SW [keventd]
3 0 SWN [ksoftirqd_CPU0]
4 0 RW [kswapd]
5 0 SW [bdflush]
6 0 SW [kupdated]
11 0 SW /bin/telnetd
20 0 SW /bin/cardmgr
184 0 SW /fileplayer.bin PC1 D:\mp3\_New Albums\Tiga_op_Lowlan
185 0 RW /fileplayer.bin PC1 D:\mp3\_New Albums\Tiga_op_Lowlan
186 0 SW /bin/lash
191 0 RW ps -aefwww

'fileplayer.bin' is a process that plays all the content, in this case regular files (mp3s, oggs, mpegs; as opposed to content streamed from the internet, like radio streams).

So, if you could find a version of so popular iTunes clones apps, that keep the database of all the files, and you were able to configure it so that is uses any media player (I've just checked that mine, called 'madman' cannot - it only works with XMMS), you would be able to implement shuffle and whatnot.