The Cashflow

In Stephen King's, The Langoliers, we are introduced to the creatures that consume the past, preventing us from ever returning to it. Merciless devourers, they relentlessly follow us all through time, ingesting history, insatiably pursuing us in an eternal chase.

As the story progresses, the main characters find themselves face to face with these gluttons, and they must do their best to outrun them; winning the race is their only hope.

As a micro-business owner I awake most days with the weight of an awareness on my shoulders; I must to attempt to evade my own kind of Langolier, the ravenous and unquenchable monster of Cashflow.

Each day I travel down the rough-shodden and mostly gravel road of business, always trying to get away from the beast.

From time to time I am able to find a bicycle to ride. Landing a new deal yields strength for pedaling, at least until the tires run flat or the chain snaps.

When the rusty wheels skitter to a halt I may take a moment to catch my breath and look behind me to appreciate the distance that I have put between me and the leviathan that pursues me.

Though while I may wait, he never stops.

Relentless in his pursuit, I jog ahead, legs burning from the journey, looking for another ride; I might even take a skateboard if I find it. Anything to keep moving, and stay ahead of him.

When I stand still, I can hear the churning of his teeth and the bones breaking in his mouth. I can feel his steps in the ground.

There are times he has been close. So close that I could smell the stench of debt on his breath. Close enough to see the blood dripping from his lips as he devours everyone in his path. I have been separated from those I cared about as we tried to outrun him together.

You can't fight the Cashflow. You can try to slow it down, or get ahead of it. You might find yourself, as I have, on the ground, the gravel ripping into your back while you throw everything you can find at it in an attempt to satiate it for just long enough to get back on your feet and get away. You might even manage to succeed, to get back up, hitch a much needed ride, and put a little distance between you and the savage.

If things go well for you, you may find yourself moving quickly down the road, putting so much distance between you and the monster that you can't see him anymore. You may find a ride that carries you for years.

But no matter how far ahead of that devourer you are, when you stand still and the wind is blowing gently from behind, you will still hear that churn, still remember that crunch, and still feel those steps. Your pulse will quicken, your muscles will tense, and you will be reminded: you can never stop, because if you do, he will find you.

Thwump

Thwump.

The first time you feel it your blood goes cold. The hair on the back of your neck might stand up. Your pulse almost certainly rises quickly, which does nothing to help.

You sit perfectly still. You're probably holding your breath, but you don't realize it. Like your rising pulse, this also does nothing to help.

You wait expectantly, but nothing happens.

You go back to what you were doing. Maybe you were working at your desk, or mending a garment, or working in the garage. As you work on the task at hand, the thwump fades away, and your current task regains your focus.

Then it happens again: Thwump.

Any hope you had that the first occurrence was a fluke, or perhaps just a figment of your imagination, is gone. That thwump truly happened; there can be no doubt about it. If the first thwump made your blood run cold, the second fills it with icebergs.

Those thwumps that you felt were right in the center of your chest, or maybe a little to the left. They were about as hard as someone flicking your sternum, but it came from the inside.

That thwump was your heart, and that thwump was not a normal heartbeat.

At this point you are almost certainly wondering if you're having a heart attack. You're not, but it's hard to imagine that one would feel any different.

You're probably breaking out in a sweat, and as frightened as you have ever been. If you're young, you're wondering how this could be happening to you at this age. In any case, as you sit at your desk you're wondering if this cubicle is going to be the last thing you'll ever see.

But, like the first one, the second thwump fades, and time passes. The third one follows at another random interval, maybe shortly after the second, perhaps not for several hours.

That first day, you'll probably only experience a few. If you haven't already gone to the emergency room by the evening of the first day, you'll probably sleep that night, though rather fitfully. The lack of sleep the next day does nothing to help the symptoms.

If you haven't made a cardiologist appointment (thwump) by the next morning, it won't be long before you do.

When you have your appointment with the cardiologist, you'll receive an EKG that says everything is normal. You'll wonder if the cardiologist understands what normal actually means.

Your cardiologist will ask you to explain your "symptoms", perhaps asking in such a way as to imply that you probably don't even have a heart in that chest anyway. You'll feel stupid, because when this first happened you were sure you're dying, but here you are a few days later an, honestly, you feel pretty okay.

You'll do a stress test, which involves running on a treadmill with a series of electrodes taped to your chest monitoring your heart while you run. It might even involve an ultrasound of your heart at the same time.

You'll wear a "halter pack", which is a heart monitor that you wear all day under your clothes, gathering data. You'll have a button to press every time you experience your "symptoms." You'll press the button several times, but those thwumps never seem to happen at quite the frequency they do when you aren't wearing the monitoring equipment.

A few days or weeks later, your cardiologist will come into the room with a smile to let you know that "everything is fine" and that it's "probably just PVCs.” She'll say just in that way that makes you pretty sure she's wondering why you're in this office in the first place.

"There's really nothing to worry about. They aren't harmful. Cut back on caffeine, alcohol, and stress. Get more sleep and exercise."

You have three kids and thwump your own business, and now your heart seems to need to remind you randomly that it's still in your chest, though frankly, it'd rather be doing something else. Stress? What stress?

Oh the way home you're wondering how you're going to adj-thwump-just.

For the next few days you'll probably find yourself sitting in your chair for a long while, just waiting for that next thwump to kick you in the chest.

Eventually you really do adjust. When you survive enough thwumps without any obvious side effects, you start to believe your cardiologist. You Google PVC too much, read too many articles, but start to realize that you probably will survive this thwump just fine.

Hopefully, you find some ways to cut back on stress and increase sleep and exercise. Prayer, meditation, and relaxation techniques are actually very helpful in this regard.

While you might be able to adjust to these irregular heartbeats, it's impossible to get used to the feeling of your heart kicking you in the chest when you least expect it.

If you're able to make some lifestyle changes, you can go weeks or months without experiencing that kick. You might even start to forget that it can happen.

Then, one day, when you're making your coffee in the morning, you'll be reminded of your mortality in the way know one else around you will know.

Thwump.


While taken from my own experiences, people with PVCs can experience a wide array of symptoms, and for some people the condition can be debilitating. Thankfully that has not been the case for me up to this point.

I have found that there are 2 main contributors to my PVCs: lack of sleep, and anxiety, the latter of which is often amplified by the former.

Getting regular sleep has taken on a new priority for me, which has meant giving up on certain things I'd rather do to ensure that I don't miss out on a good night's rest whenever possible.

Dealing with stress and anxiety is a large enough topic that it deserves its own post, but I can summarize my approach by saying that I now take specific steps to try to get ahead of anxiety rather than waiting for symptoms to crop up and force my hand.

If you suffer with PVCs and feel the isolation that can come along with that, I hope you'll find someone to talk to. If you don't have anyone in your life you can confide in, I'd be happy to talk.

Dallas 18B20 Temp Sensors on an RPi2

I've have a handful of Raspberry Pis around, and several of them have Dallas 18B20 temperature sensors connected for data collection. Up to this point I've used all of them in 3-wire mode (Vcc, Data, Ground).

I just recieved my first Raspberry Pi 2 yesterday, and went to connect it to a network of 4 sensors to replace an Arduino I was previously using.

I ran into a few snags. Here are my notes:

1. Device Tree vs Modprobe

The old way to get this all working was to setup the modules to load, either after boot via sudo modprobe w1-gpio etc, or setting those up to load on boot.

The new way to do this is via Device Tree. You can read all about the changes here. The changes are myriad, as are the reasons behind them.

In any case, to get things working I added this to my /boot/config.txt:

dtoverlay=w1-gpio,gpiopin=17,pullup=on

2. Using parasitic mode without an external pull-up resistor just didn't work.

In 3-wire mode I've never needed to use an external pull-up resistor to get things to work on the RPi. That wasn't the case with the parasitic mode. I had to use a 4.7k pull-up.

3. The built-in kernel driver only supports loading the 1-wire bus on a single pin at a time.

I had 4 sensors, and I had hoped to run 4 separate networks. My experience has been that more networks is typically more reliable than many sensors on a single network.

At this time, that isn't possible without compiling your own kernel. I had to wire all 4 of my sensors together into a single star-network. Thankfully, the sensors have proven to be reliably pinged so far.

4. A few references that were helpful for me.

https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=65137

https://www.kernel.org/doc/Documentation/w1/w1.generic

https://superpiboy.files.wordpress.com/2014/07/raspberry-pi-rev2-gpio-pinout.jpg

https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97314

https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=98407

https://github.com/raspberrypi/firmware/issues/348

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=97216&sid=4a4e0a6dcf11c1dbdf8c60552f75f11d&start=50

https://github.com/raspberrypi/firmware/issues/338#issuecomment-71920412

http://wiringpi.com/

Apple Watch, Two Weeks In

It's been 2 weeks since my 42mm Apple Watch Sport arrived. (So much for not "getting one immediately", I know). So far the experience has been mostly great.

At this point I'm dividing my thoughts into three categories: Frustrations, Delights, and Hopes.

Frustrations

  • I had to do a full un-pair then
  • re-pair of the watch (which is basically a restore from scratch), 2 times in the first week. I think this was at least in part due to some weird bug in one of the apps I was attempting to write for the watch, since the symptoms disappeared with I disabled some "clever" code I was using.
  • Related to the need to restore, there have been a few times where some very obviously 1.0 bugs showed their heads. For example, sometimes the time doesn't show when you raise your arm, or shows only for a half second or so before disappearing.
  • I went on a 1-hour walk, using the workout app, and got no credit for it in the activity app.
  • If I wearing the watch loosly and doing something else, like the dishes, or working outside, it's possible to miss the taps; they aren't as strong as I would have expected in some cases.
  • The app icons are just too hard to tap.
  • Too much functionality is hidden behind Force Taps. I find myself force tapping everything, just to see if there's a hidden feature.
  • Glances are basically useless because they don't update in the background. So you go to glance at a glance and instead you have to have an awkward and lingering stare while it tries to update itself.
  • My two favorites watch faces so far, Solar and Motion, don't allow any complications to be added.
  • Siri doesn't auto-send a dictated response, you still have to tap to "Send" on the screen. It would be really nice if there was a sort of cancelable count-down timer on the send button, so you could see that Siri got the text correct, then just drop your wrist and let it send in the background.
  • Having the side button open your favorite contacts seems like a complete waste. I'd much prefer it launch a favorite app or glance.
  • Sometimes opening an app is just slooooooow.
  • "Hey Siri" doesn't always work (doesn't bring up Siri). Which is made even more frustrating because when it does work, the speech recognition is excellent.

Delights

  • The faces are much nicer than I expected. The demos really did not do them justice.
  • I love being able to change the face from day to day or hour to hour.
  • I love the activity tracking. It's actually affecting my behavior, getting me to be a bit more active. Hopefully that sticks.
  • The heart rate and workout tracking has been great. I love the data that it's collecting (I'm kind of a data nerd, to say the least).
  • The battery lasts way more than a day. I go to bed with about 40% charge remaining every day.
  • It not too small, not too big.
  • The bands are very nice. I'm still looking forward to more 3rd party options, but the mechanism for changing them is fantastic, and the ones Apple has made are very nice.
  • Opening your garage door from your wrist is just fun.
  • Seeing who's at your front door on your wrist is also just fun.
  • Dictation on the watch is very, very good.
  • "Hey Siri, Set a timer for 20 minutes" when your hands are full is very convenient.
  • Not wondering if I missed a notification, since I can glance at my wrist and see that there isn't a red dot. This has led me to leave my phone in my pocket or on the table much more than I expected.
  • Being able to respond to an iMessage while driving, without having to take hands off the wheel, is great.
  • The taps on the wrist when navigation is running are Just Right.
  • Sports scores updates on your write with a glance is great.
  • "Hey Siri, Add milk to my Grocery List"

Hopes

  • Increased stability. It really isn't bad, but there are enough rough edges that I'm looking forward to versions 2, 3, 4...
  • Customization of the side button functionality.
  • More watch faces, please.
  • More customization of watch faces.
  • 3rd party app complications.
  • Auto-updating glances in the background.
  • Native or Native-esque apps. No more spinning dots please.
  • I hope my favorite Grocery List app, AnyList, gets an app on the watch.
  • Oddly enough, I kinda wish it had an LED you could use as a flashlight.
  • I hope to be able to set the watch face to use 24 hour time (maybe this is possible and I've missed it so far).
  • I hope that nice 3rd party bands become available soon.

Glide

Glide is really interesting. The basic idea is that you fill a dropbox folder full of content, and the service generates a beautiful app for you from the content. The elevator pitch is "Hypercard for iOS".

I'm not sure if Glide will be successful, but I have no doubt that at some point something is going to be developed that allows just about anyone to create a basic mobile app that looks good and Just Works.

Something like Wordpress for mobile.

It's also clear that the low-end of the custom App Consulting market, which has been dwindling for years through consolidation and evaporation of profit, will finally be dead.

(Of course, when the custom App Consulting market dies, a new market for building all these one-off Wordpress-ish apps will spout up).

Communicating With Apple Watch

I was listening to the lastest episode of the Talk Show with guest Joanna Stern about the Apple Watch. During one section they started talking about tap as a means of communication, and the impact this might or might not have. As John wrote in his review of the watch, it's not that hard to imagine at least a few scenarios where, for example, sharing a heartbeat would be novel, intimate, and gain even widespread use.

Having thought about this more, I do wonder if perhaps the ability to effectively touch someone from afar will turn out to be a big deal. I think it will.

You can imagine that a native SDK app might even be able to take input from one person and send that to another, enabling a morse-code method of communicating, for example.

There's a lot more to consider here, but it seems like it's a bigger deal than I thought it might be at first.

It also makes me wonder just how much more intrusive it will feel to be tapped by some spammy notification in an app.

On Apple Watch

Up to this point I haven't been sold (personally) on Apple Watch. The main drawbacks as I saw them were:

  1. Price. And it's a recurring price since you know you'll have to upgrade every year.
  2. Size. I have small wrists and I don't like large watches. I don't even always wear a watch. I don't want to wear a huge piece of jewelry on my wrist.
  3. Battery. I don't want to charge something every night, especially when it would otherwise have utility (sleep tracking).
  4. Utility. What in the world is the Apple Watch (or any smart watch) going to do for me that I care about?

However, having listened to quite a few podcasts on the topic and read even more posts, I'm convinced now that (at least at some point) I'm going to want one.

  1. I'll get over the price. And if the main SDK components remain the same then there isn't that much computation being done on the watch itself. The year-over-year upgrade may not turn out to be so compelling. And if your band can last more than 2 years, you'd only have to upgrade the watch, not the band.
  2. I'll get over the size. Everyone will have one. It won't be so weird.
  3. I'll get over the battery. Because there will be so much utility. Which leads me to...
  4. Utility. I'm now convinced of enough positive use cases that I think it would really be a helpful device.

A few use cases for Apple Watch:

  • When there's motion on my front porch my wrist can tap and I can see a picture from my porch camera to see who/what is there. Same with other household security notifications.

  • When I get home I can open the garage door via the app I wrote to control my garage door remotely. Why would you want to do this? Because your watch knows that you are you, and theives like to steal garage door openers and use them to get into your stuff. It'd be safer to not even carry one.

  • When driving and I get a text message I can easily glance at my wrist, see that it's something I care about (or not), and respond via Siri, without having to find my phone and get it out.

  • My wife can find her phone in the house when she loses it.

  • Easier interface to Siri.

Since my watch can know that it's me, and therefore verify that I am, in fact, me, then it can be a presence notifier on my behalf. This leads to some pretty great conclusions:

  • My car can unlock the doors as I walk up, and let me start the car without another key. And I don't need a massive fob in my pocket to let me do this.

  • Same with my front door (though I'm unsure I'd ever opt for a lock like this).

  • Turning off the lights when we leave the house and otherwise left them on.

  • Allowing me to verify myself as other services support such features. Things like Apple Pay are already there, but other sorts of checkin, registration, and verification could all be linked as well.

I'm not currently planning on getting one immediately, but I think I am far more likely to purchase one than I was a few months ago.

The History of English Podcast

I was recently made aware of the great History of English Podcast.

The author, Kevin Stroud, while not a professional linguist, is a wonderful story teller. Each episode covers a combination of the etymologies of English as well as the history, that is the people, who have spoken this language in its various forms from it's roots thousands of years ago.

I'm still playing catchup, but even after less than 10 episodes in I'm finding that it has firmly drawn my attention to words, explaining how various words came into English, and why even words with similar meanings sounds so different from one another, i.e. why horse as well as equine.

If you have any interest in history and even a passing curiosity about the English language I would highly recommend that you check it out.

Handling Motion JPEG Streams on iOS

I have several Foscam Cameras around the outside of my house. They're very easy to setup, tolerate the outdoor conditions admirably, and are incredibly affordable for what they offer.

As with everything else around my house, I like to build software that customizes my view into my home (or in this case, outside my home). To that end I've build an app I call Argos that lets me monitor all sorts of sensors on my property.

Once I installed the first set of cameras I wanted to be able to implement some views that would display the current video stream from each camera. After looking into the documentation I discovered that the cameras I have offer two types of video streams: windows streaming video (asf) and motion JPEG.

I don't have a lot of experience writing software to handle video streams. But as I read the basic description it seemed that a motion JPEG stream is just an http stream that continually pushes out a series of jpeg images.

Oh, well that's easy. Right?

Well, not so fast.

What Is Motion JPEG?

It also turns out that there is no such thing as a true motion jpeg standard. However, there are two typical implementations, Motion JPEG-A and Motion JPEG-B. Motion JPEG-A supports the concept of markers, while Motion JPEG-B does not. This difference is important. For the rest of this discussion however all we need to know is that the Foscam camera stream is Motion JPEG-A.

A Motion JPEG-A stream looks (to me) a lot like a multipart email message. There are several sections, each separated by a long string of semi-random characters. Within each section is some encoded (or not) binary data that represents the object in that section. In our case, each section is a JPEG image.

We can see what this looks like by using the curl command:

{% highlight ruby %} › curl -D - "http://192.168.300.301/videostream.cgi?user=admin&pwd=SECRETS" HTTP/1.1 200 OK Server: Netwave IP Camera Date: Wed, 02 Jul 2014 22:28:03 GMT Accept-Ranges: bytes Connection: close Content-Type: multipart/x-mixed-replace;boundary=ipcamera

--ipcamera Content-Type: image/jpeg Content-Length: 43996

????JFIF???!???

[a lot of binary data]

--ipcamera Content-Type: image/jpeg Content-Length: 44176

????JFIF???!???

[a lot more binary data] {% endhighlight %}

It just goes on and on like this.

We can see in the header of the response that the boundary text will be ipcamera, and the two lines following each boundary include the content type and the content length.

So How Do We Parse This?

This is the basic approach to parsing a data stream like this:

  1. Read in the first chunk of data
  2. Does the chunk contain a boundary marker?
  3. If so, is that boundary marker the first boundary marker?
  4. If it is the first one, then skip it.
  5. Is there another marker? If so, then we have a complete image.
  6. If we have a complete image, find the start and end of the image, remove those from our buffer, and process the image.
  7. If we do not yet have a complete image, append the data to the buffer, and wait for the next chunk of data.

The key here is that we never know how many chunks it will take to make one image. In an ideal world we'd just get one chunk per image and we could throw that right into an NSData object and convert it to a UIImage.

Here's the code I have so far for parsing the Motion JPEG stream:

The heart of the code is in func URLSession(session: NSURLSession!, dataTask: NSURLSessionDataTask!, didReceiveData: NSData!). That's where we attempt to see if we've hit the end of an image, and if so, extract it from the buffer.

Bugs

So far the code works fairly well, except that from time to time when I attempt to make a UIImage out of this I get a failure. I'm not sure if my data out of my camera is bad (unlikely) or if I'm just messing up the process of extracting the data (much more likely).

Improvements

What I'm currently not doing, but probabaly should be doing, is using the Content-Length header to verify the length of the image data before passing it off. I do wonder if that wouldn't be a far more reliable way to extract the data from the buffer.

Future

Beyond cleaning up the code a bit and trying to make it more reliable, I would love for this view to include some other nice features down the road, like the gesture recognizers to allow me to implement panning/tilt via gesture. Several apps dedicated to IP Camera viewing do this, and it wouldn't be very difficult at all to get it right.

Build Your Own High Top Tables

We recently hosted a backyard party, and we wanted some high top tables for people to be able to mingle around. We looked around online but nothing was as simple as we wanted (we were going to cover them with table clothes so they didn't need to be fancy), and the ones we were able to find at all were pricier than we wanted. So, we did what you do when you want something to exactly match your vision: we built them.

The Materials

  1. Three 1"x4" boards, cut to 40" in length.
  2. Three 3" hinges, with hardware.
  3. One raw round table top, 24" diameter. I found these at Lowes.

The total cost of materials ended up being about $35 per table. The table top was by far the priciest piece, at about $18 each.

The Build

  1. Cut your boards to length (40"), if you haven't already.
  2. Use a square or protractor and mark the exact center of the underside of your table top.
  3. Position your hinges in a triangle around the center mark, with about 1/8" space between the hinges. See the picture below for an example.
  4. Mark the holes on the table top for the hinges with a pencil or pen.
  5. Remove the hinges and drill pilot holes for your screws. Here's a guide for choosing the right size pilot hole. If you skip this step, you will likely crack your table top.
  6. For each board, lay a hinge on the end, making sure that you have the orientation correct. Compare with the photos below if you're unsure.
  7. Mark the holes on the boards for the hinge with a pencil or pen.
  8. Remove the hinges and drill pilot holes for your screws. Here's a guide for choosing the right size pilot hole. If you skip this step, you will likely crack your table leg.
  9. Get out your screws and attach the hinges to the boards first, screwing them down snug but not so tight that you crack the wood or strip the hole. Be sure you have the hinge oriented properly (when attatched to the table top the hinges should swing away from the table freely, see the photos below to compare).
  10. One by one, screw the hinges to the table top, again double checking your orientation. You may need an extra hand to hold up the legs as you finish if you dont have enough space to lay out the legs flat.
  11. Now gather the legs carefully together and flip the table over so that it is upright. Spread out the legs so that they are even with the edge of the table top. Adjust the legs a bit as necessary to create a level table top. You're done! [^1]

The Result

  • The Final Product
  • Top Down View
  • Underside Of The Table
  • The Table Leg

[^1]: We left ours unfinished, but if you plan to use them without tableclothes or leave them outside you should paint or stain them. Also, if you plan to use them on a very smooth surface, you'll need to find some rubber feet or build a strap to prevent the legs from slipping out.

Inexpensive Live Streaming For Your Church

Note: This article is from early 2012 and most of the information is now outdated. For an up-to-date look at this issue checkout the updated article I wrote for Sermons.io.

Last winter (2010-2011), from January through March, our church attendance was down nearly 30%. Between a few vacations and an intense RSV and Flu season the congregation was knocked down pretty hard. Knocked down and out (of the service), but not completely out of participation thanks to our live stream.

We've been livestreaming video of our service since we started 2.5 years ago. When we planted, I couldn't find any helpful information about livestreaming that wasn't aimed at large churches with much larger budgets than we were working with. Looking around recently for some equipment I still couldn't find a good reference. So, here's a bit of a history of what we've done at Grace Church. Hopefully it can be of help!

Getting Started

Diving into livestreaming isn't free, but even the smallest of churches (we started with 30 people) can participate.

To get started you'll need someone dedicated to the task of acquiring equipment, learning how it all works together, and training others to help out.

Equipment

At a minimum you'll need a computer, a camera, possibly a video adapter, an audio feed from your soundboard, an internet connection, and an account with a video streaming service.

Computer

To stream your service you're going to need a computer. The computer takes the video from the camera and encodes it into a format ready for streaming via the streaming service. To be able to encode video at the quality you probably want, you'll need a relatively powerful computer. Look for something with at least an Intel Core 2 Duo processor. If you're already using a computer for projecting words for songs, you might be able to use that computer to do double duty.

We're a portable church, and we use mostly Apple equipment, so we're using a 15" Macbook Pro. Our pastor uses it as his computer during the week.

If you're going to use a firewire video converter like the one below you'll need a computer with a Firewire 400 or 800 input.

Cost: $0 (If the computer you own will work, or you can borrow one) - $1199

Video Camera

When we got started we just used a cheap Logitech webcam as our video camera. The quality was low. You could barely see the stage. But it worked! It was better than nothing for the family stuck at home with sick kids.

Today you can buy a Canon Vixia Camcorder for under $300. If you're going to convert your video for uploading later (to a service like vimeo) then you'll want to get an HD camcorder.

The only requirement of your camcorder is that it has live composite or S-Video output. What this means is that the camera will output a low-def video feed at the same time that it is recording.

If you really have no plans to record your video on the camera, you can ditch the live-output requirement, and maybe even pick up an older still camera with video output.

Also keep in mind that if your camera is going to be in the back of a room you'll want a high optical zoom (10x+). You do not care at all about the term "digital zoom". "Digital Zoom" is a hoax. You only care about optical zoom.

Cost: $79-$400+

While you're at it don't forget to get a big memory card so you don't have to deal with running out of space. 64GB SD Cards are getting cheaper every day.

Video Adapter

If you aren't using a basic webcam, then you'll need a way to get the video stream from the camera to the computer. This is where the video adapter comes in. If you have a computer with a firewire port of some kind, then go buy one of these.

Updated: If you have USB3 on the computer, then one of these encoders from black magic would make a great solution. Here's a thunderbolt version if that's what you have to work with.

Cost: $150+

Internet Connection

To stream live you'll need an internet connection. For the best quality you'll need something with at least a 1 Megabit Per Second upload speed. You can get away with a bit slower if you lower the quailty of the video you're uploading.

Being a portable church, we don't have any internet available to us in our building. We're now using a Verizon Jetpack.

Cost: $0 (You already have it)-$60/month

Streaming Service Account

Don't bother looking around. Just go to livestream.com and sign up now. It's free ($350/m if you don't want ads to appear in your stream) and it Just Works. They have native software for both Windows and Mac.

Download the free Procaster software.

Cost: Free

Audio Feed

The last thing you'll need is an audio feed from your soundboard. Talk to your sound operator about what you'll need to get a feed to your computer. Usually you'll just need a simple audio cable and maybe an adapter.

If you don't have a sound board then you'll need somekind of mic setup to get the feed for your stream.

If you're really stuck you could try just pulling in the ambient room audio from a microphone at the computer. This might get you by, but you'll be dealing with some pretty bad audio, and you'll pick up voices of anyone whispering nearby (potentially embarrassing!)

Putting It All Together

So you've spend somewhere between $79 and $3000 getting the equipment you need to be able to livestream your service. What now?

  1. Take the video (and maybe audio depending on how you want to set things up) out of your video camera and feed it into your video converter (and thus into your computer).

  2. Take the audio feed and either feed it into the camcorder (if you're going to record live on the camera) or into the computer doing the streaming.

  3. Fireup the Livestream Procaster software and login to your account. Configure any settings under the preference tabs, then click "Go Live"! You're streaming!

Upgrades

At Grace Church, in the time since we started streaming, we've upgraded equipment and updated workflow, but the basics are all the same, and we still don't have a huge budget.

We upgraded our camera from a webcam to a camcorder + video adapter. We upgraded our tripod recently.

Here are some other options available to you as you upgrade your setup:

  • Get A Better camera
  • Get Multiple cameras
  • Remove the ads from your streaming service
  • Embed the livestream on your website
  • Use the high+mobile quality streaming to give everyone a chance to view your stream wherever they are
  • Promote your stream on Twitter and Facebook

Keep Streaming

This isn't the post for it, but there are a lot of great reasons to keep streaming your services for your congregation. From the sick or elderly to the mothers' cry room, there are members of your church that can't otherwise participate in your Sunday Service. A livestream helps keep them connected and ultimately builds the church. So keep on streaming.

New: All-In-One Solution

If you are looking for a true all-in-one solution, you should checkout the $500 Livestream Broadcaster. You'll still need an internet connection (until Summer of 2013 when the LTE version comes out) to get out of the building, but if you're starting from scratch this may greatly simplify things for you.

Questions?

If you have any questions about live streaming feel free to ping me on twitter.

How My Wallet Destroyed 4 Hard Drives

(And how yours could too)

Hard disk drives are a marvel of modern technology. With the ability to store the data of millions of books on a single hard drive, we’ve never been able to store more data at a lower price than we are now, and storage capacity is only going up while prices are only going down.

Even more amazing is the sheer complexity at work in a modern drive. The electrical, chemical, mechanical, computer, and magnetic engineering that must take place to develop a drive boggles the mind. A hard disk drive is truly a monument to modern technological achievement, and at only a couple hundred dollars a piece, most people have at least a handful in the various electrical devices around the house. From the TiVo to the family laptop to a camcorder to an iPod, hard drives are in more and more of devices we own.

With access to such cheap and powerful storage, it’s easy to overlook the fragility of modern disk storage — a lesson I learned the hard way.

In April of 2007 I received my first MacBook Pro from Apple. I was upgrading from a Powerbook G4 I had owned for 2 years, which had served me with only a couple of part failures (a bad battery and a hard drive that failed after a year). I took the new laptop home and started copying my data over. After two days I had it all setup. It was working wonderfully.

The Story

About 7 days after I brought it home I was checking my email with the computer on my lap when I heard a loud PING! cry out from behind the case. It certainly didn’t sound like a good noise, and the grinding that followed was even worse. My programs started to lock up and my computer would not restart. Dejected, I took the laptop to the Apple store, where a new hard drive was installed. Two days later I took the laptop back home and spent days reinstalling software. I was partially surprised that there was a failure so soon in the life of the laptop, but hard drives do die, and some die quickly.

Back up and running things were going well until 4 days later when it happened again. I was opening up the laptop when PING! went the computer. The repair kept me computerless for 5 days.

With the second failure I was skeptical that this computer would ever work right, and my doubts were validated when the THIRD drive failed after only another 10 days. Same as the first two, pinging, clicking, and grinding signaled the death of my laptop.

This time the technicians at the Apple store heard my cries and replaced the unit. I walked home with a brand new sealed in box laptop, glad that my hard drive problems were over.

At least for 5 days anyway.

That’s when it happened for the FOURTH time, on a completely new computer. I was surfing the web on a Saturday when I heard the ping of death. My heart stopped and I wondered if I was cursed.

When I took the laptop in they interrogated me for a while and eventually I left with a third brand new laptop (thank you Apple). As I was walking out of the store one of the questions a tech asked me rang again in my mind: ‘Did you expose the laptop to any strange magnetic fields?’ Of course my answer was ‘No.’ I couldn’t think of one. But then as I was leaving it occurred to me that my money clip wallet, which sits in my front pocket, does have a magnet. ‘But surely the laptop is shielded enough that couldn’t matter, could it?’ I wondered.

As I pondered more and more it seemed plausible. Every failure followed a session using the notebook on my lap. And as I read up on hard drive operation it seemed evident that if you could get a magnetic field to reach into the drive, you could definitely destroy it.

That’s when I realized that we had to do an experiment. What we discovered is terrifying: modern hard drives are much more fragile than we often consider, and exposure to even weak magnetic fields from close range could render a working drive absolutely useless.

The Experiment

While it was suggested to me to purchase a notebook hard drive, expose it to a magnetic field, and see if we could break it, then return it to the store of purchase, I thought that a bit risky, unethical, and potentially pricey. Instead, I opted to do some simple testing under the premise that if we can get a magnetic field into the drive operating area, then we can conclude that it is plausible that said magnetic field could ruin the drive. In other words, if the magnet can affect the drive at all, consider the drive dead.

Enter my old Hitachi 2.5′ notebook drive. It failed after one year of service, and I opened it up to see how it looked inside. Since the drive was already dead, it seemed like the best test subject.

Here is the plan:
1. Place iron filings onto disk surface.
2. Expose disk to magnets from varying distances.
3. Look for fluctuations in filings when exposed to fields.

First, we get some filings (filed from a piece of steel lying around) and dump them onto the drive. Now, we get out the money clip. First we’ll test with the magnet that I think might have killed my computers, then we’ll test with other sources if that yields no results.

The first test is startling. Not only does the field easily penetrate the bottom of the drive, it’s incredibly strong at the point of the top of the platter.

Moving the magnet away continues to yield disturbing results. We were able to make the pieces dance from a range of upwards of 5cm away!

And lest anyone ask, the top of the case has no obvious shielding properties.

Test Video

So What?

In plain english, any moderate magnetic field, from a speaker to a fridge magnet, could potentially disrupt the magnetic field of a hard drive, rendering it unreadable. Keeping all magnets of any kind far away from drives is vital.

The Conclusion

Hard disk drives are remarkable pieces of electronics. They incorporate a variety of technologies to store the valuable information that we create each day. But for all their amazing qualities, we find them to be startlingly fragile. If ever you were looking for evidence to reinforce the need to spread data around as you back it up, look no further than the above.

As for my laptops, most likely the money clip’s magnet interfered with the operation of my hard drives (all four of them), causing the destructive effects that I witnessed. While perhaps not perfectly confirmed, this myth is definitely plausible.

Appendix: Obvious Questions

Since undoubtedly someone will ask these questions, or argue that this test is unreasonable, here are my thoughts on the most likely rebuttals.

1. You didn’t prove the drive would actually die. You just moved metal filings.

True. But if a magnetic field can get into the platter region it can interfere with the fields already in place, and since both movement and data storage/retrieval rely on magnetic actuation, it is perfectly reasonable to conclude that the drive would be damaged in some way.

2. You didn’t take the laptop case into account.

Also true. However, in the case of my powerbook, the aluminum case provides little to zero effective shielding. The hard drive is located on the bottom of the case, in the front left corner. The effective distance in a real world scenario would be approximately 1cm. We were able to move filings at least 5cm away from the magnet.

3. Not all laptops have the drive in a similar location.

Also true. And that does matter. Had the drives been on the other side of the case they probably never would have been affected by the magnet in my pocket. But since the magnet could easily penetrate an entire plastic case from bottom to top, no modern unshielded laptop seems secure.

Additional Information

Flickr Photo Set
The Flickr set with all the photos taken for the experiment.