Island Labs

July 28th, 2008

We started this new organization called Island Labs, located at www.islandlabs.org.

The group is focusing on mechanical engineering, software engineering, electrical engineering, and even some chemical engineering.

The group is open to the public, and you can see meeting time and location on www.islandlabs.org on the top links.

The next meeting will be a cool talk about multitouch on Wednesday, July 30th, at Farmingdale State.

Link!

May 28th, 2008

image!

Live LILUG Stream: The aftermath.

April 9th, 2008

Streaming last nights LILUG meeting (see last post) did not go as well as I had hoped for it to go. I guess the main problem was that I had never actually tried it on my laptop - so there was not a trace of gstreamer on the whole dang system… I ended up even having to compile gst-entrans to get it working. I had a nice placeholder looping intro video (a rickroll with some overlayed text) that lasted for most of the meeting streaming from my desktop computer. My laptop wasn’t powerful enough to encode the video in real time at the quality I had it set to, by the time I thought to lower the settings it was already the end of the meeting. The stream at the end of the meeting (of people just sitting and talking) apparently worked very well, varied from 60-100kbit (I believe, according to vlc) and was quite watchable. Next time I’ll borrow someone elses laptop (configured before!) probably, and use that to stream it.. Next meeting should go better. =]

Live LILUG Stream! In OGG/Theora! http://tonybox.net:8000/lilug.ogg

April 8th, 2008

Okay, I’m going to be using gstreamer and icecast to stream an OGG/Theora stream of today’s LILUG Presentation to the internet. There is a chance it will not work, or will not work immediately. If bandwidth is not enough to stream OGG/Theora (with vorbis audio), I will go to just OGG/Vorbis for audio-only. I have 3 webcams, each with an internal mic, my lappys internal mic, and an external mic I’ll be bringing with me - I never got around to testing it on my laptop so I’m just bringing everything I have.

I recommend using VLC or Totem to view it, mplayer can view it with a low cache set, but I think VLC and Totem work better. There is also a Java-Based Viewer that works very well.

Hope you watch.

Here is the stream URL:
http://tonybox.net:8000/lilug.ogg

And the Java viewer URL:
http://tonybox.net/~tonyb/video/lilug.html

Fun with icecast

March 8th, 2008

Streaming video has always been a hassle, and still is.

The way I did it today works pretty well.

Using a DV camera over firewire, I was able to pipe the DV stream through ffmpeg2theora and then to the icecast server.

The command ended up being something like
dvgrab - | ffmpeg2theora -v 2 -x 160 -y 128 -f dv -o /dev/stdout - | oggfwd 10.98.98.101 8000 passwordremoved /live.ogg

Ah, but it’s not that simple.
First, getting dvgrab to work.
With debian testing on my laptop, all the apps like dvgrab and kino used raw1394 - but someone decided to remove the raw1394 because something better exists. Eventually, I ended up stealing the kernel from debian stable and I’ve made a note to compile a brand new one with raw1394. It took a while to figure out that dvgrab wasn’t gonna budge and use something other than raw1394.

Next, you’ll notice the quality on that is very, very low. This is because the CPU on my laptop is a Pentium 3-M 1.2GHz, it just can’t keep up. My solution to this is a filthy hack but it works. Sitting on lan a few feet away from my lappy is my desktop, a 2.4GHz Q6600 Core 2 Quad, so I ended up using netcat to pipe the uncompressed DV data through my lan to the listening netcat, waiting on my workstation. This actually works quite well.

On my desktop, I did a derivative of the command mentioned earlier:
nc -l 8080 | ffmpeg2theora -v 2 -x 480 -y 320 -f dv -o /dev/stdout - | oggfwd 10.98.98.101 8000 passwordremoved /live.ogg
Notice the higher resolution video quality - now bandwidth is the reason to scale it down, not CPU power.

Then, after that command, all I had to do on the laptop was
dvgrab - | nc 192.168.2.248 8080

Even though its TCP and hackish, it works.
Sadly (and obviously), this is not usable to stream from a remote location - when you’re away, the CPU you have - is the CPU you’ll use. I sure could use a new lappy…

The good thing about this is, the quality I encoded in my laptop comes out to around the right amount of bandwidth to be streamed over EV-DO to the icecast server. I haven’t tried that but it could mean awesome ogg/theora cellular video streaming with the expected quality.

IPv6, Xen, and Printing

February 25th, 2008

I recently redid most of the software and a bit of the hardware of my network. The only sad part about this is that a windows box is now part of my network, A laser printer I have (Xerox Workcentre XD100) needs windows to work so I setup a print server on an old mini P3, couldn’t think of a better use for it.

First, IPv6.
My network now all has IPv6 access through 6to4 using 6to4.nro.net
Here is my IPv6 network startup script on my router

ip tunnel add tun6to4 mode sit ttl 64 remote any local 69.113.41.194
ip link set tun6to4 up
ip -6 addr add 2002:4571:29c2::1/16 dev tun6to4
ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1
ip -6 route add 2002:4571:29c2::/48 dev xenbr0
ip -6 route add 2002:4571:29c2:def::/64 dev eth2
echo 0 > /proc/sys/net/ipv6/conf/all/autoconf
echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra
echo 0 > /proc/sys/net/ipv6/conf/all/accept_redirects
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
echo 0 > /proc/sys/net/ipv6/conf/all/router_solicitations

It sets up my IPv6 subnet with the tun6to4 device, then it configures it to route IPv6 to xenbr0, which is my brouter (see later Xen section) and to eth2, which goes to a switch and runs the rest of my lan.
radvd, which allows for stateless autoconfiguration of devices (notably cooler than DHCP, though DHCPv6 is useful on some occasions), is configured to hand out slightly different addresses to my lan and to my Xen VMs.

interface xenbr0 {
AdvLinkMTU 1480;
AdvSendAdvert on;
prefix 2002:4571:29c2:abc::/64
{};
};
interface eth2 {
AdvLinkMTU 1480;
AdvSendAdvert on;
prefix 2002:4571:29c2:def::/64
{};
};

So now my lan gets addresses starting with 2002:4571:29c2:def::, and my Xen machines get addresses starting with 2002:4571:29c2:abc::

I’ve connected with IPv6 to freenode for a while (and my xen machines have unique RDNS so I have a nice tonyb@xen1.tonybox.net hostmask when I connect from my cluenet shell server), and it works quite well.

Now, onward to Xen.
I got bored with the old setup on my machines of Fedora 8 just sitting there, so I decided to install Debian (after trying out a few other distros) on it, and setting up Xen on it. I also upgraded its hardware to be a dual core Pentium D 3.2GHz with 2GB of ram, giving me lots of room to play with VMs (I have 5, with 4 usually running so far and they all run smoothly).

Vector:/etc/ipv6# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 1126 2 r----- 8121.9
Vector-Xen0 1 128 1 -b---- 1075.8
Vector-Xen1 2 384 1 -b---- 1980.0
Vector-Xen2 7 256 1 -b---- 78.3
Vector-Xen4 8 128 1 -b---- 82.2

Xen0 is a web server, and an IRC server, Xen1 is a semi-public shell server (see http://cluenet.org/), Xen2 is an LTSP server for my lan, Xen3 was supposed to be an asterisk server but I haven’t gotten around to configuring it yet, and Xen4 is only there because scratchbox doesn’t work on 64bit systems correctly (nothing compiles right) and I didn’t want to mess up something that is useful. This blog is on Vector-Xen0!

The networking setup I have for Xen is kind of odd because every one of Xen’s standard network setups either didn’t allow the VMs to talk to the internet, talk to each other, or killed my lan boxes access to the internet. Eventually I settled for a ‘brouter’ setup as described here, and that has been working nicely, the Xen VMs all have static IPs of 10.98.98.(101+vm number). I dunno why I started with 10.98.98.101 for Xen0 but it works, the VMs can talk to eachother, my lan (192.168.2.1/24), and the internet, and also have IPv6 access.

Finally, printing.
I have a very old Xerox WorkCentre XD100 photocopier/printer, it works very well but it has no drivers for linux/unix and doesn’t even support postscript. The only way for me to print anything to it was to grab my dad’s windows work laptop and plug it into it. Eventually, I gave up trying to setup a linux print server for it and put windows on an old box I found (it had an OEM windows 2000 sticker on it so …). This still did not work because with windows print sharing, both the client and the server need drivers specific to that printer, the most I could print from my linux box was gibberish (and once it printed out the 30-something page source to a postscript test page and refused to stop). Using ghostscript, gsview, a tool called RedMon, I set up postscript emulation, and now I can print things again! Setting up CUPS to use a standard LPD network printer was easy once it was a generic postscript printer. If only ReactOS had some kind of printing/network printing support - I dislike having to use windows but at least its contained in a little box next to my printer with no screen and VNC the only way in. I really missed the ability to print things …

Blogging is fun! Last time I did this was summer!

Bluetooth proximity monitor.

August 8th, 2007

For those of us who are lazy or forgetful, and yet still like their computers locked when they walk away - there is a solution. My computer has a simple, cheap, bluetooth dongle in it - that, teamed with a simple script and a bluetooth-enabled cell phone, makes my comptuer lock itself when I walk away.

Gentoo-wiki has the script and a simple guide relating to it
http://gentoo-wiki.com/TIP_Bluetooth_Proximity_Monitor

The script makes the bluetooth dongle on my computer constantly check if my phone is within range of it, if it finds that it is not in range (I went to the bathroom, etc) - it then tells xscreensaver to lock my system - and when I walk back in, the system quickly unlocks, as the computer see my phone, and unlocks my computer. Simple and quite effective.

I made a simple video of me using a metal case to block the signal and demonstrate what happens when the phone goes out of range.

http://workstation.tonybox.net/stp60505.ogg
Video is OGG/Theora with vorbis audio

Note that the audio is very low volume, using the mic built into my camera..

PyTube

July 11th, 2007

Here is a little program I made for watching YouTube videos in a less cluttered environment.
PyTube allows you to search for YouTube videos, download them to a temporary location and then play them.

There are two versions of it, one downloads the video to /tmp/vid.flv and lets mplayer begin to play this at 20%, the other version downloads the entire video to /media/mmc1, then launches mplayer - the second version is for the Nokia 770, which seems to have trouble with playing the video at 20% while it is still downloading.

The program is, on the nokia 770, still pretty buggy - but it works, most of the time.

PC Version
http://tonybox.net/PyTube.tar.bz2

Nokia 770 Version
http://tonybox.net/PyTube-770.tar.gz

A video of searching for a video, and then playing it on a PC:
http://tonybox.net/pytube.ogg

A video of searching for a video, and then playing it on a Nokia 770:
http://tonybox.net/pytube-770.ogg

—————————————————
Just extract and run “python PyTube.py”
Requires Python, PyGtk, and mplayer - Includes beautifulsoup HTML Parser and Urlgrabber

Expect some deb packages for the Nokia 770 in a bit, once I clean it up for the 770 a little more.

Enjoy :)

MythTV Box

June 24th, 2007

A MythTV Box, after being taken from its natural habitat in the wilderness.

I’ve been playing with MythTV for a few days and its working pretty well, but not without a bit of work..

The main problem right now with MythTV for me happens to be the TV part - The SVideo input on my (WinTV USB2) capture card doesn’t work and telling MythTV that my DirecTV reciever is on channel 3 is not working right…

So - I originally started by installing Fedora 7 and trying to compile MythTV from SVN there - this was a disaster. So.. fglrx, the worthless closed source atrocity that it is, does not work yet on fedora 7, but I heard that r300 managed to get my card working (my devil card - Ati Radeon XPress 200M - Took a while for even fglrx to get support for it) in SVN, so I tried to compile DRI and a few other things, this was rather easy to do, but just did not work - feeling a bit angry at it I decided to move on to just getting MythTV to work - and I’d worry about DRI later.

I checked out MythTV and friends from SVN and began to compile - Then, thinking about the last time I tried to use MythTV on this laptop, I remembered just how long it takes to compile MythTV on it, after several compile errors and an hour or so, I gave up on using Fedora 7 on it.

Feeling rather angry about the complete failure that was my first attempt to configure a MythTV box today, I decided to go the lazy route and just grabbed a copy of KnoppMyth and installed it on the box. This, almost to my surprise, worked.. The configuration scripts made it quite easy to get it to a near usable state rather quickly, which I liked, and I managed to get fglrx working on it after a bit of work.

I like to play classic games, when I used mms (mms.sunsite.dk) on it I had a nice library of snes/nes games, all playable at the click of my remote (which is nice enough to behave as a keyboard/HID on the computer - that with xmodmap made it easy to make the remote usable) - So I setup MythGame with zsnes and mednafen - this worked rather easily.

Nintendo 64 emulation (which, I diddn’t use when I used mms because of the lack of DRI on that system) was a bit tougher. Mupen64 is a very nice Nintendo 64 emulator - it even comes with a nogui version that can be launched from MythGame. The problem is that this nogui version is completely useless without modifying it quite a bit (it ignores config files and likes to ask for user input on the command line even though you told it 800 times that you want to use this video plugin). The gui version, on the other hand, works fine and supports a –fullscreen argument and a rom argument from the command line - the problem was that once you exit the game the GUI is still there. After a bit of tinkering with the source code I made it exit the program once the game is done - this works nicely, except when launched from MythGame the game says NO CONTROLLER - and I haven’t had time to look into this yet…

The last thing I configured, MythVideo was the easiest, just setup my NFS mount to my fileserver and configured it to use that directory and it worked - but then fglrx decided to try and harm me again - It has xvideo disabled by default, which both the mythtv player and mplayer are set to use in MythVideo - but this was fixed with one simple command (aticonfig –overlay-type=Xv)…. :)

In other news, this site now uses LighttpD instead of apache…yay!

Pictures from DefectiveByDesign Action on May 25th

May 26th, 2007

I was at a DefectiveByDesign action on May 25th, it was very interesting - We walked around in yellow hazmat suits and handed out fliers around the movie theater in Huntington, I also have some videos, but I still need to go through them.

http://pics.tonybox.net/v/dbd_may25/

Get OGG Eliminate DRM!