The Blog

Main menu

Post navigation

I’m playing with the new Apple TV SDK. I’ve created a simple TVML “app” and server component, to allow viewers to watch the fifty most recent government programs from my hometown, Douglas, MA.

If you’re curious: Install the Xcode 7.1 beta. Download the TVMLCatalog sample project from Apple. Open the AppDelegate.swift file. Change the line:

static let TVBaseURL = “http://localhost:9001/”

to

static let TVBaseURL = “http://www.douglasma.org/tvml/”

And run. You should see something like this:

Videos play as you’d expect. Be prepared: We compress the heck out of these videos, so they’ll look crummy compared to anything you’ll usually see. 320×240 at a glorious 400Kbps. A story for another day.

I can’t promise that URL will always be there or won’t change, although I’m guessing I’ll keep the URL the same as I improve the presentation.

Turns out my last writing here was September 19, 2010, five years ago today.

I’ve moved servers since my last post. Along the way I lost whatever design template I was using. I should fix that. I’m sure my About page is out of date. Broken links may be prevalent. I’d like to get back into this blogging thing. You know, get with the ’90’s. Kudos to MarsEdit for not laughing at me when asked to create a new post.

For this exciting anniversary I’ve re-read much of what I’d written previously. I wrote more than I remember. Curious.

iPhone OS 4, Flash, Adobe, and the game to play (April 9, 2010), where I babble about what Adobe should do with Flash. Curious what has changed here. It hasn’t died fast enough. Flash has a working “Export to iOS app” tool, and Apple allows it. I haven’t launched the Flash developer app in years. I block it every chance I get. In many ways I do think Adobe “gets it” and knows HTML5 is the future of the web, not Flash. What I see from them in that area looks good.

iPad – is it April 3rd yet? (March 12, 2010). The iPad was the craziest-selling new product category ever, but has slowed. I don’t use mine as much as I used to, although when I do I love it. Hmmm.

Lame WWDC Survival Guide, 2009 (June 1, 2009). I still have the same thinking, broadly-speaking. I do network more than then. Two of my three “suggestions” have been implemented. WWDC videos are now available super-fast, and they’ve not only created a developer forum but they’ve rebooted it this year. I’m also pleased to report Moscone “Pizza” is no longer served.

MacWorld Expo: The Mac Mini I Want (January 2, 2009). Wow, I’d forgotten how many Macworld Expo’s I’d been to. 24 as of 2009. The Mini got a lot better in 2010, but always kept the silly laptop hard drive until SSD came along. The latest Mini is a step back in some ways. I use a mid-2011 Mini as our home server, still running well. And you’re reading this on a similar Mini hosted at MacMiniColo.

Apple TV, what it could be (December 30, 2008). Hah. I could write this one again today. This was in the era of the x86/OS X-based Apple TV. The iOS-based model is a much better idea, so many of my ideas there are bunk in retrospect. But an SDK? Yeah, I want that more than ever. [Update: I wrote this draft two months ago, but the new Apple TV and tvOS were just announced!!!]

iPhone SDK, NDA, and October 17 (September 25, 2008). Another dumb idea, but I’m super happy the whole NDA thing is basically a non-issue now. (I guess you can’t post videos of pre-release stuff, but talking about it is most of the battle.)

Must eat memory (June 29, 2008). Yep, the next 17” MBP supported 8GB and it was my main machine for years. 16GB is tops in Mac laptops now. SSD’s make swap space far more bearable.

iPhone 3G Upgrade? – The App Store Question (June 16, 2008). As foretold there, I skipped the 3G entirely. But I remember my first day with the 3GS thinking “Wow, that really is faster than EDGE!” (But 3G, and later LTE, took quite a while to arrive in my area.)

A while back I had the need to hack Compressor’s preset files to output a quality worse than Apple wanted to provide. Today I saw a tweet looking for this sort of info. Given I now knew I wasn’t the only person on the planet seeking this information I figure I’d jot it down here.

First, some background… I do much of the technical configuration for my town’s Public Access cable TV studio. We have a strong open government initiative which includes videotaping, broadcasting, and web-archiving essentially all public government meetings. If you’re curious or bored, you can see the results here. With rare exception, these videos are quite static; talking heads with occasional camera switching. These programs are long, and we intend to archive them forever. As of this writing we have exactly 700 meeting videos in the archive for just over 1032 hours since we began the project four years ago. The average meeting is just shy of 90 minutes; some exceed three hours. We don’t need Hollywood quality, and we want to store as much as possible without encountering a massive storage (or bandwidth) bill.

After much testing I decided on a H.264 video at 200Kbps, with monaural audio at 32Kbps. That’s laughably poor for most uses, but perfect for us. One of the great tools Apple provides with Final Cut Studio is Compressor, a batch video (and audio) converter with network cluster capabilities. Apple includes some useful presets. Included is a preset for iPod/iPhone video at 1500Kbps:

Note the Bit Rate slider; a range from 1000 to 1500Kbps. While you can indeed enter a number to the right of the slider, it only accepts values within the slider’s range. I wanted one-fifth the rate of the lowest (worst) rate Apple thought anyone would ever want. If you’re wondering, 1500K is the maximum video rate usable on the original iPhone. So the upper-end makes a little sense, at least at date of publication. By the way, all this info is current as of Compressor 3.5.2, part of Final Cut Studio as of September 2010.

There are also many other presets, but most have some unique features. I figured this out nearly four years ago so I’ve forgotten why I didn’t use one of the MPEG-4 presets which does allow for a wider range. But there was something about them that didn’t meet our needs that I could only do here. ? I’ll focus on video bitrate from here forward; audio isn’t as critical to file size, and can be handled similarly.

So the goal is obvious; create a version of this preset that does what we want – lousy, blocky, but really low data rate video.

Compressor preset files are XML files located in ~/Library/Application Support/Compressor/. Presets are nicely organized there by settings group, and have filenames corresponding to the setting’s Name field. All handy stuff.

First, duplicate the Apple settings file that most closely matches what you need. Place it into a settings group if you’d like; helps keep them organized. Customize as best you can. Give it a nice name. Now quit compressor. Find your almost-perfect settings file in your text editor of choice, such as TextWrangler. In all its glory is some XML that looks a little like this (I have Soft Wrap Text on):

The file above is the same default settings file I show above (1500K iPod/iPhone). In the above screen capture, I have the <data-rate> item highlighted. This is the second <data-rate> item in the file; the first is within <audio-encode … >; we want the one in <video-encode … >. So a data rate of 187500 means 1500Kbps. Why? I don’t know, but it doesn’t matter. There’s a 12.5:1 ratio of what Compressor wants here to what us mere mortals know as Kbps. I wanted 200K, so I replaced the 187500 with 2500.

Save the preset, then save an extra copy somewhere safe; I’ve seen Compressor “fix” the value on occasion. I zip the file and store the zip in a project folder far outside the hands of Compressor.

Launch Compressor, and use the preset just like any other. Wait a short while, and sure enough, crummy video! Hooray!

I once asked an Apple engineer about this at WWDC. Basically, why don’t they let us more easily get crummy low-bitrate video? He looked at me like I had two heads.

As an aside – for reasons much more related to our internal workflow than Compressor, we ended up using MPEG Streamclip to create most of our QuickTime files. Long story for another day. Files are streamed with Darwin Streaming Server (the open source version of QuickTime Streaming Server). Devices not compatible with QTSS (such as the iPhone) are directly fed the same files over HTTP. I long for the day when I can use QuickTime X’s HTTP Live Streaming; it’s a truly clever mix of QTSS’s random access with HTTP’s standardization. Too few systems in the wild support it thus far.

In case you’re wondering, our online video archive is currently 110GB. Not bad for more than 1000 hours!

The article argues that Apple won’t bring the iPhone to Verizon, essentially because they benefit too much from the streamlined manufacturing of one single 3G/3GS/4 model for the entire world. I disagree and wrote a comment stating as much. Since nobody reads comments, I thought I’d post here too.

I disagree for these reasons:

1: There’s enough market opportunity to make an iPhone on CMDA, even if only sold in one country and only for 2-3 years (until LTE is common). Every other phone manufacturer does it, and for good reason. Even if Apple only sold an additive 1M CMDA units per year, that’s $400M-$600M revenue, more than enough to compensate for additional R&D. 1M is a very low estimate in my opinion.

2: Many people love (or are stuck with) Verizon. Family plans with overlapping contract terms, or just perception. Many people want an iPhone but can’t due to the Verizon issue. They walk into a Verizon store, say “I want an iPhone” and are told “not here.” Some will switch to AT&T, but most will stick with Verizon and buy something that looks pretty much like an iPhone. Lately, that’s Android. That’s a sale that could have gone Apple’s way.

3: Apple is very interested in market share when they have a compelling product in a new or open space. This is new. Witness the aggressive pricing on the iPad – half what folks expected. Within a year, I’m sure we’ll see a “free with contract” iPhone of some variety.

4: Apple HATES Google right now. It’s changed from friends, to friendly competition, to a blood feud. Nearly all Android sales are lost iPhone sales. Serious geeks aside, the #1 reason Android users tell me they bought one was their carrier didn’t have the iPhone. Apple would be willing to lose money to quell this transition.

The biggest challenge is reaching an agreement with Verizon. Verizon knows all this. Apple needs Verizon more than Verizon needs Apple. This is a change from the pre-Android days, when Verizon was losing customers to AT&T due to the iPhone. They are no longer losing that many, because they have the Android. The Android is certainly a lesser product, but it’s close enough that average consumers can be sold on it, and be reasonably happy with it. So Apple won’t get as much money or control as they have with AT&T, but in the end they’ll reach an agreement.

Additionally, to the extent new releases of operating systems or other third-party products, platforms or devices, such as the Apple iPhone or iPad, make it more difficult for our products to perform, and our customers are persuaded to use alternative technologies, our business could be harmed.

One day following Apple added this to their iPhone SDK rules:

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

This is all about Adobe adding a “Save as iPhone App” export option to Flash CS5.

I suggest to Adobe: Strengthen your other products which would be beneficial for iPhone use. Dreamweaver is an extremely popular web creation tool. How about some iPhone/iPad-optimized web templates? Perhaps support for HTML5′s offline storage? Maybe package and save a site out as fully offline-capable web app savable to a user’s home screen? Yes, you can do that – write standard HTML5/Javascript and fully bypass the App Store with what looks to most people as a native app.

Similarly, Premiere could be strengthened with better Quicktime support such as HTTP Live Streaming – something Apple doesn’t even support yet with Final Cut Pro.

Adobe has lost its battle to put Flash on the iPhone. Dead, gone, kaput. This is a good thing. Adobe should forget about the game it can’t win, and focus on the game it can.

Where Gawker (via John Gruber) posts some arguments, in my opinion partially valid, in favor of Flash.

The world needs a top-notch authoring environment for Javascript-based web apps. A Flash Professional that isn’t Flash.

One could argue whether Flash Professional is or isn’t “top-notch” but it’s good enough to be widely used. Adobe puts a lot into it simply because the more folks use it, the more Flash gets shoved onto the web, and the more the web becomes locked into the Flash platform. Javascript doesn’t have an “owner” in the same way. No major company that will live or die on the future of Javascript.

Funny enough, Apple has what I always think is on the brink of being that product. I’m referring to Dashcode. It’s not close to being a Flash Professional for Javascript – please don’t think I’m making that argument. But the groundwork has been there for years. I’ll watch the annual WWDC session on Dashcode’s newest features, and am always wowed by its progress but it’s never quite enough to do anything I need done. Originally created to author simple Dashboard widgets it can do a whole lot more. It’s powerful and as easy to use as Flash Professional. And standards-based (with some obvious Apple focus). And free.

Any web publisher (or user) thinking Flash is important for simple video, still-image slideshows, or fancy menus is living a decade behind the times. But Flash is still quite justified, on the development side, for rich web application elements like interactive graphs and complex video interaction. All these things are quite doable in standards-based Javascript but at a far higher cost of development time. In Flash, one designer with moderate programming skills can create some really nice stuff. It may require a proprietary plugin and kill your battery, but I can see where the cost/benefit analysis goes the Flash way.

Here’s how the world can put a serious dent into these areas where Flash is still justified. First, pick a good Javascript framework – probably jQuery. Bake it into Webkit. Seriously. That ends the need for the user to wait for the framework to download. Users without it – on non-Webkit browsers – would still retrieve it. This isn’t just for time savings (which would be minor for most users) – the main reason is it then becomes a widely used “standard” rather than a bolt-on. Psychologically important if nothing else. Enhance, significantly, the ability for Javascript to interact with HTML5 video, also with a baked-in framework. In summary – make Javascript behave like a higher-level language for these purposes.

Then pump up Dashcode or something similar with these things built in, with less of an Apple-specific slant – additional templates for non-Apple devices, or at least a way to create and distribute said templates. Basically, make it a Flash Professional for this “new” variety of Javascript. Don’t give it away for free – sell it, promote it, use it, and support it.

Bottom line – quit trying to get the world to stop playing Adobe’s game. Play Adobe’s game, under non-proprietery rules, and swing the cost/benefit math back towards the public good.

and began to think about Apple and their thirst for flash memory. Every iPhone and iPod with the exception of the iPod Classic uses flash (“NAND”) memory for storage. The MacBook Air has it as an option. Even the XServe has an optional flash drive for booting. Apple has given every indication flash memory is their way forward.

Flash memory isn’t just important to Apple – it’s critical. If Apple couldn’t get their market-leading supply of the stuff, they’d be dead. Apple integrates the memory into the iPhone and other units; no external memory slot. So Apple needs their memory early in the manufacturing chain, and can’t make changes as quickly or easily. Many other smartphones take a different route. The NexusOne, for example, has next to no built-in memory but includes a 4GB microSD card.

I think Apple’s approach is much better – the full memory is available to applications, nothing to drop out or lose, and even the low-end 8GB iPhone is plenty large for most users. But if HTC has a hard time getting 4GB microSD cards they can easily find other sizes from many manufacturers at any point in the manufacturing process. Apple’s integration costs them that flexibility.

Apple prevents supply constraints by working out long-term deals with flash memory manufacturers. Apparently they mostly use Samsung, Toshiba, and Hynix (but I’m no expert). I haven’t seen them working with Sandisk, a major player in the game. This could be because Sandisk makes the Sansa MP3 player, a direct competitor to the iPod, but it’s apparently only a small part of their overall business. Again, I’m no expert.

But I was thinking – if Apple wanted to shore up a guaranteed supplier of flash memory, why not just buy Sandisk? They have a market cap of $7.7B, so Apple could buy a majority stake for $4B. Apple has the cash. The other companies mentioned above are all larger and in other businesses. Sandisk does nothing but Flash, and holds some key patents on the stuff too. Apple would likely need to sell the Sansa business to someone else to please the FTC, but it’s of no use to them anyway.

To be honest I think it’s a pretty dumb idea. Apple has stayed out of the manufacturing business for good reason. They can play companies against each other, and who wouldn’t want Apple’s business these days? It would be a massive defensive play. If someone with deep pockets wanted to hurt Apple they could offer a premium to the manufacturers and buy more than they need. Apple’s market share would drop considerably if they can’t get the parts.

SanDisk is perhaps a bad acquisition for other reasons. Much of SanDisk’s business is in retail memory cards – not something Apple would care about. So really this was just me thinking about a potentially critical problem and finding a really bad solution to that problem.

If it did happen, Apple could also control the design of another critical component. That’s right up Apple’s alley. Is there a PA Semi of the flash memory world? I don’t know, but if so that’s more Apple’s style.

I hope (and expect) Apple’s top brass is smart enough to avoid the need to dive back into manufacturing, but if it happens you heard it here first…

Apple offering pre-ordering of the iPad is interesting. Surely easier for everyone, but loses the news coverage and excitement of everyone lining up at Apple stores. My gut feeling is the lineup won’t be as it was for the iPhone (a new product category – more on that another day). Anyway, I was among the thousands in the virtual line this morning. I’ll be very busy on April 3rd so home delivery is perfect for me.

I ordered the least-expensive model; 16GB, WiFi-only, $499. My rationale: I’m interested enough in the iPad to get one, sight-unseen. I’ll be asked many questions by clients and around town, thus some expense is justified in being educated. 16GB is enough for moderate media storage. I made do with an 8GB iPhone for two years. I don’t expect to store much music on the iPad, and that’s the majority on my current 32GB 3GS.

The 3G was a tough call. I don’t think I’ll need it – at least not much. Like most people I don’t know how exactly I’ll use the iPad beyond showing it off. I can see uses, but how many require live internet access anywhere? With the 16GB model, the 3G option carries a near-25% premium on the hardware. That’s a lot for a feature I’m not sure how often I’ll need on a device I’m not sure how I’ll use.

And the last factor – the iPad is new, thus a risk. It may succeed. I give it better than 50/50 odds it will. In which case a new model will be out no later than this time next year, and then I’ll certainly buy a higher-end model. If it’s a failure, I’ve only lost $500 on the deal which isn’t so bad for new technology.

WWDC is roughly a week away, thus very much on my mind. This will be number four for me. This puts me somewhere in the middle of experience; I started going after they got big and moved to the Moscone, but two years before they got huge and sold out. I, therefore, should write a Survival Guide.

I tend to focus on WWDC as a learning experience. I don’t do all that much chatting. I spend too much time at home being a politician so I prefer blending into the atmosphere while away. Many think of WWDC as a network event first, and learning second. That’s fine, but not my cup of tea. I’m giving Apple $1500 of my own money, and I want to suck out of them all I can.

In no particular order:

Stay as close as you can to the conference. This is a morning-till-night event and you don’t want to waste time traveling. I have a good friend in the bay area that offers me a bed for MacWorld, but for WWDC I’ll stay at my favorite dumpy hotel two blocks away with free ethernet.

Eat a good breakfast. By definition that means skip the official free WWDC breakfast. Stale bagels and cream cheese just don’t do it for me. I’m a breakfast person, and if you are too find something better to get you started in the morning. There’s a Denny’s around the corner, Lori’s Diner not far away. Or take a short walk to Whole Foods and get their take-out, bring it to the Moscone, and drink the free orange juice while making everyone jealous. Even Carl’s Jr’s breakfast isn’t that bad for this if you don’t mind the coronary disease.

Sleep a lot. I’m too old for the after-hour parties and be at full brain strength the next morning. I also have real work to do while at the conference, which I try to get out of the way in the early morning hours (I pretty much stay on east coast time while at the conference).

Unless you don’t plan to use your laptop at all, bring that power cord. And don’t forget the extension cord piece that came with it, like I did the first year. That extra few feet will come in handy. Every year seem to improve the power strip locations, but best to be prepared. Don’t say “Oh, I’ll just run off battery and plug in later.” No, plug in whenever you can. Oh, and bring the AC cord for your iPhone too; charges faster than USB.

Install any beta seeds before you go. Yes you’ll probably get a new seed the first day (either on CD or by download). But this way you’ll know you’ll have a good partition for the seed or a reasonable knowledge of what to expect. Plus you’ll be the smartest guy at lunch pointing out the differences in the newest seed.

Stay for lunch. This is the only survival guide that will recommend the stale sandwiches. They’re mediocre at best. One thought I’ve had is to buy a sandwich elsewhere in the morning and keep it with me until lunch, but I’ve never felt like lugging it around. I do this for MacWorld (where the food is even worse) but haven’t done so for WWDC yet. I take full advantage of the long lunch break to think about the day’s sessions, answer any work emails/calls, and chat a bit with those in the lunch room. Ok, that’s a little networking I guess, purely incidental. But fun. I once sat across from the Apple engineer responsible for Software Update. I got to vent about many things, and he was sincerely interested in my feedback. I learned a bit too. See, I sucked more knowledge out of Apple while eating stale food. Bonus. Oh, the beverage supplier for lunch is horrible, various off-brand stuff. Cruddy canned iced tea mostly. Very odd.

Eat the snacks between sessions. Seriously. Excellent cookies, decent pears, occasionally good chocolates, and much better drinks. I’ll often find a Dr. Pepper, mmmm! Why they can’t have the same beverages during lunch as they do during snacks I’ll never know. When it isn’t “snack time” the good sodas get carted away and the Odwalla drink cases locked up. If I think of it, I’ll grab something good during a morning break so I’ll have a better drink for lunch. Oh, if the snack areas are crowded walk down the hallways; they set up other stations there that don’t get as much activity.

Don’t eat the “pizza.” During one of the evening events they’ll provide something called “Moscone Pizza.” I don’t know what it is, but it’s not pizza.

Bring a small notepad. I get more ideas during WWDC than any other time of the year, and I’m scribbling endlessly. I prefer a pocket-sized notepad with a little pen, but whatever works. When I get back home I scan the whole thing to PDF using my trusty ScanSnap scanner, so nothing is forgotten.

Go to the Design Awards, especially if it’s your first year. It’s very inspirational. Every year I go, I walk away really psyched to enter a project to win next year. I’ve never entered, but it’s still fun and motivates me to keep chugging away. Last year I skipped the awards, which I do regret.

If you’re an independent developer, go to the CocoaHeads meeting/talk at the Stockton Street Apple Store, which is on Wednesday night this year. I’ve always enjoyed them, both during WWDC and MacWorld. It’s a break from the show without being too much of a break. Also check cocoaheads.org to see if there’s a group near you.

Visit a lab or two, even if you have just a remote excuse. Most sessions are large lectures with a brief Q&A at the end. Labs are very one-on-one. Sometimes just a simple question gets an Apple engineer talking about something great, and once or twice I got in on another developer’s question which was fun. Another great lab experience: I had a very specific question nobody at WWDC could answer. The Apple engineer helping me out asked me to write an email to him, which he forwarded off to some group email within Apple. Within an hour I had a great response back from someone in Cupertino with the exact info I was looking for.

Session conflicts are inevitable. By Friday, stop caring. You’ll be so exhausted it’s unimportant which session you attend.

And lastly, if you wish to provide feedback to Apple (and you should), I have these requests:

Ask them why the heck it takes months to release session videos to WWDC attendees. Apple has the infrastructure to encode new TV shows and movies like mad, why so long for their own stuff? I help place local government meeting videos online; we get these done in a day or two using a three-year-old iMac and part-time help. These should go online the same day as the session, so you can catch up if you miss something good due to a conflict. Come on Apple, this is easy.

Thank them for creating a developer discussion web site. This has been one of my top requests for years. Listservs were fine in the 1990′s and it’s nice to see Apple catching up. Usage is low but that should improve over time.

Ask them to bring back Feedback Forum sessions. They disappeared last year, and don’t appear to be on the schedule for 2009. These are sessions where Apple listens in a large group setting, and in some cases provide rare insights into the decision-making process. Apple should add one set of sessions at the very end, Friday late afternoon. These aren’t for everyone, but I think they’re a great way to end a conference.