video bounding boxes

New hack: video-bbox.pl. This tells you what the interior bounding box of a movie is, so you can tell which ones have hardcoded letterboxing in them. It also prints the bounding box, which you can then enter into a program like MPEG Streamclip to crop and re-encode them.

I began to care about this after we started showing music videos at DNA Pizza. It turns out that a lot of the videos in my collection are 640x480 with letterboxing, which, when you display it on a 16:9 TV, looks like:

That's annoying, so I'm going through and re-encoding a bunch of things when I can't find better copies of them to download.

Even with this script, it's still a distressingly manual process, because:

  1. mplayer is hella flaky, so the script fails a lot;
  2. MPEG Streamclip isn't scriptable, so I can't even automatically fill in the crop numbers;
  3. I don't know how to bulk-copy all of the metadata from one MOV file to another;
  4. There's no easy way to replace a file in iTunes and have the new version show up in all the same playlists, have the same ratings, etc. as the old file. (If you just overwrite the file, the lack of metadata is a problem (see point 3) and if an MP4 became a MOV, you'd be out of luck anyway since the file can't have the same name.)

It's not easy being an obsessive archivist. People don't even know.

Update: resize.pl does this more and better.

Tags: , , , ,