Media Mover State of the Code

Arthur Foelsche

on

May 28, 2009

Media Mover State of the Code

Media Mover is closing in on its two and a half year birthday. Not a huge milestone, but it bares some reporting back on where things have been and where things are going. Originally conceived for the Flunk Arnold Drupal project, Media Mover was conceptually based off a script for Indymedia known as "push to eye". This script managed uploaded user content and moved it over to a content delivery network which could handle the bandwidth. Media Mover served the same need- it took content, transcoded it to a web friendly format, and put it somewhere- in this case Amazon's S3. Fast forward a year later and Media Mover went from a small external script to a sprawling set of modules, connecting to a variety of data sources, offering a much greater selection of conversion and storage options. On top of this, several separate projects spun out of the core of Media Mover to offer API services for any other modules use- FFmpeg Wrapper, XSPF Playlist, SWF Object API, and FLV Media Player all emerged from Media Mover. One of the things that I've been ranting about is that the file handling issues that we face with rich media are not specific to media- they impact all kinds of files. To this end, I released a module for text processing (AntiWord) plugging in to Media Mover's work flow. In the same way that Media Mover can take a video file and convert it to flash and place the file on a content delivery network, Media Mover can also process text (or other kinds of files) with the same workflow. Released for DC DrupalCon 2009, this marked a moment where I think Media Mover demonstrated how to treat files as simply files, rather than special cases for media or text or images. Backing up a few months, Aaron Winborn, myself, and a few other folks started pushing forward on the Media module. Two key ideas were driving us to start this project. For one, Drupal has no consistent file uploading system- there are lots of methods (from CCK to Drupal's upload module) for getting files into Drupal, but each offers its own interface, and most importantly, there is no way to reuse files already in Drupal and no ability to connect to files stored externally (eg: YouTube, FTP, S3, etc). This is not entirely true- there is a new option in CCK's Filefield for remote and local files and Embedded Media Field offers connection to external video sources, however, this functionally does not exist throughout Drupal's file handling and thus poses challenges to users and admins alike. The underpinnings of Media module is a replacement of Drupal's current file handling system with stream wrappers- essentially a way to describe the location and method for handling a file. For example, we could store a file in the database as ftp://myserver.com/myfile.mov and based on the ftp prefix, Drupal would know how to copy and move this file (something that is currently impossible). In many ways, Media Mover prefigures this idea- Media Mover abstracts file handling and defers to each module to handle a file at specific moments. The idea being that the core file handling system should not care about how the file is handled, merely that the file is handled. Secondly, Media Mover tries to get away from specifying a new interfaces for uploading files and instead lets modules define data sources- FTP, local directories, CCK file and image fields, etc. The Media module is going to do the same thing- except with a unified interface which will allow you to add a YouTube video in the same interface that you would upload your video- and this will be uniform across Drupal. This is not to say Media Mover will become obsolete- Media Mover will plug in to the Media module in the same way that modules like Embedded Media Field will- it will offer services to content the same way it does now, except that it will be vastly more powerful because it will be able to interact directly with Drupal's file storage instead of having to implement its own. In the category of one more thing, there is a full re-write of Media Mover waiting in the wings. The 6-2.x version of Media Mover will have a vastly more sophisticated workflow system, as well as simple integration for external processing systems (from FFmpeg to other transcoding software and custom scripts). While this release is still a few months off (6-1.x will be supported for a long time and there will be a clear upgrade path), I'm working to have it launch along side of Media module- birds of a feather I suppose.

Share it!