Skinning XP
I booted up my Windows XP machine to try out FlyakiteOSX. It’s a suite of tools to help skin your XP desktop to look a lot like OSX. If nothing else, you should check out the website. It’s a very slick Javascript implementation of an OSX desktop. It’s kind of a painful way to navigate a website, but it’s really amazing how well it’s put together. I hope the idea does not catch on though… I think one or two desktops is enough. I don’t need another one in my web browser.
In any case, the FlyakiteOSX suite works remarkably well. It doesn’t change many of the tiny user interface issues that I was hoping for (i.e. double-click on title bar still maximizes, unlike OSX which minimizes.) But it does add transparency to pop-up menus and a pretty drop shadow to every window. I have a reasonably speedy AMD box, so I didn’t notice if this was a severe drain on resources. It might stay on my home machine (which rarely gets any power-on time since I got the Mac Mini), but I probably won’t propagate it to my work PC.
Experimenting with that got me curious about getting widgets on my Windows XP machine, so I also tried out Konfabulator. This is actually a bit different from the Dashboard included with OSX Tiger. It allows widgets to run floating on your desktop, above your normal apps… Versus Dashboard which only runs on an invisible layer which must be summoned to the foreground. Konfabulator does have a layer which isolates just the widgets, so it ends up looking a lot like Dashboard. I haven’t experimented with many widgets, but the default ones are useful enough to convince me I’ll like it. This will be propagated to all of my machines. I may even use the OSX version of Konfabulator instead of Dashboard, just so I can be assured that any widget I grow to love will work everywhere I go.
Posted in Technology, OSX | no comments |
TiVo and Mac OSX: Remux Redux
I finally found a workable set of tools for extracting and re-encoding video from my TiVo using Mac OSX Tiger. For reference, I’m pulling video off of a Series 2 DirecTiVo (HDVR2). If you have a Series 1, you have many more options, including TyStudio, which I mentioned in my previous post. AFAIK, both of the excellent options I’m using now should work for all Series 1 and Series 2 streams.
I have found workable solutions for both GUI and Command-line interfaces. Both tools have their advantages, but the tools I’ll be using the most are the command-line tools. Here’s the procedure I use for each tool.
Technorati Tags: Apple, MacOSX, TiVo
Command-Line Option
The set of tools I’m using now are a combination of vsplit, vstream, and mencoder (from MPlayer). My previous post mentioned that mencoder doesn’t seem to handle the audio-sync very well when re-muxing a .ty file. However, I’ve found that that if I re-mux the .ty file with vsplit into an ordinary MPEGII, mencoder does a much better job when converting that MPEGII into a DivX movie.
Install and start vserver on your TiVo. Obviously you must have your TiVo hacked to do this… And I’m not covering that here. Then, use vstream to fetch a list of all shows on the tivo, so we can get the “fsid” of the show we want:
vstream tivo://myTiVoIP_or_Hostname/llistUse vstream to fetch the show using the “fsid”:
vstream tivo://myTiVoIP_or_Hostname/myFSID -o 'temp.ty' 2>&1Use vsplit to re-mux the show into a standard MPEGII stream (keeping that ‘unused’ string on the end, since the cmd-line arg processor seems to require the extra argument):
vsplit -m 'temp.ty' 'ShowName' 'unused'Now you have a good clean MPEGII file, ready for transcoding. You can play around with mencoder to see what works best for you. For good quality, I recommend doing a multi-pass transcode. See the mplayer/mencoder documentation for more info on that, but here is an example of a 1-pass audio, 2-pass video transcode to DivX:
mencoder ShowName.mpg -ovc frameno -oac mp3lame-lameopts br=128:vbr=4:q=0 -o frameno.avi
mencoder ShowName.mpg -vop pp=lb -ovc lavc-lavcopts vcodec=mpeg4:vhq:vpass=1 -oac copy -sws 2 -o output.avi
mencoder ShowName.mpg -vop pp=lb -ovc lavc-lavcopts vcodec=mpeg4:vhq:vpass=2 -oac copy -sws 2 -o output.avi
mv output.avi ShowName.divxMost of those tools can be found on the DealDatabase forum. I recommend the tivotool.pl package which contains vserver (for both Series 1 and Series 2 TiVo), vsplit (for Mac OSX and Linux), and vstreamer (for Mac OSX and Linux). Also included is a nice perl script which automates the process of getting the MPEGII file as I described above. The easiest place to grab “mencoder” is from the command-line binaries package for OSX.
GUI Option
The VideoLan Client for Mac OSX (VLC) is an excellent movie player application which duplicates most (if not all) of the functionality of mplayer/mencoder. Though I have had trouble using it’s command-line interface, it’s GUI is useful enough for transcoding TiVo files after you’ve modded it with 2 simple plugins.
Start by installing vserver on your TiVo, just as above. If necessary, grab vserver from the same tivotool.pl package. Now, download the 2 plugins from the TiVo-VLC project page. The two files you’re looking for are vlc-ty-mac-r42.tar.bz2 and vlc-vstream-mac-r37.tar.bz2. Note that both of these plugins were built for version 0.8.1 of VLC and won’t work with any other version. Pay attention to the TiVo-VLC status page to see if these binaries were updated for a new version of VLC.
After extracting the two files (with extension .dylib), you’ll need to install these into the VLC.App. Find VLC in your applications folder, right-click (or option-click, whatever you one-butan people call it), and select ‘Show Package Contents’. Copy the two files into “Contents/MacOS/modules” and you are finished with the setup procedure.
Now, fire up VNC and select “Open Network..” and enter “tivo/ty://myTivoIP/plist”. Now open your playlist and select a file for streaming. Pretty easy, huh? You can transcode a file from your playlist by getting the properties of a file and copying the url (including the fsid). Now, use the “Open Network..” menu option to open that file, except use the “Advanced Output” checkbox on the bottom of that dialog. Under settings (right next to that check box), notice the transcode options for Video and Audio. I suggest “mp4v” for video, with a 512kbps bit rate, and “mp3a” for audio with a 192kbps rate.
Posted in TiVo, OSX | 2 comments |
Steve Jobs is a two-timing hussie
Of course, right when I decide to switch, Apple announces that they are going to be moving to Intel chips next year! That could mean that I would’ve been able to get Mac OSX running on hardware that I already own. The likeliest outcome is that Apple will require high-end hardware and, possibly, only support a proprietary hardware set (thereby blocking out self-built or other 3rd party PC’s).
I think it’s pretty cool though that Apple has had a team for the past 5 years dedicated to making sure that each build of OSX runs on Intel’s chips… Just in case… I wonder if MS has a team trying to get WinXP running on Power PC?
In any event, I don’t think it’s a coincidence that Intel recently announced their hardware DRM solution in their upcoming Pentium D. Also, iTunes recently added Video support… You can download a music video along with a song purchase now. Perhaps the next step for iTunes is purchasing movies for download at home. Before they could pull that off, they’d have to convince the big studio execs that their films will be safe from pirates. Intel’s Pentium D sounds like a good package deal for them. Not only do they get their performance/watts number down a bit from the Power PC offerings, but they get an extra layer of security for a next-gen iTunes offering.
Posted in OSX | no comments |
TiVo and Mac OSX
I’ve finally hit a pretty big roadblock in my switch over to the Mac. I am having trouble getting a good set of tools to help me offload video from my TiVo. I’ve been back and forth on this since I bought the TiVo, where I’d go from constantly downloading video for archiving to not really thinking about it at all. Since I picked up the PSP, one of my goals has been to get a nice workflow going to grab episodes of shows that Nicole won’t watch with me (X-Play, Smallville, and Deep Space 9) and take them along with me. Unfortunately, Dell has been delaying my order for a 1GB memory stick pro duo, so using the PSP as my mobile video player is still bottlenecked by the storage problem. I’d like to cancel my order from Dell and just grab it from Amazon (1 GB Memory Stick Pro Duo) for a few dollars more, but why bother if I can’t get the tools in place to make it convenient on the Mac? This makes me a very sad man…
Here’s what I’ve tried so far…
TiVo-mplayer Had pretty good success with this on the PC, though I had a lot of audio-sync problems. Given that it’s at 1 version number greater than what I last tried on the PC, they may have fixed it (though I’m not too hopeful). In any case, I always had to correct an error in one of the .c files (variable declared in the middle of a function, rather than at the top of a scope) just to get it to compile on Windows. On the Mac, I gave up after correctly nearly a dozen compile errors. If anyone would like to provide a binary of this for Mac OSX 10.4.1, I’d sure like to give it a shot.
MPlayer / MPlayerOSX / ffmpegX Unfortunately, none of these incorporated the above changes to support TiVo’s .ty files. So, they are mostly useless for my purposes. However, if I could get my hands on a TiVo-mplayer binary, ffmpegX would still function as a front-end for that command-line tool. (Update 6/9/2005) I discovered that the mencoder portion of the ffmegX binaries does include the demux code for ty files. I also discovered that, just like the last time I used mencoder on the PC to transcode, I still get major audio sync problems. I assume if I just demux the video and use another tool to remux it (with some manual adjustments to audio sync) it will work fine… But that’s too much work. I’m spoiled by the easy TyTool for Windows. Unfortunately for me, he won’t share the source for it so we can try to port it to OSX.
TyStudio These guys have built, what looks like, a fantastic tool. Unfortunately, it has never worked for me. They have an OSX version (requires X11 be installed) and it seems to function nicely once you get ”dlcompat” installed. I couldn’t get Fink or DarwinPorts to install dlcompat for me, so I ended up just checking it out of CVS and building from source. Seems the easiest way to get the libs in the right folder so that TyStudio can see them anyways. Once I got this tool running, I selected a local “.ty” file I had sitting around. Amazingly, this tool performs on Mac OSX exactly as it performed on the PC… That is to say, it got exactly halfway through indexing the .ty file before crashing heinously. I believe it might be because my .ty files came from a series 2 TiVo, because their website only has info about a series 1 server component.
From here, I’m kind of at a loss. I guess my options are: 1) forget about getting video on the PSP memory stick and just buy UMD movies to keep myself entertained, 2) use the PC for video extraction/editing since I already have a good toolset to use, 3) “get cracking” on porting the other PC tools over to the Mac.
Aside: Whenever I have to code up my own solution instead of waiting on someone else to provide me with one, I love using the phrase “get cracking.” It comes from an email conversation a buddy of mine had at Ga Tech. He was using a system tray CD-player app, but he felt it was missing a feature or two. He emailed the author of the app to let him know what was missing, and the author gave him the succint reply: “Get cracking!” :)
Posted in TiVo, OSX, Code | no comments |
How-to: 1-Wire/iButton Apps on Mac OSX
For my own benefit (and maybe yours), I’d like to try an collect all the info available for getting 1-Wire apps running on Mac OSX Tiger (10.4). Eventually, I’d like to see a Cocoa application that functions much like OneWireViewer. That’ll be my next fun project, after I complete my “Learning Cocoa and Objective-C” project.
Technorati Tags: 1-Wire, Apple, iButton, MacOSX
Public Domain Kit ApplicationsThe public domain kit includes 2 relevant builds: ulinuxgnu and libusblinux. Though both of these builds have “linux” in the title, ulinuxgnu should really be called uPosixSerial. Libusblinux should just be called the libusb build, as it will work on any libusb platform. I tested with version 3.00 of the Public Domain Kit and got both builds to work perfectly on a near clean installation of Mac OSX 10.4. Both of these builds required the optional XCode install that came with Mac OSX, so that your system will have the GNU C Compiler (gcc) available.
For serial port access, I used a Keyspan serial-to-USB adapter, part number USA-19HS. The drivers included with the adapter worked fine, though you might check Keyspan’s website for the latest drivers. After installing the drivers, I plugged in the serial adapter and used Keyspan’s installed Serial Assistant application to find out the device name of the adapter. In my case, it was USA19H5b14P1. The next step is to connect a DS9097U serial adapter to the Kespan serial-to-USB adapter. Now you can optionally attach a probe or Blue-Dot receptor to the DS9097U and attach any 1-Wire or iButton devices you may have. Otherwise, the only 1-Wire device we are going to see is the 64-bit ID chip embedded in the DS9097U.
For USB access, I used the DS9490R USB adapter and a Blue-Dot receptor. To allow the Public Domain Kit to have access to a USB device, we need a user-land (as opposed to kernel-land) USB driver. That is what libusb provides for us. The easiest way to get libusb is to first install Fink. Fink is a smart package management app that makes it easy to install open-source software on Mac OSX. Soon, a binary installation of Fink will be available for OSX 10.4 users. For now though, follow the “bootstrap” instructions on Fink’s homepage. After fink is installed, type: “fink install libusb” in the terminal. You now have the libUSB drivers installed.
The Public Domain Kit serial and USB builds worked almost “out-of-the-box”. In version 3.00, the ownet.h file optionally defines some types based on platform. Mac OSX isn’t one of the platforms that ownet.h knows how to handle. The next release of the Public Domain Kit will fix this, but for now, I modified the block around “#define OW_UCHAR” to look like the following:
#ifndef OW_UCHARNow, running “make linux” will build all of the Public Domain Kit serial apps. We have to make one more adjustment for the USB build to work. Essentially, Fink “sandboxes” all of the apps and libs that it installs, to keep it from conflicting with other apps that the user may have installed without Fink’s help. So, you’ll need to point the makefile to Fink’s copy of the libusb library files. At the top of the makefile, you’ll find a definition for compiler flags and linker flags, labeled CFLAGS and LFLAGS respectively. Modify them to look like the following:#define OW_UCHAR typedef unsigned char uchar; typedef unsigned long ulong; #include <sys/types.h>#endif
CFLAGS = -DDEBUG -c -I/sw/include LFLAGS = -DDEBUG -g -o $@ -L/sw/libYou are now ready to run “make linux” to build both the serial build and the USB build. In the directory where you built the serial build, type “./tstfind /dev/tty.USA19H5b14P1.1” with you’re serial adapter device name (not mine, USA19H5b14P1). This should give you a scrolling list of all the 1-Wire devices connected to your adapter. To run the same app in the USB build, in the directory where you build the usb build, type “./tstfind DS2490-1” where the number after the dash simply selects which DS9490R or DS9490B adapter you wish to select if you have more than one. To exit both of these applications, type “Ctrl-C”.
1-Wire API for Java Applications
The 1-Wire API for Java is currently waiting for a good RXTX build, version 2.1.7pre19 or later. After installing the RXTX_Jag.pkg included in the current snapshot, I had to edit /etc/groups file to manually add my username to the “uucp” group. I believe the install script should have handled this, but it appears that it didn’t. This got me past a “PortInUseExcpetion”, but now I’m stuck with a “Bus Error”. I believe this is due to a memory management issue in the native layer that is fixed in 2.1-7pre19.
Web-based 1-Wire Applications
A part of the owfs project, owhttpd is a webserver application which allows one to interact with 1-Wire devices. Unfortunately, the owfs app does not itself work on Mac OSX because of the lack of FUSE support. However, owhttpd should work. To set up owhttpd, I first downloaded the “Source only” package for owfs 2.1.0. Then ran, “./configure” and “make”. Configure failed for me when it starting configuring the swig module. I tried to ignore this and cd’ed into the module/owhttpd folder and ran “make” from there. No dice. Looks like the configure script is broken. Hopefully it gets fixed soon as owhttpd looks like a handy application.
1-Wire on Mac OSX
On the very successful front, I have had some luck getting 1-Wire apps to build and run on Mac OSX. I tried for far too long to get rxtx working, so that I could run OneWireViewer. That still fails, but I think it’s for an old reason. I had been having problems with rxtx on Win32 and Linux, but they are fixed in the CVS head revision… Unfortunately, I can’t build the CVS head revision for the Mac yet.
Eventually, I gave up on rxtx/Java and turned to our 1-Wire Public Domain Kit. The ulinuxgnu build (which maybe should be renamed the “posix_serial” build), built and ran perfectly. Using a keyspan USB-to-serial adapter and a DS9097U serial-to-1-Wire adapter, I had 1-Wire connectivity! The only modification I had to make was to the ownet.h file, where it was defining certain data types based on platform (and this platform wasn’t one of the ones it knew about).
I also got the libUSB build to compile, though it threw a lot of ugly warnings. I had to first ask the very cool Fink to “install libUSB.” Unfortunately, I am without a USB-to-1-Wire adapter at home, so I was not able to test if it’s actually going to work. :( But I have every confidence that it’ll work or, if it doesn’t, I’ll get it working.
Posted in 1-Wire, OSX, Code | 2 comments |
A slight retraction...
I have to make a correction to my previous post. I said that application developers get “easy” access to basically add Spotlight search capabilities “for free”.
“Easy” and “for free” did not take into account the energy said developer would have to expend to learn Cocoa (Apple’s version of Microsoft MFC). As odd as MFC was in terms of some of the design choices, at least it’s back-end was in the very popular C++. Apple’s code-behind is Objective-C.
My GUI development (which, btw, has always been terrible as I really have only an Engineer’s eye) has moved beyond the Cocoa/MFC style, where I actually prefer to create my UI at runtime (changing it up as appropriate). I’m referring to Java Swing style or the newer Microsoft .NET visual designers. I use a visual designer to get a grasp of the initial layout, and then use code to manipulate the layout based on runtime properties. This could explain why my GUI’s always look like crap. :)
If anyone knows of any good references on Cocoa (from a .NET/Java user’s perspective), I’d appreciate it. Although there are wrapper interfaces available from .NET and Java, you still have to understand Cocoa before you can use these and you still have to use XCode/InterfaceBuilder to layout your GUI (and all of it’s events/actions) ahead of time.
Posted in OSX, Personal, Code | no comments |
It barely took a week...
I’m a Mac zealot.
It didn’t take long. It’s funny thinking about how I’d refer to “those mac users” as being in a cult. Seriously… I would stress that the whole platform was based around a quasi-religious cult. Now I’ve learned that there is a such thing as a “rational cult”. People are fanatical about it because it is good. I am in the cult… That isn’t to say I’ve pledged blind devotion to the Mac (well to the Mac Mini, running OSX 10.4, so we’re very clear what I am not pledging my devotion to), because it has certain quirks that frustrate me. And most of that can be fixed if I put a little code behind my bitching. For example, Mac users seem to not care much about the “path” of files. When I’m browsing in Finder, it is more difficult than it should be to find the full path of the current folder. Apparently, this information is not important to most Mac users. Also, when I execute a file search for a file which appears in many different locations, it doesn’t show the me the location of each file (the information I was actually after).
The annoyances I’ve found are far overshadowed by the features and (mostly) by the integration of those features with each other. Let’s take Spotlight as a great example. The first time I tried it, I gave it a “meh”. I thought it was the same thing as the desktop search that I had already been using on Windows. And, I guess that’d be true if the only facet of Spotlight was the handy magnifying glass in the upper corner of your screen… i.e. It would be the same if it were not integrated into every single damn application. Okay, well, not every application but most of them. It’s an API that application developers get for free.. A free, fast, indexed search for all of your applications. Know how GMail searches your email so fast? Yeah, Apple’s Mail.App does that, thanks to Spotlight. And every application can use Spotlight to filter it’s own files. Spotlight’s scope, in a sense, is limited to the context in which it is run (at least from the desktop user’s perspective, developer’s may not find it so easy.. I don’t know about that yet, but I will).
Sure, you can point your WinXP’s desktop search app to a specific subfolder and think you are getting the same thing. But until you try it for yourself, until you see how much it simplifies common file usage scenarios in every application you run, you may remain a member of the ignorant non-cult.
Another aspect of Spotlight that blew me away is the smart folder. Say you build a spotlight query that goes something like: “every folder whose contents are >1gigabyte ordered by size”. This gives you a quick idea of where all of your diskspace is disappearing to. Now, you can save that query as a “Smart Folder,” immediately retrievable with just a click. From the Finder, it looks like any other folder, except that it’s contents are dynamically determined by the query. Smart Folders are a feature that I’ve loved in Outlook XP, but that is the only place I’ve been able to use them until now. Smart Folders are another one of those things that all of your applications get for free, so I can use them anywhere. I know that iTunes has always had a smart playlist, which is an implementation (available on WinXP) of this exact concept. Imagine all of your apps with that kind of feature!
Now, faithful reader who has held on this long, imagine you have opened up your Control Panel on Windows (System Preferences on Apple) and you forget which one of the myriad icons before you has the necessary option to adjust your keyboard repeat rate (just for example). With Spotlight, you just start typing, something like “keyboard” or “repeat rate”. Just beneath the search dialog box, you’ll get a list of results which matched. But a cool aesthetic feature is that Spotlight has highlighted the most relevant icon with a spotlight! The whole control panel is cast in a shadow, and a circle of light highlights potential matches. The stronger the match, the brighter the beam.
That’s just one feature, people.. I could go on forever about how much I love that one feature, and never tell you about Automator or Dashboard. Much less Quicksilver. Or how Spotlight, Quicksilver, Automator, iChat, iPhoto (etc,etc) are all integrated so well together.
Fair warning: If you see me walking down the hall towards you.. You had better run if you don’t want me to try and convert you to a Mac.
Posted in OSX, Personal | no comments |
Fink is crazy!
I asked Fink to install Subversion. Just like apt-get on Debian, or yum on Fedora, Fink is pretty smart and knows where to get stuff.
Problem is… I asked Fink to install Subversion 4 hours ago. Seems that even though I told Fink that I would prefer binary packages where available, it’s only found source packages so far. And Subversion depends on a lot of stuff, including Apache’s huge APR codebase not to mention 53 other libraries. So, I’ve been looking at ‘configure’ and ‘gcc’ output scroll down my terminal for quite a while now.
Could be that no one is maintaining binaries for OSX 10.4, and I’m stuck with source for a while. I guess that’s okay… Sure would save a lot of time if I didn’t have to deal with it though.
Update (5/27/05): Many thanks to Christian Schaffner! He’s the maintainer of Subversion fink package. He pointed me to this resource, which I can use to find out if a binary package is available for OSX 10.4 (at least until 10.4 binaries become common):
Fink Package Database
Update (6/1/05): Fink now has a binary of Subversion available, according to the package database. Unfortunately, it’s only at version 1.1.4 (just like the source version I installed a few weeks ago). I’d like to upgrade the servers at work to 1.2, but maybe I’ll wait until the 1.2 client is available on Fink.
Update (6/14/05): According to the Fink Package Database and my own verification with the cli, the subversion 1.2 client is now available in the unstable packages. Switching to “fink unstable” is quite easy with Fink Commander
Posted in OSX, Code | no comments |
Mac Mini Trepidation
I bought into the craze! I ordered my Mac Mini! I’m soooo crazy!
I got the 1.42Ghz model, with 80GB hard drive and Superdrive. That includes OSX 10.4 Tiger, of course. Ended up buying it from MacMall only because they don’t charge tax (>$60 at Apple!) and they have reasonable shipping with 2-day air only about $20. I skipped the RAM upgrade after I saw that NewEgg has a sufficient 1GB upgrade for only $89.99.
My plan right now is to actually use this as a full-blown desktop replacement. I’ll give it a shot for a few months, see how I like it. If it doesn’t live up to expectations, it gets moved down to the home entertainment center and becomes a MythTV front-end. Much the same way Erik is using his. Though, it seems he intended his to be a HTPC, he’s been moving more and more of his desktop activities to it… In just the opposite path I’ve outlined. We’ll probably both end up at the same spot, somewhere in the middle. Never giving up our beloved/familiar winxp, but relying on our mac mini for our quirkier computing needs.
Posted in OSX | no comments |
