diff --git a/media.module b/media.module
index 0b0d63a..edbbad4 100644
--- a/media.module
+++ b/media.module
@@ -450,6 +450,38 @@ function media_element_info_alter(&$types) {
 }
 
 /**
+ * Implements hook_file_mimetype_mapping().
+ *
+ * m4v mime is missing from file.mimetypes.inc. See: http://drupal.org/node/1290486
+ */
+function media_file_mimetype_mapping_alter(&$mapping) {
+  $items = array(
+    array(
+      'extension' => 'm4v',
+      'mimetype' => 'video/x-m4v',
+    )
+  );
+
+  foreach ($items as $item) {
+    // If this mimetype exists we need to get the key value so we can add the
+    // extension to the correct mimetype.
+    if (in_array($item['mimetype'], $mapping['mimetypes'])) {
+      $flip = array_flip($mapping['mimetypes']);
+      $key = $flip[$item['mimetype']];
+    }
+    // Add the extension to the listing.
+    else {
+      $mapping['mimetypes'][] = $item['mimetype'];
+      end($mapping['mimetypes']);
+      $key = key($mapping['mimetypes']);
+      reset($mapping['mimetypes']);
+    }
+    
+    $mapping['extensions'][$item['extension']] = $key;
+  }
+}
+
+/**
  * Implements hook_media_display_types().
  *
  * This is used to display media in different ways on the admin section.
@@ -1140,7 +1172,7 @@ function media_ctools_plugin_api($owner, $api) {
 
 /**
  * Helper function to get a list of hidden stream wrappers.
- * 
+ *
  * This is used in several places to filter queries for media so that files in
  * temporary:// don't show up.
  */
