Datamoshing Tutorial

May 12th, 2009

Youtube user datamosher has posted a 3-part tutorial on how he created the video for Chairlift’s “Evident Utensil”. He essentially normalizes a set of video clips into a common format with FFmpeg, then uses avidemux to append them together and to remove keyframes. He has also made available a toolkit which includes both FFmpegX and avidemux for OS X.

I picked up the Android-powered G1 late last week. I like the phone quite a bit. Here’s a list of things about Android that stood out to me this past weekend, both good and bad.

  • When you boot up the phone for the first time, it asks you for your Google account login. If you don’t have one, it will make you create a Google account. There is no doubt that this is a Google phone through and through. Oddly, when I entered my password incorrectly, it claimed to have network access problems rather than reporting bad login credentials. I tried to log in about a half dozen times before I realized I was entering the wrong password.
  • There are two email clients on the phone: the Gmail client and a secondary email client for POP and IMAP access. The Gmail client is on par with the Gmail client that I had on my Blackberry 8100. However, the POP/IMAP client leaves quite a bit to be desired. Setting up an IMAP account is easy, but there are a couple things missing from the client. For example, while the total number of unread messages for an IMAP account is displayed, the number of unread messages per folder is not.
  • I love the notification bar. Incoming emails, SMS text messages, IM messages are all slipped into a notification area at the top part of the screen. When they first appear, a quick preview of the message is also displayed on the bar. With a quick flick of the finger to pull down this bar, I am given one click access to these messages.
  • Instead of using a numeric passcode to lock the phone, the G1 features a neat alternative. The “passcode” is a pattern drawn on a 3-by-3 grid. The phone is unlocked by drawing the matching pattern with my finger on the touchscreen.
  • By sliding my finger along the desktop, I can switch between three desktop spaces. Shortcuts to commonly used applications can be placed on these desktop spaces. Applications are stored in a drawer that is opened by flicking on a tab upwards from the bottom of the screen.
  • For better and worse, contacts are automatically synced from your Gmail contacts list. Gmail had harvested a good number of contacts from my email, so I had to do a good deal of clean up to keep my G1 contact list less cluttered.
  • Up to six applications can be run at the same time. However, as far as I can tell, there is no way to explicitly close an application. As you open more, they are closed in a first-open-first-closed fashion. As my girlfriend noted, you can open the browser, switch to another application, then switch back to the browser without having to wait for the URL to load again (as is the case with the iPhone).
  • The trackball is pretty useful when in the horizontal, keyboard-flipped out orientation. It helps me navigate through text input fields without moving my fingers up to the touchscreen. Also, keyboard shortcuts. Nuff’ said.
  • Frequently accessed settings like enabling/disabiling wifi are buried a few levels deep in a Settings application. Fortunately, the AnyCuts application available in the Android Market makes it possible to place a shortcut to just about anything on the desktop.

All in all, I think the G1 is a good debut for the Android platform. There are a few interface quirks, but as in the case with AnyCuts, the open nature of the platform and the Android Market are already encouraging the development of solutions. I think this is promising and there is a lot of potential for the Android platform.

P.S. Someone please make a BART schedule application before I am forced to foist a half-assed one upon the Android world.

Minesweeper is NP-complete.

November 17th, 2008

Apperently Minesweeper is a computationally intractable problem. My fastest time on the Easy grid is 5 seconds.

Wikipedia explains NP-completeness.

Earlier this month the Mozilla Foundation announced Geode, an early implementation of a draft W3C specification for browser-based geo-location. The abstract of the draft specification states its mission to define “an API that provides scripted access to geographical location information associated with the hosting device.” A quick read of the draft W3C Geolocation API Specification got me thinking about how else such functionality could be implemented in the browser and used by web services.

The draft defines an API to be made available to any Javascript running in the browser. While the browser itself is responsible for getting the user’s current location from the operating system, it’s client-side Javascript that makes use of this location information. Provided in the draft are examples like the following:

function showMap(position) {
// Show a map centered at (position.latitude, position.longitude);
}
// One-shot position request.
navigator.geolocation.getCurrentPosition(showMap);

Such an interface allows for a high-level of interactivity on the client-side as Javascript controls and has access to all aspects of the client’s location information. However, I feel this comes at the costs of a standardized location format and portability. First, if the client wishes to gather information from a web service using the current location as a parameter, the client-side script must encode and transmit this information to a server. The format in which this information will likely vary greatly. One developer might choose to transmit this information in this manner: http://nearestfood.com/pizza?lat=1.234&long=1.234. Another might transmit this same information another way: http://iamhungry.com/pizza?latlong=1.234,1.234. There is no standard in how the client’s location is represented. Second, the client must support Javascript, which in the case of mobile device clients, is not yet a given.

Read the rest of this entry »

Transmission is now officially my favorite Bittorrent client. It’s small and light on system resources, yet retains many of the features that initially drew me to Azureus. But the feature that I find most useful is that Transmission allows you to control a running instance from the command-line on the terminal. This makes managing my torrents remotely via SSH very easy without the need to either setup a VNC session or installing a web-interface plugin (e.g. Azureus’ HTML WebUI).

Transmission is a suite of four tools:

  1. transmission: The GTK+/Mac OS X graphical frontend.
  2. transmissioncli: The command-line interface.
  3. transmission-daemon:  Runs in the background and takes commands from transmission-remote.
  4. transmission-remote: Command-line tool to send commands to either transmission-daemon or the graphical frontend.

To start torrenting remotely we first need to startup an instance of Transmission. We can do this by entering the following in terminal instance:

transmission-daemon

Typically there will be no response printed to the terminal. We can verify that tranmission-daemon has by entering the following command to get a list of all programs running under your current user account:

ps ux

If you see a line like the following in the results:

ivan     25599  0.1  0.3  60348  7896 ?        Ssl  Sep30   6:07 transmission-daemon

… you should be ready to use Transmission!

  1. To start a torrent, enter transmission-remote --add <path to .torrent file>.
  2. Wait a few seconds and enter transmission-remote --list to list the status of current torrents handled by transmission-daemon.
  3. To stop a torrent, enter transmission-remote -t x --stop, where x is the numerical ID of the torrent shown in the left most column of the --list response. To restart the torrent, enter transmission-remote -t x --start.
  4. Removing a torrent is similar. Enter transmission-remote -t x --remove.

As long as transmission-daemon is running, you can log out from your terminal session without affecting the running torrents. They will continue to download and seed even when you are not logged on. When you are finally finish torrenting, issue the following command to terminate transmission-daemon:

killall transmission-daemon

This will terminate all instances of transmission-daemon currenting running under your current user login.