Joe Maller.com

iTransmogrify server issues

Google Code is returning Server errors when trying to load any of the iTransmogrify! source files or project pages. This has effectively taken the whole thing offline.

I have a solution which I will try to implement in the next hour, but it will be somewhat difficult and clumsy without access to the SVN repository.

Sorry about this, we’ll be back shortly.

Update: All working and back to normal.


Home movies as iTunes TV Shows

Update: At some point, probably with iTunes 8 though I didn’t notice at the time, iTunes added support for batch changing video format, making the script featured in this post obsolete… as it should be.

itunes_multiple_info

Original post follows.

We usually keep our home movies in iPhoto, but recently I’ve started moving some select clips into iTunes. Unfortunately, the list of Movies quickly becomes unmanageable. These kinds of videos are much easier to work with when grouped as TV shows, but unfortunately iTunes won’t batch convert Video Kind.

So I wrote a script. In addition to defining selected movies as a show, it also tags their season with the current year and sets the Show Title. Here’s the script: (Open in Script Editor)

set showTitle to display dialog “Enter TV Show Title” default answer “Family Videos” buttons {“Cancel”, “Ok”} default button 2

set theYear to year of (current date) as integer

tell application “iTunes”

copy selection to tracklist

repeat with theTrack in tracklist

set show of theTrack to text returned of showTitle

set season number of theTrack to theYear

set video kind of theTrack to TV show

end repeat

end tell

 

To use that, just select some movies in iTunes and run the script. Whatever’s selected will be tagged and grouped under the title you entered.

Now our home movies are all grouped together and easily synced to iPhones or other iTunes fed products like iPods and Apple TVs. To view videos on any of those devices, the movies will need to be converted to iPod compatible format. QuickTime can do it, but iSquint/VisualHub can do it much faster.

This could have been done with AtomicParsley, but AppleScript is easier and pre-installed on every Mac.

What would be really great is if iTunes and iPhoto could talk to one another and pull video content out. iPhoto has supported movies for years now, why can’t they talk to each other? (because neither was designed for handling video formats?)

There’s plenty of room to improve this, if you do please post a link in the comments.


iTransmogrify update

The main iTransmogrify! script has been updated with a bunch of new functionality:

  • YouTube.com pages are now supported (see notes)
  • Daily Motion videos are supported for new-style urls (see notes)
  • Kink.fm player and listings page are now supported
  • Sideload.com play links are now supported
  • WordPress Blogs using Viper Video QuickTags are supported for YouTube
  • All media links now open into new windows, so you won’t have to re-transmogrify a page with several media files after playing one. Note that this is dependent on the iPhone, sometimes it will blank other windows)
  • Some content in iframes will now be converted.
  • MotionBox, Viddler and Vimeo embedded videos, while not supporting iPod/iPhone alternate content, now link to their respective detail pages.

The main bookmarklet code was updated. This was necessary to workaround a frustrating oversight with Google Code hosting. Everyone will need to update their bookmarklet, in the future all updates will be automatic.

This has turned out to be far bigger than I ever imagined. Thank you to everyone for the links, feedback, compliments and ideas.

Known issues

LiveJournal pages redefine a bunch of core JavaScript functionality, breaking all kinds of stuff including jQuery. Additionally, they’re serving media in an iframe from a different domain, meaning JavaScript couldn’t access the frame even if they hadn’t broken it.

Notes

YouTube Internal pages
Because of a strange iPhone quirk, these links all need to go through the Google redirector, otherwise they bounce back to uk.youtube.com instead of playing.

DailyMotion
DailyMotion videos using new-style urls, which are usually about six digits long, work correctly. Videos using the old-style alphanumeric ID do not work yet. I’m probably just going to resort to building a simple web-service to grab those. Additionally, there is no way to programatically access the mp4 alternate content url, so I just linked to their iPhone pages. I’d prefer embedding QuickTime directly, but it’s just not possible yet.


iTransmogrify update ready, but…

So I’ve got a big update ready to go for iTransmogrify!. Except there’s a problem with Google Code.

Google Code doesn’t allow downloads to be renamed or deleted after they’re 2 days old or have 50+ downloads. That nugget of critical information is buried deep in their FAQ.

I posted this in Google Code Support, Rename or replace download and commented on issue 417, Need a stable link to the latest version of a download. A ‘latest version’ link on Google Code would solve this completely, but it’s been almost four months since they tagged the issue, so who knows when or if that feature will ever exist.

I’m not expecting any help from Google, so I’m considering the following two options:

  1. Link files directly from svn trunk.
  2. Set up externally-hosted http redirect.

Neither is ideal and both would require users to update their bookmarks or miss out on updates. Additionally the main script file would be outside of stats collection, so no one would know how many times iTransmogrify has been used, when I hit publish on this post, that number was just under 279,000 times.

My solution

After a day of thinking about it and discussing things with a few people, I’ve decided to go with a locally-hosted redirect for the main JavaScript file. Going forward I’ll just manually update the redirect to point to the latest version. This is an acceptable outcome for an imperfect situation.

The update will unfortunately require action on the users’ part, something I had intended never to happen: Users will need to update the bookmarklet. From here forward, all updates will just happen, as I’d planned from the beginning.

Once this update is known to be working, I will modify the graphics seen by the old script file to announce the changes. Hopefully that last step will get most everyone moved to the newer bookmarklet.


iTransmogrify!

iTransmogrify! is a bookmarklet for iPhone which transforms embedded Flash content into direct links to natively supported formats. That means YouTube videos and MP3s can now be played from the iPhone’s Safari web browser with just a few clicks.

Seeing it work is the best explanation:

On an iPhone? Try it now: iTransmogrify! (works in Safari and Firefox too)

Sorry, it took YouTube a long time to re-encode that for iPhone, here’s a baby panda:

Installation

To install the bookmarklet, just drag the link to your Safari or Firefox Bookmarks, IE users should right click and choose “Add To Favorites…” After adding the link, sync your iPhone.

Grab it now: iTransmogrify!

You can also add iTransmogrify from your iPhone!

More information, source code and bug-tracking is available on the iTransmogrify Google Code page.

    Currently supported content:

  • Default YouTube Object-Embed code
  • YouTube bare Embed
  • YouTube bare Object
  • A variety of Flash-based MP3 players including Digg Podcasts

Lots more added: iTransmogrify update

Support for other embedded media sites will be added as I figure them out. Please report broken sites or suggest additional sources using Google Code issue tracker.

Acknowledgements

The first robust, script insertion bookmarklets I ever saw was Sumaato’s original Flickr GeoCoding bookmarklet.

Other sites also deserving links:

iPhone graphic reference:

Also, John Resig’s amazing jQuery JavaScript library. This project was the excuse I’d been looking for to finally dig in and learn it.

The name came from a late-night brainstorming chat with Bruce and was far more fun and interesting than the utilitarian ones I was thinking of. So thank you Bruce, and of course, Bill Watterson.


Rotating sub-pixel text rendering

John Gruber of Daring Fireball (thanks for the link!) knows a lot about font-rendering, however in a recent post discussing screen-rotation and sub-pixel text rendering he let this slip:

“I tested it on my Cinema Display with the screen rotated 90°, and, to my eyes, sub-pixel anti-aliasing still looked good.”

That is just preposterous. Aside from his observation being completely wrong, he also revealed a bug in OS X: The current system doesn’t recognize rotated pixel orientations, sub-pixel rendering on rotated screens should probably be disabled automatically. (rdar://problem/5627732)

Here are two screenshots of my browser’s address bar as displayed on my Cinema Display, which clearly shows the difference. The top image is Leopard’s default sub-pixel rendering. The second image is the same bar photographed with my display rotated 90°, the photo was then rotated back in Photoshop for better comparison.

Comparison of rotated sub-pixel type

The text was apparently calculated against the presumed horizontal LCD primary orientation. But because the pixels were rotated, several of the letterform stems (verticals) are drawing as full-pixel-width colored lines. The first “h” is especially glaring, its stem and stroke are drawn as a pair of dark red and light blue lines.

Sub-pixel rendering takes advantage of a known horizontal alignment of the three color primaries that make up each physical pixel. The algorithm seems to render text at 3x the horizontal resolution, ignoring the color information and treating each third-pixel as a valid light source to use for drawing letterforms. That 3x width is then striped with red, green and blue to match screen’s component primary ordering. (That was an educated guess)

As Steve Weller stated in the post John linked, the human eye has “pathetic color-resolution”. This fact is exploited all over the place in video, with many formats sampling color only once for every four luminance pixels.

Several things are at play here:

  1. Human vision is the bifocal product of horizontally arranged eyes.
  2. Most written human language uses letterforms which are vertically oriented and horizontally distinguished. Especially Latin-derived languages.
  3. Most human languages read horizontally.
  4. Human vision tends to be less color sensitive for motion, or when scanning information (like reading)

It all just kind of worked out perfectly. Digital color reproduction combined our horizontal predisposition with our soft and slow perception of color, and then arranged color primaries horizontally. Text also reads horizontally, and since the viewer is rapidly moving their eyes, we perceive shape and contrast before color. Additionally, Latinate languages evolved letterforms which utilize horizontal variations against a largely regular vertical syncopation. Presto: sub-pixel rendering just seems fantastically obvious.

Regarding John’s closing supposition,

“I’m not sure the iPhones rotating display is reason enough to rule out sub-pixel rendering.”

Based on everything leading up to sub-pixel rendering in the first place, most of the benefits would be lost if the underlying pixel grid was vertically oriented. The sensitivity of computer text falls across the horizontal axis. Adding resolution to the vertical axis isn’t worth the effort.

Sub-pixel rendering is ultimately a transitional technology anyway, a half-step that improves the now while waiting for a better and inevitable future to arrive. Once we start seeing iPhone level pixel-densities all over the place, sub-pixel rendering will began its transition to technology footnote.

Digital displays will someday reach a point where every physical pixel is capable of producing every color of visible light. (And someone will doubtlessly push into near infrared and ultra-violet, claiming increased realism and fidelity). Future displays will also be operating at a density where anti-aliasing may not be necessary at all.

I still think Apple’s decision to use standard anti-aliasing for the Leopard menu bar was a mistake. Unless they’ve got some spiffy high-pixel-density cinema displays ready for MacWorld and enable system-wide resolution independence in 10.5.x, switching to standard anti-aliased text rendering in the menu bar was a change that should have been postponed. The necessary hardware pool just isn’t here yet and the result is an interface that looks markedly worse than it did under previous releases.


Make custom iPhone ringtones work with iTunes 7.4.1

Update: Amazingly, iPhone 1.1.2 update re-enabled the m4r-rename hack. This all works again!

I just tested it quickly by renaming a previous home-made ringtone file to m4r and double-clicking. It imported, synced to and played on my iPhone without any other steps.


Currently there are no known ringtone hacks for iPhone 1.1.1.

Apple, you’re pissing off your fans. Don’t do this. [we’ll just be over here pretending you listened!]


This totally seems like it shouldn’t work.

If you’re seeing “cannot be played on this iPhone errors” like this:

[file] was not copied to the iPhone

Open your iTunes Library folder and find the Ringtones folder: iTunes Music/Ringtones.

Select your ringtone and change the file extension back to m4a. Yes, m4a.

Sync again and your custom ringtone should be working on your iPhone. Nice.


Update: Confirmed for Windows XP & Vista

Thanks to commenter Robbie, building on steps from Jason Choi, here’s how to get custom ringtones working in Windows:

  1. Put m4r files into a ringtones folder on my desktop
  2. Opened iTunes
  3. Edit > Preferences > Advanced
  4. Check “Keep iTunes Music folder organized”
  5. Check “Copy files to iTunes Music folder when adding to library”
  6. Create playlist called “Ringtones” in iTunes
  7. Drag the Ringtones folder from my desktop to the playlist I created in iTunes
  8. Made sure they appeared when in the list on the Ringtones tab in iTunes
  9. Opened the “Ringtones” folder that iTunes created in MusiciTunesiTunes MusicRingtones
  10. Renamed all the m4r files to m4a
  11. Try to sync but it fails because it cannot find the m4r files (this is good)
  12. Look at playlist created in iTunes with a bunch of Xs next to each ringtone
  13. Double click each ringtone (hit browse for the file, and selected each m4a file from the folder in my MusiciTunesiTunes MusicRingtones)
  14. Hit sync again
  15. Verify they are in your Settings>Sounds>Ringtones


« Previous PageNext Page »