VLC and wireless networks

I typically keep all my digital media on either my desktop at home or my server, but I like to watch it on the laptop while reclining in my papasan chair, or perhaps just kicked back in bed. The problem is that certain files will stutter occasionally during playback, even though the bitrate of the file is far, far low enough for the wireless network to handle.

The way I’m getting to the files is via an AFP mount. Thus, VLC is using the ‘file’ access module, as opposed to rtsp, http, or some other network-based module. Accordingly, VLC is treating the media file as if it were on a local disk, even though it’s not. As anybody knows, local disks are typically much faster both in latency and throughput than anything over the network. That’s probably why the default buffer for the ‘file’ access module is 300 ms, whereas the default buffer for http or mms is much higher (1.2 seconds and 5.7 seconds, respectively).

All we need to do to make VLC stop skipping is to increase the buffer time for the ‘file’ access module.

VLC's file access module preferences

Posted in media, OS X | 1 Comment

Ice Weasels?

14:57 < sky> debian forked firefox? haha
15:00 -!- PowerUser [i=hollandp@nat/apple/x-c57695efe759d747] has quit ["Fly 
          the white flag of war!"]
15:21 < dre^> lol, why?
15:24 < johnny-o> the inability to modify the artwork, if you can actually 
                  believe that
15:24 < dre^> LOL
15:24 < dre^> I can believe it, actually :)
15:24 < johnny-o> http://www.gnu.org/software/gnuzilla/
15:24 < dre^> hopefully they'll keep their changes limited to art...
15:24 < johnny-o> nope!
15:24 < johnny-o> they already blew that one :)
15:25 < dre^> I will say that IceWeasel is a great name
15:26 < johnny-o> as far as tongue-in-cheek unixy names go, definitely
15:26 < dre^> "Love is a snowmobile racing across the tundra and then suddenly 
              it flips over, pinning you underneath. At night, the ice weasels 
              come. -- Matt Groening, "Life in Hell"
15:26 < dre^> I suspect that is the real reference
15:26 < dre^> as opposed to a silly pun on firefox ;)
15:27 < johnny-o> i assumed something like fire/ice and fox/weasel
15:28 < dre^> yeah, but that's the obvious one
15:28 < dre^> gotta aim for obscure with the obvious fallback, so there can 
              still be an 'in' crowd ;)
15:29 < johnny-o> of course!
15:29 < dre^> plus the metaphor is more fun if you try to map the software 
              development process to that groening quote...
15:32 < dre^> where software development is love, the tundra is the open source 
              community, firefox is the snowmobile, 'non-free software' causes 
              the flip and subsequent pin... now you feel trapped! you can't 
              move the snowmobile enough to, say, apply a fancy decal on it...
15:32 < dre^> hence iceweasels
15:33 < johnny-o> i like that much better, actually
Posted in development | 2 Comments

This seems important enough.

If Clinton can get impeached for a blowjob, I would think that Bush can get nailed for illegal wiretapping. Oh fancy that, you mean congress is trying to slide through a vote to pardon the president!?! How could THAT happen?!?!?! </sarcasm>

Posted in bit bucket | Tagged | Leave a comment

Decrypting afp mount strings

{10} andre@werk [~] % mount | grep /Volumes/andre
afp_006Af01nOUmc001Eic06SdO0-1.2c0000ae on /Volumes/andre (nodev, nosuid, mounted by andre)

Huh? how helpful is that! How can I tell what server it came from? Yeah, I could netstat, but what if there’s a bunch of AFP sessions open?

DisplayURL to the rescue!

{12} andre@werk [~] % ~dre/bin/DisplayURL /Volumes/andre 
url: "afp://idio.dreness.com/andre"
kCFURLComponentScheme: "afp" including separators: "afp://"
kCFURLComponentNetLocation: "idio.dreness.com" including separators: "://idio.dreness.com"
kCFURLComponentPath: "/andre" including separators: "/andre"
kCFURLComponentResourceSpecifier not found
kCFURLComponentUser not found
kCFURLComponentPassword not found
kCFURLComponentUserInfo not found
kCFURLComponentHost: "idio.dreness.com" including separators: "://idio.dreness.com"
kCFURLComponentPort not found
kCFURLComponentParameterString not found
kCFURLComponentQuery not found
kCFURLComponentFragment not found

fancy.

Posted in OS X, OS X Server | Leave a comment

big mac

My Mac Pro arrived today. It’s pretty awesome. The first time I opened the cpu panel (after installing CHUD), I thought it was broken. I had all my normal stuff running (safari, ichat, mail, many terminals, itunes, console, a few others), and I was kinda sitting back in my chair so I didn’t see anything at first…

about-this-mac-pro cpu-panel

Rudimentary “beat the hell out of QuickTime Player” testing shows that this machine will play a good number of average video files without breaking a sweat. Next I tried 2, then 4 1080i HD quicktime movie trailers, which played simultaneously without dropping any frames.

mp-qtp-screenshot 1080i-quicktime-playback

It was able to sustain it for a good while, QuickTime Player reporting about 300 – 350% cpu usage, but eventually it wedged and had to be force quiteded(ed). (as an aside, note that I did the same tests when I got my g5 tower, and after I had two or three movies open, it *rebooted itself*; thus began my struggle with that machine to keep it thermally cool; alas). It also performed an xcode 2.4 ‘easy’ installation in 3 minutes 11 seconds. Oh, and it runs quake4 very very well :)

Selected stats:

      Machine Name: Mac Pro
      Machine Model: MacPro1,1
      Processor Name: Dual-Core Intel Xeon
      Processor Speed: 3 GHz
      Number Of Processors: 2
      Total Number Of Cores: 4
      L2 Cache (per processor): 4 MB
      Memory: 4 GB
      Bus Speed: 1.33 GHz
   ATI Radeon X1900 XT:
      Chipset Model: ATY,RadeonX1900
      Type: Display
      Bus: PCIe
      Slot: Slot-1
      VRAM (Total): 512 MB
      Vendor: ATI (0x1002)
   Intel High Definition Audio:
      Available Devices:
          Line Out:
              Connection: 1/8 inch Jack
          Headphone:
              Connection: 1/8 inch Jack
          Line In:
              Connection: 1/8 inch Jack
          Speaker:
              Connection: Internal
          S/P-DIF Out:
              Connection: Optical
          S/P-DIF In:
              Connection: Optical

{2} andre@xxxx [~] % df -h -t hfs
Filesystem     Size   Used  Avail Capacity  Mounted on
/dev/disk0s2   465G    20G   445G     4%    /
/dev/disk1s3   233G   132G   101G    57%    /Volumes/Bay
/dev/disk2s3   234G   225G   9.0G    96%    /Volumes/idio

idio and Bay are the two disks from the g5. Slide ’em out of the g5, take off the little rail nub screws that keep the drives in place in the g5 slots, put ’em into two of the three available mac pro drive sleds, done. I’ll be doing a propper reformat of the disk they shipped me, and migration of data, but not until I can get on a UPS. We’ve had three power outages in 5 days.

sudo dscl . create /Users/andre NFSHomeDirectory /Volumes/idio/Users/andre ; sudo reboot

works just fine for now :)

Posted in mac pro | Leave a comment

Spotlight indexes on read-only media

Here’s a way to let spotlight do a full content index of a read only CD. It can even persist across uses :)

#!/bin/sh
# pass in the name of the r/o volume, e.g. DiskWarriorCD
# this is proof of concept only. seriously :)
if [ ! $1 ] ; then echo "supply a volume name" ; exit 1 ; fi
vol=$1
rodevpath=`df | grep "$vol" | awk '{print $1}'`
fspath=`df | grep "$vol" | awk '{print $6}'`
sudo hdiutil unmount $rodevpath
sudo hdiutil mount $rodevpath -shadow "/tmp/$vol.shadow"
sudo mdutil -i on $fspath
sudo mdutil -s $fspath

I’m then able to return documents on the CD in my spotlight searches, create new files on the CD (in the shadow file) that are also indexed, etc…

{7} andre@idio [~] % rwmount Warrior
"disk2s1s3" unmounted successfully.
/dev/disk3                                              /Volumes/DiskWarriorCD
/Volumes/DiskWarriorCD:
        Indexing enabled for volume.
/Volumes/DiskWarriorCD:
        Status: Indexing Enabled
{8} andre@idio [~] % echo "nice marmot" > /Volumes/DiskWarriorCD/motd.txt
{9} andre@idio [~] % mdfind marmot
/Volumes/DiskWarriorCD/motd.txt
{10} andre@idio [~] % mdfind 'rebuild' -onlyin /Volumes/DiskWarriorCD
/Volumes/DiskWarriorCD/Applications/Utilities/DiskWarrior CD Extras/DiskWarrior 
AppleScripts/Rebuild Directory
/Volumes/DiskWarriorCD/Applications/Utilities/DiskWarrior Manual.pdf
/Volumes/DiskWarriorCD/Applications/Utilities/DiskWarrior Read Me.rtf
/Volumes/DiskWarriorCD/Applications/Utilities/Quick Start Manual.rtf
/Volumes/DiskWarriorCD/Applications/Utilities/DiskWarrior CD Extras/DiskWarrior 
3 Brochure.pdf
/Volumes/DiskWarriorCD/Applications/Utilities/DiskWarrior CD Extras/DiskWarrior 
AppleScripts/DiskWarrior and AppleScripts.rtf
{11} andre@idio [~] % mount
/dev/disk0s3 on / (local, journaled)
devfs on /dev (local)
fdesc on /dev (union)
 on /.vol
/dev/disk1s3 on /Volumes/Bay (local, journaled)
automount -nsl [180] on /Network (automounted)
automount -fstab [184] on /automount/Servers (automounted)
automount -static [184] on /automount/static (automounted)
/dev/disk3 on /Volumes/DiskWarriorCD (local, nodev, nosuid)

( physical CD is at disk2 )
( click eject button of DiskWarriorCD in Finder to unmount disk3)

{13} andre@idio [~] % hdiutil eject /dev/disk2
"disk2" unmounted.
"disk2" ejected.

(re-insert)

{15} andre@idio [~] % rwmount Warrior
"disk2s1s3" unmounted successfully.
/dev/disk3                                              /Volumes/DiskWarriorCD
/Volumes/DiskWarriorCD:
        Indexing enabled for volume.
/Volumes/DiskWarriorCD:
        Status: Indexing Enabled
{16} andre@idio [~] % mdfind marmot
/Volumes/DiskWarriorCD/motd.txt

fun :)

Posted in OS X, scripts | 1 Comment

Get this

This one right here. $30. it’s a blast :) don’t get the jet, it’s too fast. biplane = a nice leasurely flight. you probably won’t, for example, get it lost very high in a tree next to the parking lot you were supposed to be flying in.

This one is sort of a biplane situation; the box should contain the text ‘backwards flyer’. Another thing that isn’t made abundantly clear, but should be: variable throttle control on this one. That is, more than just ‘on’ or ‘off’. I find that it’s pretty easy to fly very close to the ground with this unit, though not at all with the jet.

I found some at Target.

Posted in bit bucket | Tagged | 2 Comments

Allow me to formally introduce yet another new blog on the Internet: The Bits is just a stupidly generic name for a place where I can put all my borish geeky stuff. From the about page:

In this blog, you may find little niblets and scripts, things about Mac OS X or Mac OS X Server. Maybe some deployment issues or interesting workarounds. Maybe some neat little hacks or tricks. Perhaps the occasional higher level commentary about The State Of Things, or whatever.

It’s using wordpress, so all the new hotness is there. You know, microformats, metadata tags, rss feeds, AJAX, xml validators, XML / RPC reacharounds (aka trackbacks), blingtastic click-me-toos, and other things that are TOTALLY AWESOME and which cannot be described without the use of wild all-inclusive gesticulation.

Posted in bit bucket | Tagged | Leave a comment

macosforge opens the doors

What with opendarwin closing down shop, this seems like a good time to mention that macosforge has seen some rather remarkable activity today. A pile of previously internal Apple bugs were exposed to the world for all to see (including one of mine). In my opinion, this is a really cool thing. The primary reason that Open Darwin failed was due to a lack of transparency between Apple and developers. Accordingly, to see a bunch of internal bugs getting externalized is significant.

Posted in development | Leave a comment

WWDC and whatnot

WWDC ’06. Yep.

Of course the content is all confidential, but you may have already seen the keynote.

I worked the Enterprise IT lab for a few sessions this year, as I did last year. This year I also managed the configuration of some of the machines and prepared some demo / tutorial content for a bunch of Open Directory clients and servers. There was also the requisite fire extinguishing for others who were less prepared…

There were lots of interesting sessions, but I still enjoyed it more from the social angle. In addition to all the cool folks I met while working the labs, there were two somewhat separate irc meetups… #macdev and #opendarwin, both on freenode.

The #opendarwin meetup was really more of a wake, considering that they finally threw in the towel. Anyway, that was at Zeitgeist Sunday night, and it was a blast. I drank a lot. The keynote was rough the next morning, but I pulled it off somehow!

#macdev was on Wednesday night, at the usual location – Gordon Biersch. It was the biggest ever; almost 50 people showed up! A big chunk of people parted ways after dinner, those who remained then went on to O’Something’s pub and kept drinking. Good times :) Between the two irc groups, I caught up with several friends from afar, and also got to know some other folks.

Thursday night was the Apple campus bash. They bussed us all to Cupertino from the Moscone center. BT played. I was mostly into it for the fact that a bunch of people seemed to be into it. Maybe one of these years we’ll get an act that I can dig on directly.

Friday night there was a large collective trip to the Castro theater to see 2001 in 70mm goodness. It was an interesting collection of friends of mine who had never before met. They got started with a big organ playing a full-on Also sprach Zarathustra, complete with the sinking into the stage at the end – very awesome. I just happen to have some video (though I missed the first phrase). The movie was… well, I don’t need to tell you. I saw things in it I really don’t remember having seen before, specifically a bunch of freak-out stuff towards the end. Maybe that means I never made it that far, maybe it was a special cut… not sure. Also lots of laughs from the crowd during some of the HAL interactions; it was fun.

Spent the night @ nick’s, and most of Saturday, then came back to tha coup.

Yesterday and today was mostly spent catching up with things @ work. I’m finally unburied and ready to work on some projects that really need attention. Hopefully servers don’t explode, diverting my time once again towards janitorial duties.

Otherwise, things are good. The weather is great, I bought a bike, and oh yes, the Nintendo DS Lite rocks the house. My friend code is 287839 004114; currently I’m doing mostly mario kart, and also some of the new mario bros’. Metroid DS is all funky and first-person, but I think it’ll be worthwhile, just takes getting used to.

Posted in bit bucket | Tagged , , | Leave a comment