Camping in Santa Cruz

When I start any new endeavor I tend to let my imagination run wild and then I always end up disappointed because reality does not ever measure up to the limits of my imagination. I feared that when I accepted my current job at Twitter that the whole experience could never be as good as I imagined because of this. However, I was pleasantly surprised to find that Twitter and California completely blew away my expectations!!

First of all, the position I have is new, and it’s a great challenge as well as a satisfying feeling to be building our team from the ground up and contributing to that process. Second, the perks here are well beyond what I imagined it would really be like. A while ago I interviewed for a financial firm in Santa Monica, and they tried to show off all the perks they had for their employees, but I got the distinct feeling that they were putting on a show specifically because there was a potential new hire in the office that day. At Twitter, it really is just amazing all the things they do to take good care of their employees and keep everyone happy. They provide three square meals a day, freshly prepared and cooked on site, as well as an arsenal of snacks, beverages, and all kinds of other perks I won’t even go into because it would just take too much time.

Probably the greatest perk of all though is the fact that they understand the value of having a good work/life balance. My shift covers 12 hours a day, for 3 or 4 day weeks. The rest of the time is mine to do with as I please. This means I see my family more often, and we have more time to do awesome stuff that we couldn’t have done before. In addition, we’re living in beautiful California, where it hasn’t rained for like 3 months.

Taking advantage of this, last week we took off on a one day camping trip to Santa Cruz. When we left home, it was about 92 degrees out. When we reached Route 1 outside Santa Cruz I took my phone out to check the temperature. Turns out it was only 65 degrees there!! We turned off the air conditioning and opened all the windows to enjoy the cool, crisp, Pacific air. We got to the campsite not long after that, and once we had set up our tent and settled in, we took a drive down to the closest beach to see the ocean.

Image

The beach featured a dramatic drop from the parking lot to the sand, and it happened to be an overcast, foggy kind of day there, but we enjoyed running around for a few minutes before we went back to the car.

Image

Image

The climb up the stairs was rough!

Image

Once we got back to the campsite, the girls took advantage of the banana bike rentals and bouncy beach thing:

Image

Image

While Anna and I sat with the dogs and enjoyed a few relaxing moments together:

Image

Then Anna cooked up some burgers and hot dogs!!

Image

Afterwards I took the girls to the pool while Anna tended to the campfire:

Image

and finally we ended the day by roasting marshmallows and enjoying each other’s company!

Image

The whole family had an amazing time, and we wouldn’t have been able to do it without Twitter! I am forever grateful for all the ways in which this company has helped us to improve our lives!

Gmail on iOS (and why it sucks)

In my search for the perfect client I’ve tried several variations of client and configurations, and I’m going to lay out below why I think Gmail on iOS in it’s current state sucks. I’ve used the default Apple Mail app, which you can’t remove from the phone at all, the Gmail iOS app which was released sometime last year and immediately pulled again because of fatal errors (way to go Google! How much money do you guys need to develop a simple client for your ultra popular webmail service?) and the recently released Sparrow client after some positive experience using their desktop Mac client.

Mail

First let’s look at what the built in Mail app from Apple can and can’t do. This is the only iOS client that can download new email in the background without any further intervention. You don’t need to open the app to kick off a new download, the client simply gets new email as it is delivered to your inbox. You can optionally include a notification in various permutations. If you need to know about certain email in a rather timely fashion, there is simply no better solution as far as getting those messages in front of your eyes.

However, for Gmail you only have two configuration choices on iOS. You can choose to set it up as a Gmail account, which does not allow push notifications or background polling at all, so the closest you can get is fetching new email every 15 minutes. For most use cases that’s probably fine, but it also means you can’t sync your contacts if you plan to use Gmail as your primary contact database (which I do because it’s fucking convenient to have all your contacts in one place). The other option is to set up Gmail as an exchange account, which does provide instantaneous push for new email (like BlackBerry has done for YEARS), and you can also sync contacts and calendars using this configuration option. The only downside here is that battery use is slightly higher because you’re getting email delivered constantly rather than in 15 minute batches. If you have a busy inbox it could make a pretty big difference in your battery life. No matter which of these two options you choose, the way that the Mail app handles emails is not that different. Under the default Gmail config, you’ll get an archive button instead of a trash can (delete) button, but the exchange setup can easily be configured to allow the delete option to archive messages anyway.

Apple Mail app

Mail app uses a “flag” for Gmail stars and the center bottom button is for archive (instead of delete)

The default Apple Mail client also has the ability to handle messages using IMAP folders which then map back to functions in Gmail. There are the special folders like Important, Spam, and Starred, and then there are also all your labels as folders. So it’s nice that you can at least apply a label to an email, but that also archives the message (removing it from your inbox) and you can only apply one label at a time. If you try to apply a second label, the email is essentially “moved” into another folder. It’s a limitation with the workaround of using IMAP rather than the Google Gmail API. I also use a ton of filters for various automated emails (think nagios) and they are left unread but shuffled out of the inbox so that my phone isn’t constantly buzzing. In the Gmail web client, I can see the number of unread messages which have been filtered to a certain label, which isn’t something that Apple provides in their Mail app unless you specifically choose to sync that IMAP folder to your phone, which obviates the whole reason I filter messages out of my Inbox in the first place.

Apple Mail app doesn't show unread count on "labels"

Apple Mail app doesn’t show unread count on “labels”

Another pain point here is that none of the folders displayed in the Apple Mail app have any colors. I have many of my labels configured in my Gmail web client with meaningful colors so I can quickly identify them without having to read the text, and it’s unfortunate that this can’t be carried over on Apple’s Mail client, but my understanding is that Google doesn’t provide a method in the Gmail API to determine label colors anyway. The other annoyance I have with the Apple Mail client is that while it does allow you to apply a flag (which translates to a Gmail star) it takes three taps inside a message to do so, or you can do it in four taps while you’re looking at the multiple message view. In the Gmail web client it is as simple as clicking (once) on the star icon or tapping the “s” key if you have Gmail keyboard shortcuts enabled.

Despite these annoyances I still find Apple’s Mail client to be the best solution for me so far if only for the fact that all messages are downloaded and waiting for my response when I open the client, so there is no delay when I decide I want to do some email triage. I just open the app and start archiving, labeling, or starring messages depending on what I plan to do with them.

One last minor quibble I have is that Gmail does not expose lab features through the IMAP functionality, so there is no way to “mute” a message from the Apple Mail client, or any other IMAP client for that matter. As far as I can tell, there is no reason they could not merely make the special Mute label another IMAP folder, but so far there is no sign that they are going to do this.

Other highlights/lowlights: Mail includes up/down arrows for quickly jumping from one message to another without having to go back to the list of all messages first. This saves a shitload of time each day as I go through email and archive most of it, marking only a few for followup or further reading.

Gmail for iOS

When Google finally released a native iOS Gmail application, I was extremely excited! I was looking forward to getting full Gmail functionality (stars, labels, filters, etc.) from a native iOS application. It is amazingly stunning how poorly Google executed on this app. First of all, I do have to give credit that all functions available in the Gmail web client are available on the iOS client, I can star, label (and I can see the correct label colors), mute, archive, delete, the whole shebang.

Gmail for iOS

What a novel idea, make starring an email one tap away, and show me the full label name/color in the message list!

It also provides the superior search that Google is known for, and they do display counters on every single label with unread messages. This is also the only iOS client which will actually display the labels applied on a message in the list view, which I greatly appreciate. However, there are many ways in which this app is crippled. The most obvious thing is that it only loads the first 10 emails, just like the mobile version of Gmail, so if you have a backlog and you want to read your messages from oldest to newest (I do, and I do) you better like tapping “Show more messages…” a bunch of times.

Gmail for iOS limitations

Show more messages…UGH

The second most annoying thing about using this app is that it’s actually just loading their HTML5/JS mobile page in an iOS wrapper with a few special buttons on it. This means the app does not have the look or feel of a native iOS application. The bounce when you reach the top of a list is “wrong” and the scrolling physics are very different. In addition, they have this asinine scribbles feature. Seriously? I am NEVER going to use a mobile email client to draw something with my finger, WTF? Another way in which this app is broken is that when you scroll to the bottom of the list of all your labels (I have about 50) you can’t tap the top iOS status bar to quickly jump back to the top (where the Inbox is).

Unread counts

Unread counts on individual labels!

My final problem with the official Google Gmail app for iOS is that push notifications are completely broken. For whatever reason Google has not seen fit to code their app so that it utilizes “Notification Center”, which is basically all the ways that Apple ripped off Android in order to mangage and display new notifications. All that being said, I would fucking love using this app if they allowed me to connect more than one account at a time!

Other highlights/lowlights: Since Gmail for iOS is not a client but a wrapper for their mobile website, there is no syncing necessary, and there is something to be said for that, despite the fact that you have to load 10 messages at a time in a long list.

Sparrow for iOS

So after all the frustrations experienced using the default Apple Mail client and Google’s own Gmail app, I was holding out hope that the team at Sparrow would pull through and make a really great iOS app. They didn’t. Almost, but not quite, or at least not enough to satisfy my personal needs.

First of all, I have to admit that I had been going to their coming soon page on a daily basis  in anticipation of the initial release of the app. I may not be a fair judge because I had such high hopes that this app was going to end all my suffering when using email on iOS. So let’s dig in. At first glance the app is very nice looking, and has a great design flare. Unlike the Gmail for iOS app, it’s fully native, so scrolling, the end of screen bounce, all sliding and animations are fluid and beautiful. The experience of manipulating the app is excellent. My first problem is in the display of the list of messages.

Sparrow for iOS

Label colors don’t sync, only one label is indicated in the upper right corner, but what the fuck label is it? Who the fuck knows?

As mentioned earlier, there is no way for the Sparrow for iOS app to sync the actual colors I have meticulously assigned in Gmail, so right off the bat that is annoying because I can’t rely simply on color to help identify which label is applied to an email, and since they don’t provide the text from the label, it’s pretty much useless as any kind of indicator except “there is a label on this message”.

In addition, even if there is more than one label applied, Sparrow can only show the color for one label in the message list, and I’m not even sure how they determine how to do that, but the point is there is information here that is not available at all using this client. You’d think then that at least if I went to an individual message it would have a way to show me the actual label name, even if the color is all wrong, but no. The individual message view completely ignores labels entirely, as if they don’t exist at all. I guess the idea is that if you’re reading the actual message you’re beyond the point of needing to know how it’s labelled, but there are many messages which already have one label applied and I want to add a second, but I have NO WAY to tell which is applied or not applied using this app. I am the kind of person who needs meticulous control of stuff like this, to the point that if Sparrow let me edit the colors of the labels in their iOS app (like they do on the desktop client) I would definitely go through each label and match the color as closely as possible (like I did on the desktop client). Unfortunately, it only appears you can modify an existing label’s name, not color.

Some other annoyances include the fact that I can only apply a label from the list view (not inside an individual message when I might be more likely to actually have a clue as to what I want to label the message as), and in order to apply a star it takes at least two actions (in list view, a swipe and then a tap; in full message view two taps) and this is opposed to Gmail where again it’s one tap in the iOS client and in their mobile Gmail interface. I would much rather have the full static bar along the bottom with the buttons exposed in the individual message view, which would eliminate the need for a second tap on common functions like star. I would also prefer if the individual message view replaced the “new mail” button with a label button, so I could apply labels without having to go back out to the list view, swipe to expose the buttons beneath the message, and tap the label button to view the available labels and then finally tap to apply a label.

Although Sparrow is made specifically with the Gmail API in mind, apparently Google also doesn’t expose the labs functionality to the API, so there is no way to mute a message from the Sparrow email client either. They also have no way to continue fetching new email when the app is not in the foreground, and that makes it dreadful to open the app when there are a few to a hundred emails waiting, meaning that you’re waiting several minutes just for the privilege of seeing what your unread email looks like. They also currently do not have push notifications, but that is apparently coming in an update soon. It doesn’t really matter to me anyway, because push notifications still doesn’t mean the app will be able to download new mail in the background so I can just blast through it when I’m ready without having to wait for it all to download.

Other highlights/lowlights: One thing that drives me fucking crazy about Sparrow for iOS is the fact that the method for moving between various conversations is to scroll to the very top or bottom of a message and then keep pulling in the same direction. In long threads, getting to the top again is easy because you can tap the middle of the status bar, but getting to the bottom has no shortcut, and the other email clients discussed here include buttons for this.

In addition, since the same method is used to move between threads in a conversation as well as full conversations, you sometimes end up having to go back up through multiple replies to get to the next conversation, or go back to the list of messages to choose the next conversation. The whole thing could be implemented more elegantly and without much effort, and without changing the way the app works. The really frustrating thing about this is that in a full on message view, they could have used left and right swipes to move between conversations since that was not a method that existed. I specifically expressed to the developers that I thought this was the best method, but they decided to implement something different. I think the application is beautiful and well built, but some of the UX choices they’ve made are not the most efficient use of taps, swipes, and slides. I understand the choice to put the buttons inside another button in message view in order to show more of the content of the message, but it means every time you read an email that you want to star, you have twice as many taps to make.

Unfortunately, for now it looks like I’ll stick to using the default Apple client because yet again Apple has hamstrung developers from being able to provide the same functionality. I wish they would at least open up some of the private APIs that they are obviously using for stuff like downloading new mail in the background so a better Gmail client could be produced. Each of these clients have their strengths and if they could all be combined into one super client I would easily pay $10-20, it’s that important to me.

Also, I’m not writing this because I’m a curmudgeon, but because I deeply care about this issue and because these clients all have great things going for them, which makes my frustrations amplified.

Life is Good

I recently passed 90 days doing my new job at Twitter. Anna, the girls and I have started to settle into our new home, and school and work have been great, if not tiring. Bunny has started running track, which she has been excelling at! She really enjoys the events, and the younger kids all do the same events as the older kids, so she really feels a part of something bigger than herself or her school. Lila started doing a dancing/cheer class, which will be short lived but she is thoroughly enjoying it! Anna has been working hard at reupholstering and refinishing furniture in our house, in some cases to great transformative effect! I’m so proud of all my family members!!!

Working for Twitter has so far been the best professional experience of my life. The company takes great strides to keep their employees well (and healthily) fed, the work is very stimulating, and there are tons of interesting events going on all the time. Sometimes they’re just social, but there are also a lot of mentally stimulating events going on, from visitors coming in to present talks, to discussions that occur by serendipity. This week was the first week I took over primary duties in my new role, and while it’s been exhausting, it is really rewarding to know I’m having a positive impact so early on. My new schedule will start soon, and just in time for the summer months so our whole family will be able to spend a lot of time exploring the trails and other places in California. So much to do, and soon we’ll all have lots of time to do them! I’m really looking forward to that.

Tagged ,

New opportunities

Yesterday was the last day of my employment at the Nasdaq Operations Center. It is extremely surreal to no longer be responsible for systems that I have been monitoring for several years. All of a sudden I am no longer responsible for the systems that I helped create and curate. It’s hard not to think about it. However, I have a new opportunity at Twitter to leverage my experience in operations at Nasdaq and I am excited to get started there. I will miss the relationships I have fostered at Nasdaq but its time to move on.

20111223-195339.jpg

Tagged

Band of the Day iOS app

I love music, but since I’ve started a family and been working full time (as opposed to doing mostly nothing and playing in a band years ago) its become harder and harder to discover new music. It’s hard to find the time to sit around and listen to music, and most of the time I was getting recommendations from friends that I lived with, which obviously doesn’t happen anymore. I used to use last.fm as a sort of crude music discovery tool, as they will try to play music that matches your tastes based on your listening habits. That mostly never really worked for me as it was rare that I actually heard a band that I wanted to listen to repeatedly.
Today however I was introduced to a new iOS app called Band of the Day, and I loved it instantly! Each day a band is highlighted and you can read a review, check their bio, see messages from other users of the app, and stream whole songs from recent releases. You can also purchase songs or albums directly through the iTunes store. In a word, for me, it’s perfect. I have a train commute to work each day and now I have a super simple, beautiful music discovery app to help me find new bands. I’m going back now to browse trough past Bands of the Day!

Tagged

iPhone app Waze updated

20111014-051157.jpg

I had tried using Waze earlier this year, and while free turn by turn directions were really nice, my issue was with the voice guides navigation. Gladly, with the latest update the voice navigation in Waze has become much more robust! Previously the only voice input from the app was highly generic like, “turn left”, “bear right”. Now however the app tells you specifically the name of the road you are to turn onto, which greatly improves usability and obviate the need to look at the screen.
The other thing I like about Waze is the social aspect of the app. You can easily and quickly add an alert if you happen upon an accident or construction or some other delay. If enough people use this it could be very useful. Since the app is completely free, why not download it and give it a try?

Tagged

handleMedia.sh: update

I made some changes to make my handleMedia.sh script more generic, removing some duplicate code, etc. Here is the final result. I’m still trying to think of a good way to pare it down even more, I don’t like how ugly all the matching is to figure out if the files are located in the Downloads folder or one or two folders deep.

#!/bin/bash

#/usr/local/bin/handleMedia.sh
#
# Jay Holler 09-24-2011
# Find files in the Downloads directory and move them to
# the appropriate folder on the NFS share or put them in the Dropbox directory for syncing to iTunes.

# Set up some reusable variables
notify=$(/usr/local/bin/prowl.pl -apikey=”/dev/null” -application=”`basename $0`” -event=”Done” -notification=”`cat /tmp/emailmessage.txt`”)
umask 0022

#Function for matching TV shows, assumes SxxExx format and “.” separators
function MOVE_TV_SHOWS() {

storageDir=/home/jholler/TV
cd /home/jholler/Downloads

for myFile in *.$ext; do

shopt -s nocasematch
if [[ "$myFile" =~ ([A-Za-z0-9\.]*)\.(S..E..).*.$ext ]] ; then
File=${BASH_REMATCH[2]}.$ext
PreShowName=${BASH_REMATCH[1]}
ShowName=$(echo $PreShowName | sed ‘s/\./ /g’)
echo “[*] A new episode of $ShowName is ready for your enjoyment: $File” > /tmp/emailmessage.txt && sleep 2
[ -d "$storageDir/$ShowName" ] || mkdir -v “$storageDir/$ShowName”
mv -v $myFile “$storageDir/$ShowName/$ShowName.$File”
$notify
else
echo “[+] $myFile does not appear to be a TV show, pushing it to /home/jholler/Movies on lunchbox” > /tmp/emailmessage.txt
mv -v “$myFile” “/home/jholler/Movies/$myFile”
$notify
fi
done

}

#Function for matching mp3s, typically stored in a folder for the album.
function MOVE_MP3() {

storageDir=/home/jholler/Music/new
cd /home/jholler/Downloads

myFile=$(ls */*.mp3 | head -1)

shopt -s nocasematch
if [[ "$myFile" =~ ([A-Za-z0-9].*)\/([A-Za-z0-9].*).mp3 ]] ; then
AlbumName=${BASH_REMATCH[1]}
[ -d "$storageDir/$AlbumName" ] || mkdir -v “$storageDir/$AlbumName”
mv -v “$AlbumName” “$storageDir/”
echo “[*] The album $AlbumName is now ready for your enjoyment” > /tmp/emailmessage.txt && sleep 2
$notify
else
echo “[+] $myFile does not appear to consist of mp3 files, please investigate” > /tmp/emailmessage.txt
$notify
fi

shopt -u nocasematch

}

###############################################
## Start the avi matching portion of the script
## If for some reason the file is located in a folder or several folders deep, find it and put it in the Downloads directory for further manipulation.
###############################################
cd /home/jholler/Downloads
ls *.avi 2> /dev/null | wc -l && ext=avi; MOVE_TV_SHOWS
ls */*.avi 2> /dev/null | wc -l && mv */*.avi /home/jholler/Downloads; ext=avi; MOVE_TV_SHOWS
ls Movies/*/*.avi 2> /dev/null | wc -l && mv Movies/*/*.avi /home/jholler/Downloads; ext=avi; MOVE_TV_SHOWS
ls TV/*.avi 2> /dev/null | wc -l && mv TV/*.avi /home/jholler/Downloads; ext=avi; MOVE_TV_SHOWS
ls TV/*/*.avi 2> /dev/null | wc -l && mv TV/*/*.avi /home/jholler/Downloads; ext=avi; MOVE_TV_SHOWS
#########################################
## End avi matching portion of the script
#########################################
###############################################
## Start the mkv matching portion of the script
## If for some reason the file is located in a folder or several folders deep, find it and put it in the Downloads directory for further manipulation.
###############################################
ls *.mkv i 2> /dev/null | wc -l && ext=mkv; MOVE_TV_SHOWS
ls */*.mkv 2> /dev/null | wc -l && mv */*.mkv /home/jholler/Downloads; ext=mkv; MOVE_TV_SHOWS
ls */*/*.mkv 2> /dev/null | wc -l && mv */*/*.mkv /home/jholler/Downloads; ext=mkv; MOVE_TV_SHOWS
ls Movies/*/*.mkv 2> /dev/null | wc -l && mv Movies/*/*.mkv /home/jholler/Downloads; ext=mkv; MOVE_TV_SHOWS
ls TV/*.mkv 2> /dev/null | wc -l && mv TV/*.mkv /home/jholler/Downloads; ext=mkv; MOVE_TV_SHOWS
ls TV/*/*.mkv 2> /dev/null | wc -l && mv TV/*/*.mkv /home/jholler/Downloads; ext=mkv; MOVE_TV_SHOWS
#########################################
## End mkv matching portion of the script
#########################################
###########################################
## Begin mp3 matching portion of the script
###########################################
MOVE_MP3
#########################################
## End mp3 matching portion of the script
#########################################
exit 0

MythTV

I have decided to take my nice new core quad PC and turn it into a Linux based DVR using Mythbuntu. I ordered a HVR-1600 card to record both HD and SD independently. Anna is looking forward to it greatly, as when we had an old PC serving this duty in the past it was the ultimate TV machine to her. Mostly this is because she sometimes ends up late to see a show while it is in, so now she won’t miss stuff or have to wait for it to download the next day. I am excited to have a great new project to tackle. Looking forward to seeing how much better MythTV is in the last three years.

Tagged

Air Video Server running on a Windows XP Guest OS in virtualbox on Ubuntu Linux

For years I have been trying to find a way to easily and elegantly stream video to multiple small devices in our home. We only have one TV, and not everyone wants to watch the same thing at the same time. This really isn’t the worst problem in the world, obviously, but something I have tried to solve using all manner of different software and hardware combinations. A few weeks ago I discovered an iPhone application that required a server application running on either WIndows or Mac OS X. I tried to install the Windows version on my Ubuntu box running under Wine, but the application would crash as soon as the iPhone app tried to read a file from the hard drive. As they say, Wine Is Not an Emulator, and in this capacity it wasn’t going to cut it. I also checked the forums for the iPhone app developers who provide the PC app, and they had no intention of making a Linux version available anytime soon. So, I did what any self respecting geek would do presented with a solution which could potentially work, made it more complicated.
I first went through the process of building a new virtual machine in VirtualBox to host the Windows XP machine. That was quick and easy, and I happened to have an old XP disc lying around which isn’t in use on any computer anymore, since I haven’t used Windows at home since about 2004. The most challenging part was getting the Windows XP Guest OS to join the same network as the rest of the machines on my internal LAN, because virtual machines create a software interface and the actual packets are actually coming in through the same physical NIC card on the Linux machine. Fortunately, not too much googling later provided me with exactly the solution I was looking for. After installing these two utilities and running the script, provided at this blog, I was able to make the WIndows XP Guest OS join the 192.168.1.0 network! Perfect.
Now, all I had to do was install Bonjour from Apple, the Air Video Server application provided at inmethod.com and start it up.

I had to share the local Linux directory that stores all of our media, and set that up through VirtualBox, but that was relatively painless, requiring only that I get the VirtualBoxGuestAdditions.iso and use that on the Windows XP Guest OS so that it would recognize the shared folders and I could mount them permanently.

Once it was all good to go, I just added the /storage directory (which I mounted under Windows as Z:/ using the command “net use z: \\vboxsvr\storage”) to the shared directories in the Air Video Server app.

Here’s a screenshot of what this all looked like on the Windows XP Guest OS:

Air Video running in a Windows XP Guest OS

Air Video running in a Windows XP Guest OS

Now it was time to fire up the iPhone application and test all this juicy new streaming goodness!

I had been messing with this most of the night so the app had already detected the Windows instance of Air Video Server using Bonjour, which is why I had to install it on the Windows XP Guest OS:

AirVideo app Servers

AirVideo app Servers

Once you tap on the servername, the next screen shows you available shares:

AirVideo app available shares

AirVideo app available shares

Tapping on the Z:/ drive I made available shows me the directories and files located there, including a count of folders and files next to the folder names:

AirVideo app directories list

AirVideo app directories list

Drilling down into the TV directory shows me the same thing, folders and the number of files/folders in each directory:

AirVideo showing the TV directory

AirVideo showing the TV directory

Here I have selected the Bored to Death directory, and you can see that the app grabs screenshots as well as displaying some pertinent file information for each file found, very nice:

AirVideo app Bored to Death

AirVideo app Bored to Death

After selecting a particular file, I am presented with a few different options. Since this file is an xvid encoded avi, the app won’t be able to play the file natively. Air Video Server will take care of transcoding the file on the fly so that the iPhone app can play it:

AirVideo app avi file options

AirVideo app avi file options

Now comes the good stuff, after selecting “Play with Live Conversion”, I am presented with the option to play from the previously played position, the beginning, or seek to a new position, very slick indeed:

AirVideo app Live Conversion options

AirVideo app Live Conversion options

After making my choice: “The Beginning”, the app begins the process of buffering the video to the iPhone app:

AirVideo app Preparing Video

AirVideo app Preparing Video

Now, I suspect that because I’m running Air Video Server inside Windows XP running as a guest OS inside VirtualBox on a Linux host on a older desktop machine, the app complains that it doesn’t have the power to actually play the file, but all is not lost:

AirVideo app lies to me

AirVideo app lies to me

I just tell the app to continue anyway, and I was able to play the entire show without interruption:

AirVideo app buffering video

AirVideo app buffering video

And boom, about 5-10 seconds later, my TV show begins playing in perfect stutter-free fashion:

AirVideo app playing Bored to Death S01E01.avi

AirVideo app playing Bored to Death S01E01.avi

Tapping on the screen while the video is streaming brings up controls, in this case a little different than playing an x264 encoded file because the Air Video Server app is transcoding on the fly:

AirVideo app streaming converted file controls

AirVideo app streaming converted file controls

If I wanted to seek to a different position, the app handles that too, which is pretty nice to have, although honestly I usually just watch a show straight through:

AirVideo app live conversion seek menu

AirVideo app live conversion seek menu

All in all this app kicks total ass! I can now stream to any and all of the three iPhones in our house running from a single instance on a Windows XP Guest OS on my Linux box! The app works so well and I couldn’t be more pleased to be able to have this ability, which means I can now watch stuff while lying in bed without using a laptop, which is very nice indeed.

handleMedia.sh

Being partially incapacitated has given me the opportunity to make some tweaks to my personal scripts which deal with all the incoming media formats I pull in using SABnzbd on my Linux box. For a long time I have been using separate scripts to deal with different files types, and I finally decided to make one script that automatically chooses which actions to take based on the file type found in the Downloads folder that SABnzbd dumps its content into. Without further ado, here is the new master script!

#!/bin/bash

#/usr/local/bin/handleMedia.sh
#
# Jay Holler 09-10-2009
# Find files in the Downloads directory and move them to
# the appropriate folder on the NFS share or put them in the Dropbox directory for syncing to iTunes.

## Move to the Downloads directory that SABnzbd uses

cd /home/jayholler/Downloads

###############################################
## Start the avi matching portion of the script
###############################################

if [ -e *.avi ] || [ */*.avi ] || [ -e Movies/*.avi ] || [ -e Movies/*/*.avi ]; then

storageDir=/storage/TV

mv */*.avi /home/jayholler/Downloads
mv Movies/*.avi /home/jayholler/Downloads
mv Movies/*/*.avi /home/jayholler/Downloads
mv TV/*/*.avi /home/jayholler/Downloads
mv TV/*.avi /home/jayholler/Downloads

for i in *.avi
do
myFile=”$i”

shopt -s nocasematch
if [[ "$myFile" =~ ([A-Za-z0-9\.]*)\.(S..E..).*.avi ]] ; then
File=${BASH_REMATCH[2]}.avi
PreShowName=${BASH_REMATCH[1]}
ShowName=$(echo $PreShowName | sed ‘s/\./ /g’)
echo “[*] A new episode of $ShowName is ready for your enjoyment: $File” > /tmp/emailmessage.txt && sleep 2
[ -d "$storageDir/$ShowName" ] || mkdir -v “$storageDir/$ShowName”
mv -v $myFile “$storageDir/$ShowName/$File”
ln -s “$storageDir/$ShowName/$File” “/storage/Unwatched/$myFile”
wget http://localhost:XXXXX/web/ushare.cgi?action=refresh -o /dev/null -P /dev/null
mumbles-send -g qu0x “`basename $0`” “`cat /tmp/emailmessage.txt`”
/usr/local/bin/prowl.pl -application=”`basename $0`” -event=”New Show!” -notification=”`cat /tmp/emailmessage.txt`” -priority=1 -apikey=NOTTODAY
/usr/local/bin/email.sh
else
echo “[+] $myFile does not match our TV shows, pushing it to /storage/Movies on lunchbox” > /tmp/emailmessage.txt
mv -v “$myFile” “/storage/Movies/$myFile”
/usr/local/bin/prowl.pl -application=”`basename $0`” -event=”New Movie!” -notification=”`cat /tmp/emailmessage.txt`” -priority=1 -apikey=NOTTODAY
/usr/local/bin/email.sh
fi
shopt -u nocasematch
done

fi

#########################################
## End avi matching portion of the script
#########################################

###########################################
## Begin mp3 matching portion of the script
###########################################

if [ -e *.mp3 ] || [ -e Music/*.mp3 ] || [ -e Music/*/*.mp3 ] ; then
mv */*.mp3 /home/jayholler/Dropbox
mv Music/*.mp3 /home/jayholler/Dropbox
mv Music/*/*.mp3 /home/jayholler/Dropbox
echo “Moved a new album of mp3s to your Dropbox folder!” > /tmp/emailmessage.txt
mumbles-send -g qu0x “`basename $0`” “`cat /tmp/emailmessage.txt`”
/usr/local/bin/prowl.pl -application=”`basename $0`” -event=”New mp3s!” -notification=”`cat /tmp/emailmessage.txt`” -priority=1 -apikey=NOTTODAY
f7f099
fi

#########################################
## End mp3 matching portion of the script
#########################################

###########################################
## Start mkv matching portion of the script
###########################################
if [ -e *.mkv ] ; then
### Transcode 720p H264 mkv files for the Apple TV

if [ -z "$1" ]; then
echo “Usage: `basename $0` filename”
exit 0
fi

# Wait while any other ffmpeg processes are running
while [ -n "$(ps -ef | egrep "ffmpeg|HandBrakeCLI" | grep -v grep)" ];
do
echo -e “\n[$(date +%b\ %d\ %Y:\ %H:%M:%S)]\nFound another instance of HandBrake or ffmpeg running, pausing 5 minutes…”
sleep 300
done

# Get the beginning time from the date cmd.
START=$(date +%D\ %T)

# Email us that the next process has begun
echo -e “About to start transcoding $1 at $START” > /tmp/emailmessage.txt
/usr/local/bin/email.sh

#HandBrakeCLI cmd
HandBrakeCLI -Z “QuickTime” -i “$1″ -o “$1.m4v”

# Get the ending time of the transcode process from the date cmd.
END=$(date +%D\ %T)

# Inform us with an email that transcoding is completed
echo “Transcoding of $1 was started on $START and completed on $END.” > /tmp/emailmessage.txt
/usr/local/bin/prowl.pl -application=”`basename $0`” -event=”Transcoding Complete” -notification=”`cat /tmp/emailmessage.txt`” -priority=1 -apikey=NOTTODAY

# Move the original mkv file to the backup at /mkvs
mv -v “$1″ /mkvs

# Chop off the .mkv from the file name
transcodedFile=`echo “$1.m4v” | sed -e ‘s/\.mkv//’`
mv “$1.m4v” “$transcodedFile”

# Determine the appropriate place to move the file and do so
/usr/local/bin/moveMp4s.sh “$transcodedFile”
fi

#########################################
## End mkv matching portion of the script
#########################################

exit 0

Follow

Get every new post delivered to your Inbox.