Wednesday, April 28, 2010

Things to try: No-delay video on Hauppauge PVR150

v4l2-ctl -v width=720,height=480
v4lctl setinput "Composite 1"
ivtv-tune -c1
aplay -q --buffer-time=100 -f dat /dev/video24 &
mplayer -rawvideo format=hm12:h=480:w=720:fps=29.97 \
-nocache -demuxer 26 /dev/video32 -framedrop -vo xv -monitoraspect 16:10 -aspect 4:3
killall aplay

Wednesday, April 21, 2010

DSL Line stats

Step 1: telnet into the modem
Step 2:
adsl info expand=true

Tuesday, April 20, 2010

Converting and chunking single-file CDs (with CUE sheets)

Issue 1: You have a number of files with .ape extension, for which there is no default player on Ubuntu.

Solution: Convert them with ffmpeg:
for f in *.ape; do ffmpeg -i "$f" "${f%.ape}.wav"; done



Issue 2: You have a music CD which you ripped to .ape, .flac, or whatever else, but instead of splitting the file you just created a CUE sheet for re-burning and would like to split it for your digital music player.

Solution: Use shnsplit:
shnsplit -o flac -f [file].cue -t "%n. %a - %p - %t" -m \ _ [file].flac


Replace [file] with the appropriate filename (or wildcard). If your input file is not .flac (e.g. .wav, as per the .ape file converted above) just use the appropriate extension. Check the manpages for shnsplit for additional configurations.

Monday, April 19, 2010

TeX woes

After a recent macports update I had issues getting TeX to recognize the local files installed in
~/Library/texmf
. I re-ran texhash, but to no avail. Long story short, it turned out that the issue was not with texhash, but with the search path for kpathsea in
/opt/local/share/texmf/web2c
. Changing the 'TEXMFHOME' variable to the default setting did the trick. In addition, to prevent further updates from overwriting the change, edit the first line and alter the word 'original' (to, for example, 'custom').

Wednesday, April 7, 2010

The sorry state of cross-platform GUI development in Ruby

Let's take a look at the contenders:

* fxRuby. Yeah, this one's a dinosaur. Pass.
* ruby-tk. Won't play nice with system libraries on Snow Leopard.
* wxRuby. Ditto.
* Shoes. Works, but does not play nice with already-installed gems, since it uses a separate system. It's own system will install but not run with Nokogiri.
* hotcocoa (via Macruby). Won't install Nokogiri because it references the C library libxml2, and Macruby does not like that yet.

So, what is one to do? Well, you could either give up on Nokogiri (fat chance), or say to hell with developing a GUI in Ruby and just go implement it either natively, or in Java if you need it to be portable. Then you can either re-parse the files, or use IPC to connect to a ruby daemon script.