Kasperian Moving Parts

kinda like Batman, but with a wife and 3 kids

Tuesday May 15, 2007
by Jason 'vanRijn' Kasper
1 Comment

Google Summer of Code and KPilot

Coming to a town near you!!! Well, okay, not quite, but we’re making progress. Here’s a tentative schedule:

SOC Schedule for Bertjan, Kpilot, 2007
       
  From To Focus
  May 28: Students begin coding for their GSoC projects; Google begins issuing initial student payments
Week 01 May 28, 2007 Jun 2, 2007 Write Use Case documentation of all conduit flows
Week 02 Jun 4, 2007 Jun 9, 2007 Review and revise Use Case documentation with mentor
Week 03 Jun 11, 2007 Jun 16, 2007 Create Sequence and Class Diagrams from Use Case documentation for all conduit flows.
Week 04 Jun 18, 2007 Jun 23, 2007 Review and revise Sequence and Class Diagrams with mentor. All flows and methods should be in SQDs.
Week 05 Jun 25, 2007 Jun 30, 2007 Review all design documentation to date. Ensure completeness and correctness. Aim for no changes to design after this. If all is complete and signed off, begin writing C++ code for base conduit classes.
Week 06 Jul 2, 2007 Jul 7, 2007 Write C++ code for base conduit classes
  July 9: Students upload code to code.google.com/hosting; mentors begin mid-term evaluations
Week 07 Jul 9, 2007 Jul 14, 2007 Do code review with mentor on base conduit code. Make any necessary corrections. Complete base classes.
  July 16: Mid-term evaluation deadline; Google begins issuing mid-term student payments
Week 08 Jul 16, 2007 Jul 21, 2007 Investigate, review with mentor, decide on whether to use base conduit classes for new or existing conduit. Plan approach. Review with mentor. Ensure no misses between needed work and design of base conduit code.
Week 09 Jul 23, 2007 Jul 28, 2007 Code concrete implementation of base conduit code.
Week 10 Jul 30, 2007 Aug 4, 2007 Continue concrete implementation of base conduit code. Begin creating test cases and cppunit classes for easy testability of conduit.
Week 11 Aug 6, 2007 Aug 11, 2007 Code review with mentor on new/updated conduit code. Make any necessary corrections. Complete conduit coding and test cases.
Week 12 Aug 13, 2007 Aug 18, 2007 Test and debug conduit code. Make necessary changes. Update test cases and cppunit classes.
  August 20: Students upload code to code.google.com/hosting; mentors begin final evaluations; students begin final program evaluations
Week 13 Aug 20, 2007 Aug 25, 2007 Review deliverables, code, progress with mentor. Discuss any final wrap-up issues and resolve them. Continue testing and debugging of conduit code. Ensure code documentation is up to date, correct, and as complete as possible.
  August 31: Final evaluation deadline; Google begins issuing student and mentoring organization payments
Week 14 Aug 27, 2007 Sep 1, 2007 Final review of all work and deliverables. Finish debugging, testing, writing of test cases.

Tuesday May 8, 2007
by Jason 'vanRijn' Kasper
2 Comments

How To Transfer Hi-8 Camcorder Videos To DVD

dvdI have spent the better part of the last 4 days trying to figure this out, so this will serve both as a reminder to self of how to do this, as well, hopefully, as some form of help to those who come after and, like me, cannot find a stinking tutorial about how to do it for the life of them…

We have about 10 Hi-8 (8mm) camcorder tapes from days of yore. However, the camcorder that we used to record said taped memories has long-since died and stopped working. So the time has come to figure out how to get these tapes converted to DVD. But how… Well, thanks to some positive reviews, the fact that Linux (and MythTV) works well with it, and the local CompUSA having a really good closeout deal on it, I’ve purchased a Hauppage WinTV USB2 PVR video bridge.

Linux does in fact load the proper drivers (pvrusb2) and get the device working pretty easily with OpenSUSE 10.2 (kernel 2.6.18). In fact, it was extremely simple to view the video coming in through the composite feed pretty quickly and with little fuss. However, what is very lacking is any sort of GUI interface to the pvrusb2 (VideoForLinux2, actually) settings. You can play with the sys “cur_val” files to make changes, but this gets old really really quick ( sudo su -c “echo false >> /sys/class/pvrusb2/sn-8610055/ctl_mute/cur_val”, for example, to turn off Mute ). Xawtv 4.x is still in heavy beta, seems less functional than Xawtv 3.x. And the latest VLC, with –enable-pvr starts to look functional, but in the end turns out not to be. So, as it turns out, the simplest way to transfer a video in Linux is to manually play with the “cur_val” settings in /sys/class/pvrusb2/*/ctl*, and then simply “cat /dev/video > file.mpeg”.

But I don’t have an internal DVD burner on my work laptop, and I’ve not yet found a nice, feature-complete DVD creator with menus/animations/etc. on Linux. So, that and the fact that the Powerbook (OS X 10.4.9) has some really nice built-in software for this in the form of iDVD. I was very impressed with the quality and features that iDVD has. So the challenge, then, now became getting the videos off of the camcorder and onto the Powerbook.

I used the Hauppage-provided MyTV/X software that’s freely available. This allows for tweaking the record rate, hue, saturation, brightness, contrast, and other things for recording the stream to the hard drive. The thing to note here is that the stream comes off of the WinTV device in interlaced MPEG-2 format. Quicktime, oddly enough, cannot read MPEG-2 format. Out of desperation (on day 3 of my self-imposed tour of pain), I forked over $19.99 for the MPEG-2 component for Quicktime, thinking that that would be all I’d need. I was wrong. Save your $19.99.

So, as far as the settings that I’m using to pull off the camcorder feed… Tell MyTV/X to use the composite feed, set your record quality to DVD Short Play (6.4 Mbit/second VBR quality), as that seems a good compromise between chewing up all of your disk and having bad quality. I’ve raised the saturation setting up quite a bit to come close to the original colors on the tapes. And one surprise that I’ve hit is that after recording each session, if I try to record another one immediately, the device seems to be very jerky (every second it pauses or something). To get around this oddity, I just change the record quality setting to something else and then change it back and it’s fine again. Record your videos to disk. Step 1.

The next problem that you’ll find after you record your video stream to disk is that nothing in OS X can open MPEG-2 files natively. And even if it did, you’d find that your recorded video file is interlaced (very choppy and jerky). So the next step in the process is to re-encode your videos to a format that Quicktime and iDVD understands and de-interlace the video streams to remove the jerkiness/choppiness while you’re at it. I have used ffmpegX for this, and it does a very admirable job. What I’ve used to successfully re-encode and subsequently burn to DVD is the “DV” target format. I can’t for the life of me get it to use less than an enormous amount of disk space for each job, but it does actually get handled correctly by Quicktime and iDVD as a result. I’m going to play with different target formats now to see if I can get a smaller intermediate re-encoded file. But the important thing here is to make sure you check the “De-Interlace” checkbox.

From there on it’s pretty straightforward and I’m sure there are tutorials on how to add videos to iDVD and add the polish, menus, etc., so I won’t go into detail about how to drag and drop movies into iDVD. =:)

Thursday May 3, 2007
by Jason 'vanRijn' Kasper
0 comments

KPilot Porting to KDE4

… she continues. Although, I can unreservedly say that if, by some miracle, we manage to squeeze kpilot back into kdepim before the deadline which is 5 days from now, it is ONLY because of the totally generous and utterly amazing help from Montel Laurent. Once again, THANK YOU Montel!!!!

Tuesday April 17, 2007
by Jason 'vanRijn' Kasper
10 Comments

Syncing Exchange Calendar 1-way Into Korganizer/Kontact

I’ve alluded to this before, but never really posted properly about it. Warning: this is very geeky…

My current employer uses Exchange as its mail/contact/calendaring solution. I have no say in the matter, so hush. =;) But this poses some challenges to those of us insisting on using Free Software at work (like me). Evolution has a connector for this, but I much-prefer KDE solutions, so I stick with Kontact and Korganizer, and of course KPilot to sync my calendars with my palm. To further complicate things, nobody in KDE PIM has the time/resources to make Kontact play nicely with Exchange as a calendar back end.

So, what I must have is the ability to keep my private and work calendars separate. Read: I do not want to be keeping my personal information on the corporate Exchange server. I also have a Palm (Treo 650 currently) PDA and I sync all of my calendar data with it and Korganizer’s “std.ics” iCalendar file. Because of the fact that I insist on keeping my work and private data separate, I cannot use the otherwise possibly useful VersaMail Exchange plugin that synchronizes Mail/Calendar/Contact data for you. Also, KPilot operates best when it’s synchronizing the Palm calendars with a single iCal file, so creating a separate file for korganizer to show me with my Exchange calendar is less than useful.

My approach, then is to write a wrapper process that can retrieve my Exchange calendar, tag each calendar item with a category that I only use for Exchange, and then 1-way sync my exchange calendar into Korganizer’s std.ics. Oh–I also use KMail to access my Exchange mail account via IMAP, and because the current lack of built-in calendaring cooperation between KDE PIM (note: hire me to fix this!! =;) ), whenever I get a meeting request, I click the URL and open the appointment in Firefox (using Outlook Web Access). Not perfect, but certainly very functional and stable and I don’t have to bring up Outlook or Windows for any of it, which makes me very happy.

My first stab at this (which has worked very well for 6+ months now) was to use OWASync (Outlook Web Access Sync) which was written by Graham Cobb. This is a TCL/Starkit-based solution. And again, this has worked well for quite a while now, but has recently stopped working for some unknown reason.

So since OWASync has been having troubles retrieving my calendar lately (and I really do not like TCL), I started looking for another Exchange retriever, and I found a really, really nice Ruby implementation here. It’s based on the RExchange project, and provides a nice and very easy to understand front-end script. I’ve never touched Ruby before this, but I’ve been playing with this script (adding some missing fields like appointment status, location, and description) and I am hooked! Ruby is very cool. And the thing I like best about this approach over the TCL/Starkit one is that I can easily modify and test this Ruby stuff and feel confident that I know what I’m doing.

So to put it all together, I have a shell script that I have crontabbed to run every 10 minutes. This shell script calls my modified Ruby script which pulls down my Exchange calendar (VERY quickly) and creates a single file which has all of my calendar items in it. As it creates the file of events, I have it adding on my custom “Exchange-only” category (CATEGORIES:WorkXChange) to each event. I do this so that my shell script can clean up all previously 1-way-synced Exchange items from my korganizer iCal file, and so that I can also associate a color with this category in both korganizer and my Treo so that I can easily see which items in my calendar are work-related. If the calendar retrieval was successful, my shell script then saves off a copy of my korganizer’s std.ics file, removes all events which have “WorkXChange” in it, and then adds in all of my just-download Exchange events. It also reports on how many events were there before and after the changes so that I can easily tell if something is going wrong. And it does some sanity-checking before overlaying korganizer’s std.ics file to make sure that it hasn’t been changed since it grabbed a copy of it. Korganizer will recognize that its file has changed and reload the calendar automatically. And KPilot will remove the previous Exchange events and add the new ones for me as well.

Perhaps not quite as seamless as one might like, but until I (or some other fearless KDE-PIMster) find the time to start getting Kontact to play nicely with Exchange’s calendaring stuff, it most certainly does the trick. HTH!! =:)

UPDATE : I’ve discovered another really cool ruby library called simply enough iCalendar. It does a very nice job of dealing with iCalendar files. So I’ve completely re-done the merging as I have posted it above and now use 1 shell script that calls 2 ruby scripts

  • rexport.rb which does the exchange OWA calendar retrieval and iCalendar output
  • calmerge.rb which uses the iCalendar ruby library and harvests old X-PILOTIDs from korganizer’s file, then removes the last-synced Exchange events, then merges in the just-downloaded events.

Much more better. But I’ll leave the old, crufty shell/perl method as it is above too… =;)

UPDATE Part Deux : I wanted to add ATTENDEE and ORGANIZER retrieving to my Exchange download/merge process. I hacked it easily enough into rexport.rb and rexchange/appointment.rb, so my Exchange calendar download process works correctly. However, I couldn’t for the life of me get the Ruby iCalendar library to deal with the multiple-occurences-per-VEVENT ATTENDEE tag correctly. So I did what I should have done to begin with (although learning Ruby was REALLY cool) and wrote a simple C++ program that uses KDE PIM’s libkcal library to handle the calendar merging for me. And it works MUCH better and MUCH faster now. You can find mergecalendars.cc in kpilot’s tests directory, in which you’ll also find the CMakeLists.txt for it. You’ll also need to have kdepim and kdepim-dev installed on your machine to build mergecalendars.cc.

So, hopefully this is the last update to this post, and hopefully this will come in nice and handy for someone else who wants to be able to view their Exchange calendar in kontact. Granted, I’ve twisted this to a larger scale than most people would need to because of how I wanted to keep my private data out of the Exchange server, and I want to sync it all reliably with my Treo 650 via KPilot. Here’s a tarball of the whole thing (make sure you right-click and choose save-as). I’d love to hear from anyone who is looking to do what I’ve done here and please let me know if this does or does not help you in your travels, oh weary Exchange sojourner.

UPDATE Part Trois : Here’s the latest skinny, thanks to Exchange 2007, grr…

Thursday April 12, 2007
by Jason 'vanRijn' Kasper
0 comments

Google SOC, KDE, KPilot, and Me

Google SOCWoohoo!! It’s official!! This year, KDE is once again participating in Google’s Summer Of Code (SOC), and we have 40 projects that have been approved by Google! Thankfully, KDE PIM has more than a couple of approved projects (which is really good news!!). Also, I will be a mentor this year (first time, yay!) for a much-needed KPilot SOC project which will go a long way towards making KPilot maintainable, stable, and more consistent (read: better, faster, easier to follow, and less bugs)! I will be working with Bertjan on the project and am looking forward to getting some more momentum behind KPilot (only the best Palm-synching solution in existence today….).

Monday April 9, 2007
by Jason 'vanRijn' Kasper
4 Comments

OS X + NFS+ OpenOffice = SUCK

Repeat after me:

I will never, ever, ever, ever, never, ever, never, never, ever, ever, ever, never, ever, never buy a proprietary (read: non Open Source) computer ever, ever, ever, ever, ever, ever again, no matter how attractive the packaging is.

I don’t know what from the bowels of hell itself possessed me to buy a Powerbook, but it was quite possibly one of the stupidest things I’ve ever done.  It has been nothing but trouble from the day I got it (though it was a nice little mental exercise and challenge for a while in getting Linux to run on it).

I have given up on it for my own personal use. I’m back to using my work laptop for all things at work and home.

But I thought that at least I could let my darling bride use it for her personal stuff. You know… it’s OS X… what could possibly go wrong?

So, 8 hours ago this evening, I started trying to get OS X (freshly upgraded to 10.4.9, don’tcha know) to allow my darling bride to edit OpenOffice files that are stored on an NFS server downstairs. Nope. Cannot do it. Everything comes up read-only. And yes, I did play (for hours) with all possible permutations of setting/unsetting SAL_ENABLE_FILE_LOCKING in soffice. I even tried the new version of NeoOffice (it’s the only one you can download, by the way, which is also teh suck), the new version of OpenOffice, and version 2.0.4 out of desperation. SUCK! I don’t know what the flippin’ problem is, but it’s sucked 8 hours too much out of my life, thank you very much.

Pissed off in general and getting no sleep again…

Love,

Me

BLEH!

Thursday March 15, 2007
by Jason 'vanRijn' Kasper
1 Comment

Stranger Than Fiction

I just got done watching this movie with my family and I can honestly say that this is one of the most amazing movies I have ever seen.

The cast is perfect. Will Ferrell is absolutely incredible. Dustin Hoffman is excellent. Maggie Gyllenhaal is superb!

The style of the film is just impeccable. I don’t think I’ve seen a movie so artfully directed, shot, and editted in a very long time. Amazingly good use of technology, overlays, and good old-fashioned camera work.

Wonderful!!

And the bitter-sweet emotional roller coaster was almost too much to bear.  I loved every minute of it!

I realize that I’m coming across as more of a gushing, emotional school girl than a cool, sophisticated movie reviewer, but my head is still swimming with the emotions, suspense, angst, and adrenaline that a good movie imbues upon its fortunate viewers.

Mostly, all I can say is “WOW.”  Stranger Than Fiction was a delicious adventure.  I would be very surprised if it does not earn more than a few awards at this year’s… award thingeys…

Most excellent cinematography.

This is film at its finest.