Writing

Feed Software, technology, sysadmin war stories, and more.

Monday, May 27, 2013

Videos which aren't videos, courtesy of iPhoto

Want to have some frustrating times with iPhoto? Try doing something "simple". Take a video that's long, make a copy of it, and trim the copy. Then send that copy to another system (like a web server).

Let's just go through the steps here. First, I click on the video in the list and then go to "duplicate". This gives me a second entry in the list. Then I click [edit], just like I would do for anything else.

Can't edit

Oops, guess not. The edit button doesn't work for videos. So I bring up the actual video (which starts playing, and I immediately have to pause it).

gear

With the video open, there's the gear icon they were telling me about. Isn't it amazing how their UI is such that they have to pop something up in order to tell me to click on something else? They're mighty specific about it, too. It's like hanging a sign over a terrible interface.

Anyway, I click on the gear, and I get this.

Edit menu

There's the "trim" option I wanted. It's really the only thing you can do at this point in terms of editing, actually. The first two are viewing options, and the last one only means anything once you've done a trim in the first place.

Anyway, now I have the little slider bar thing to trim stuff, so I set my entry and exit points and hit the [trim] button.

Trim bar

This works just fine, and now I have my trimmed-down movie. So now I jump back up to the list of pictures and movies, and drag this new movie out to my desktop.

Movie, version 2

Right, so there it is. That name seems reasonable. Now I just need to take that file and fling it over to my Linux box for transcoding and whatever else. I scp it, and ... hey, that was way too quick. What's the deal here?

ls

The file is 3780 bytes? There's no way it could have my video in there. Where did it go? Is it broken? I bring it the "file info" for the file on my Desktop.

preview

It's there. Yep, that's my video. It plays just fine on there, but it doesn't work at all on my Linux box. Digging around in the raw file with 'strings' sheds some light on the situation. One in particular stands out:

Apple Alias Data Handler

There's also the path ... to the original movie. This thing is a glorified symlink! It's not really a freestanding video. I can only wonder what would happen if I went back and deleted that original video.

Now, full disclosure. For this post, I went back and did all of this deliberately. I knew exactly what was going to happen. I knew this because it had happened to me once before when I legitimately was trying to clone, trim, and then copy out a video file. I couldn't get a reasonable result no matter what I did.

I think I wound up schlepping the whole thing to a Linux box where mencoder (part of mplayer) was able to cut it down to size. Yes, a Linux box actually did some multimedia work better than a Mac did. How can this be?

So, it gets better. If you drag the original video to the Desktop and then scp that, you get the whole thing! Yep, you now have to keep track of which ones are draggable and can be copied, and which ones are just a bunch of metadata and no actual video. Does this sound friendly? Would you really expect users to figure this out and then work around it with the help of a Linux box?

Think different?