Categories
Search
Social Links
Subscribe
Amazon Goodies
This list does not yet contain any items.
Sites
Contact

Entries in Cocoa (4)

Saturday
Jan162010

Some Quick QuickTime and Movie Editing Links

Simon Wolf's Otter Software Blog has posted a couple of interesting examples of working with Quicktime files using QTKit.

QuickTime Chapters discusses working with chapters, and the Rename QuickTime Tracks article discusses how to rename the multiple tracks of a file.

Both of these are useful and contain code.

Another tool that I was just introduced to is called Subler. This open source Mac OS X app is designed to work with files for all Apple devices, including support for subtitles, muxing, and iTunes metadata editing. One of the great aspects of this is that you can edit chapter names and save the files almost instantly. It doesn't write out the entire content, just the necessary metadata. You can also add your own chapters and times if that's what you're looking to do. Update: I attempted to load (which succeeded) and save (which failed) a file that had been modified by Subler using QTKit. This kind of puts me off this particular tool, at least as part of my typical tool chain.

All three are interesting. I definitely would recommend looking at Simon's articles if you're interested ing writing something that works with mp4 files.

Update: In searching for more information I finally had a chance to have a more in depth look at the QTKit API. I was surprised that it had functionality for dealing with most, if not all, of the items that Subler handles, but instead of using a third party library, it is supported Apple API.

QTKit includes API that allows you to add/delete and edit chapter information. It also allows you to rename audio tracks. Using this (basically Simon's tool above slightly modified), and a bit of fiddling with the QuickTime 7 application (optional install on 10.6), I was able to create a file that when displayed on the Apple TV allowed playing normal audio and commentary, and under Languages the commentary track was labeled as English (Commentary).  You could choose which you wanted to listen to just like languages. I had been convinced this was not possible. I was wrong and I couldn't be happier.

QTKit is a powerful framework that makes dealing with QuickTime files much easier than it has been in the past. Programmers should definitely explore there capabilities.

Of course, I'm still not sure that my DVD conversion project is going to continue. As good as Handbrake has become BluRay discs are dropping in price. Sony sells a 400 disk BluRay/DVD changer that would allow access to new BluRay content, and my favorite DVDs where I want to access commentary. The rest could be digitized.

The changer is in the $550 range. The only thing holding me back is that I would like to see the user interface the changer presents. It's supposed to display cover art and allow easy selection. But if it can't do that with the unit out of sight (actually 30 feet away), then I'm still hosed for a solution.

Saturday
Oct312009

The Death of Stepwise

After 14 years+ I have deleted Stepwise.com. While the site had been stale for a while, many articles were still of use. In addition the daily news was updated on a daily basis. That will also stop.

Why?

Stepwise consisted of thousands of files. I didn't feel it was possible to locate and remove the files that were copyright by a single individual. That individual did not ask it to be removed. I simply didn't want it there anymore. So it all goes.

In addition, the Software, graphics, and other directories were deleted. This may have a negative effect on Erik Buck's EMBdirectory. If it does, I'll ensure that content (and that is the only content that I have archived) will be made available to Erik to post on cocoadesignpatterns.

This was not an easy decision. But I could not live with some of that content remaining on the site.

My thanks to those who advertised on Stepwise (although nobody had been billed in about 5 years, they were all just friends).

I'm sorry for the sudden notice. I did not want the site copied and mirrored elsewhere.

Sincerely
Scott Anguish

If you want to comment, @sanguish via Twitter. Or if you know me well enough, feel free to send me an email.

And thanks for all the compliments and well wishes. Write cool software, that's all I ask.

Friday
Oct232009

Scripting Bridge and iTunes 9

I've been working sporadically on a project that would allow me to load chunks of metadata into iTunes as I rip my DVDs for viewing on the AppleTV. (This is especially annoying, since I have both the ripped material and the metadata for hundreds of shows).

Last time I looked at the code was at the time of iTunes 8. The major feature I’m missing is the ability to set the rating of the content, to keep the kids from R, MA, Unrated content. Unfortunately, that isn’t in the current version of iTunes 9.

However, running scripting bridge on the current version, does supply a considerably different file

The enum and typedef declarations are defined in a standard more with the current Apple style, for example: (the code is prefixed with my initials because a leading “i” was driving me bonkers.

Old format


enum SATunesEKnd {
SATunesEKndTrackListing = 'kTrk' /* a basic listing of tracks within a playlist */
SATunesEKndAlbumListing = 'kAlb' /* a listing of a playlist grouped by album */
SATunesEKndCdInsert = 'kCDi'     /* a printout of the playlist for jewel case inserts */
} SATunesEKnd;

New Format


enum SATunesEKnd {
SATunesEKndTrackListing = 'kTrk' /* a basic listing of tracks within a playlist*/,
SATunesEKndAlbumListing = 'kAlb' /* a listing of a playlist grouped by album */,
SATunesEKndCdInsert = 'kCDi'     /* a printout of the playlist for jewel case inserts */
};
typedef enum SATunesEKnd SATunesEKnd;

This is much more readable and in line with the way we document these types of enums (so that Quick Help parses the typedef correctly).

A few other constants changed, but nothing major I saw upon a quick look.

The data type for artwork went from id to NSData.

A new field was added releaseDate. So this metadata could be added to files now using the bridge.

The only other change of note was the SATunesFileTrack object property location became readonly (which it probably should have been all along).

So, while progress is there, and I love the new enum format (because the docs are changing to it) I was a bit disappointed with the lack of a parental rating field.

Ah well, maybe next time.

Wednesday
Sep092009

Methods that support Blocks.

On Twitter today @CocoaSamuari asked if there was a summary of the methods that supported Blocks. Nope, there isn’t.

So I went through the 10.6 API change documents (available in Xcode) and pulled out the links to the ones I could recall. I think this list is now complete, but tweet me if I’ve missed something.

These links depend on you having the Docsets installed in the /Developer location on your local machine.

AppKit

NSEvent

NSSavePanel

NSSpellChecker

NSWorkspace

NSUserInterfaceItemSearching Protocol

Foundation

NSArray

NSAttributedString

NSBlockOperation

NSDictionary

NSExpression

NSFileManager

NSIndexSet

NSNotificationCenter

NSOperation

NSOperationQueue

NSPredicate

NSSet

NSString

Core Animation

CATransaction