Chris Matchett

A blog to remind me how to fix stuff and other tech thoughts…

Archive for November 2006

Html form – help text that disappears when clicked

without comments

This very simple means of including help text in a textarea (or whatever) eluded me for a while…simple really!

<textarea name=”message” cols=”25″ rows=”3″
onfocus=”if (this.value==this.defaultValue) this.value=”;”>
Text that will dissapear when clicked…
</textarea>

Written by Chris

November 29, 2006 at 6:33 pm

Posted in Code, Tech, WebDesign

Convert to mp3 – bash script

without comments

Here’s a simple script to convert any audio file mplayer can play to a mp3.

mplayer $1 -vo null -ao pcm
mv audiodump.wav $1.wav
lame -h -b $2 $1.wav $1.mp3
rm $1.wav

Easy peasy!

Written by Chris

November 27, 2006 at 11:57 pm

Posted in Linux, Tech, bash, mplayer

Convert Google Video to AVI with mencoder bash command

with one comment

There was an hour long linux video on Google videos I wanted to get on to DVD to watch later and here is the magic command, using mencoder, that got me there…well at least got the downloaded google video into a format I could work with. I believe the google gvi file is really an avi file at heart.

# Convert AVI/GVI to MPG
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup \
-srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:
vbitrate=5000:keyint=15:aspect=16/9:\
acodec=ac3:abitrate=192 -ofps 25 -o {$1}.mpg {$1}.gvi

Written by Chris

November 26, 2006 at 8:15 pm

Posted in Linux, Tech, mencoder

Home Media Centre with a Biostar iDeq 210v, nVidia Geforce 4 MX440 Tv-Out/64MB, Fedora 4, LIRC and Freevo

with 3 comments

If you haven’t been put off by the title of this blog entry you probably have some of the gear mentioned and are desperately looking for help. I am not going to give a detailed account of how I got freevo up and running on my Fedora box (with a remote control), I’m just going to give you the broad strokes….

  • I used Fedora 4 with the source code of a vanilla 2.6.16 kernel available in /usr/src. I’m running the standard 2.6.11-1.1369_FC4 kernel, the vanilla source is only to help the lirc build.
  • I installed lirc from source, not the FC4 rpm, using the lirc_it87 module. The it87 module will get the built-in infrared receiver working on your iDeq (you’ll see the receivers details in the Bios uder Super I/O i.e. CIR).
  • I bought a nVidia Geforce 4 MX440 on eBay for £10 and connected the s-video connector to a scart socket available in Tesco’s for £3.50 (you need the In/Out switch).
  • Ooops! I followed some popular instructions online on how to get the nVidia card working by installing nvidia-glx with yum….lirc stopped working…the yum update upgraded the kernel and killed my working lirc.
  • I went back to the FC4 out of the box kernel, 2.6.11-1.1369_FC4, and downloaded the nVidia driver from the nVidia website and this worked a treat. No need for nvidia-glx via yum (btw there’s a copy of my tv-out xorg.conf kicking around my blog somewhere)…
  • I installed freevo by following the instructions from their wiki and as they say ‘Bob’s your Uncle!’

So there you have it, what took me a month summarized in twelve lines!

Written by Chris

November 26, 2006 at 6:31 pm

Posted in Fedora, Freevo, Linux, Tech, nVidia