diff -rupN original/includes/videojs.admin.inc new/includes/videojs.admin.inc
--- original/includes/videojs.admin.inc	2010-10-31 10:25:03.000000000 -0400
+++ new/includes/videojs.admin.inc	2010-12-15 16:22:34.000000000 -0500
@@ -44,6 +44,22 @@ function videojs_settings_form() {
     '#default_value' => variable_get('videojs_height', 264),
   );
 
+  $form['thumbnails'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('VideoJS Thumbnails'),
+    '#collapsible' => FALSE,
+    '#description' => t('Thumbnail settings for videojs widget'),
+  );
+  
+  foreach(_videojs_settings_thumbnail_fields() as $node_type => $value){
+    $form['thumbnails']['videojs_' . $node_type] = array(
+      '#type' => 'select',
+      '#title' => t($value['video_js_field'] .' in '.  $value['description']),
+      '#default_value' => variable_get('videojs_'. $node_type, module_exists('video') ? 'video_module' : $value['filefields'][0]),
+      '#options' => module_exists('video') ? array('video_module' => t('Video Module')) + $value['filefields'] : $value['filefields'],
+    );
+  }
+
   $form = system_settings_form($form);
   $form['#validate'][] = 'videojs_settings_form_validate';
   $form['#submit'][] = 'videojs_settings_form_submit';
@@ -66,3 +82,35 @@ function videojs_settings_form_validate(
 function videojs_settings_form_submit($form, &$form_state) {
   drupal_set_message(t('The videojs library (version @version) successfully found in the %directory directory.', array('@version' => $form_state['videojs_version'], '%directory' => $form_state['values']['videojs_directory'])));
 }
+
+/**
+* Generate list of content types with filefield widget set to 'videojs' and possible filefields for thumbnails
+* 
+* @return
+*   Returns array in format [node_type]=>array('description','video_js_field',filefields=>array('filefield'=>'filefield description'))
+*/
+function _videojs_settings_thumbnail_fields(){
+  $video_js_node_types = array();
+
+  // Iterate through all node_types
+  foreach(array_map('check_plain', node_get_types('names')) as $node_type => $description) {
+    // Iterate through all filefield field types in the current node type
+    foreach(filefield_get_field_list($node_type) as $field) {
+      // If widget format of the field is 'videojs' - generate structure containing node_type, videojs field name and list of possible options for thumbnails
+      if ($field['display_settings']['full']['format'] == 'videojs'){
+        $video_js_node_types[$node_type] = array(
+          'node_type' => $field['type_name'],
+          'description' => $description,
+          'video_js_field' => $field['field_name'],
+          'filefields' => array()
+        );
+        // Get all filefield type fields except 'videojs' field (should we check only compatible extentions allowed in some widgets?)
+        foreach(filefield_get_field_list($node_type) as $thumbnail_field){
+          if ($thumbnail_field['display_settings']['full']['format'] != 'videojs')
+            $video_js_node_types[$node_type]['filefields'][$thumbnail_field['field_name']] = t($thumbnail_field['field_name']);
+        }
+      }
+    }
+  }
+  return $video_js_node_types;
+}
diff -rupN original/includes/videojs.theme.inc new/includes/videojs.theme.inc
--- original/includes/videojs.theme.inc	2010-11-30 15:24:49.000000000 -0500
+++ new/includes/videojs.theme.inc	2011-01-07 09:20:51.000000000 -0500
@@ -10,20 +10,81 @@
  * Preprocess function for videojs.tpl.php when using a playlist.
  */
 function template_preprocess_videojs_formatter_videojs(&$vars) {
+  $codecs = array(
+    'video/mp4' => array (
+      array('width' => '720', 'height' => '576', 'type' => "video/mp4; codecs='avc1.42E01E, mp4a.40.2'"), // Profile: Baseline, Level: 3.0
+      array('width' => '1280', 'height' => '720', 'type' => "video/mp4; codecs='avc1.4D401F, mp4a.40.2'"), // Profile: Main, Level: 3.1
+      array('width' => '1920', 'height' => '1088', 'type' => "video/mp4; codecs='avc1.640029, mp4a.40.2'"), // Profile: High, Level: 4.1 
+      array('width' => '2048', 'height' => '2048', 'type' => "video/mp4; codecs='avc1.58A033, mp4a.40.2'") // Profile: Extended, Level: 5.1 
+    ),
+    'video/webm' =>  'video/webm; codec="vp8, vorbis"',
+    'application/octet-stream' =>  'video/webm; codec="vp8, vorbis"',
+    'video/ogg' => 'video/ogg; codec="theora, vorbis"',
+    'application/ogg' => 'video/ogg; codec="theora, vorbis"',
+    'video/quicktime' => 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'
+  );
+
   videojs_add();
-  $vars['items'] = array();
+  $vars['width'] = variable_get('videojs_width', 640);
+  $vars['height'] = variable_get('videojs_height', 264);
   $field_name = $vars['element']['#field_name'];
   $node = $vars['element']['#node'];
-  $number = 0;
+  $items_mp4 = array();
+  $items_others = array();
   foreach ($node->$field_name as $item) {
-    $vars['items'][] = $item;
+    // Skip unplayable items.
+    if (!isset($codecs[$item['filemime']])) continue;
+
+    // Special treatment for mp4 type due to different capabilities.
+    if ($item['filemime'] == 'video/mp4') {
+      // Check if Video module present and dimensions are assigned
+      if (isset($item['data']['dimensions'])) {
+        list($width,$height) = explode('x',$item['data']['dimensions'],2); // i.e. 560x314
+        foreach ($codecs['video/mp4'] as $resolution) {
+          $item['videotype'] = $resolution['type'];
+          if (($width < $resolution['width']) && ($height < $resolution['height']))
+            break;
+        }
+      } else
+        $item['videotype'] = $codecs['video/mp4'][0]['type']; // dimensions info not exist, assign default
+      $items_mp4[] = $item;
+    } else {
+      $item['videotype'] = $codecs[$item['filemime']];
+      $items_others[] = $item;
+    }
   }
+  $vars['items'] = array_merge ($items_mp4,$items_others); // mp4 listed first
+  
   $vars['player_id'] = 'videojs-' . $vars['element']['#node']->nid . '-' . str_replace('_', '-', $vars['element']['#field_name']);
-    // Grab any poster image from a field named videojs_poster
-  if (!empty($node->field_videojs_poster)) {
-    $image = $node->field_videojs_poster[0]; // take the first image from videojs_poster field
-    $vars['poster'] = file_create_url($image['filepath']);
+
+  $poster_field = variable_get('videojs_'.$node->type, 'video_module');
+  if ($poster_field == 'video_module') {
+    if (module_exists(video) && isset($vars['items'][0]['data'])) {
+      // Video module present, retriving description and poster image from first video
+      $vars['poster'] = file_create_url($vars['items'][0]['data']['video_thumb']);
+    }
+  } else {
+    // Grab any poster image from a field defined in videojs admin settings
+    if (!empty($node->$poster_field)) {
+      $image = $node->$poster_field[0]; // take the first image from field
+      $vars['poster'] = file_create_url($image['filepath']);
+    }
+  }
+
+  // Special treatment for 'video/flv', if one is exist use it as flash fallback, otherwise first mp4
+  foreach($node->$field_name as $item) {
+    if ($item['filemime'] == 'video/flv') {
+      $vars['flash'] = file_create_url($item['filepath']);
+      break;
+    }
+  }
+  if (!isset($vars['flash'])) {
+    $vars['flash'] = file_create_url($items_mp4[0]['filepath']);
   }
+
+  $flash_player = _videojs_flashplayer($vars['flash'], $vars['width'], $vars['height'], $vars['poster']);
+  if (isset($flash_player))
+    $vars['flash_player'] = $flash_player;
 }
 
 /**
@@ -33,3 +94,58 @@ function template_preprocess_videojs_vie
   videojs_add();
   $vars['player_id'] = 'videojs-view-' . str_replace('_', '-', $vars['view']->name);
 }
+
+/**
+*  Get flash player fallback
+*
+*  $url - url to flash media
+*
+*  $width - width
+*
+*  $height - height
+*
+*  $poster - url to the poster image
+*/
+function _videojs_flashplayer($url, $width, $height, $poster = NULL) {
+  if (module_exists('swftools')) {
+    $options = array(
+      'params' => array(
+              'width' => $width,
+              'height' => $height,
+      ),
+    );
+    if ($poster) {
+      $options['othervars'] = array(
+        //@todo: swftools bug, can't enable this until they fix their pathing for the images.
+        'image' => $poster,
+        'class' => 'vjs-flash-fallback',
+      );
+    }
+    return swf($url, $options);
+  } elseif (module_exists('flowplayer')) {
+    // kjh: use a playlist to display the thumbnail if not auto playing
+    if ($poster) {
+      $options = array('playlist' => array($poster,
+                                           array('url' => urlencode($url),
+                                                 'autoPlay' => FALSE,
+                                                 'autoBuffering' => TRUE,
+                                           ),
+                                          ),
+      );
+    } else {
+      $options = array(
+                       'clip' => array('url' => urlencode($url),
+                                       'autoPlay' => FALSE,
+                                       'autoBuffering' => TRUE,
+                       ),
+      );
+    }
+    return theme(
+                  'flowplayer',
+                  $options,
+                  'vjs-flash-fallback',
+                  // adding 24px to height #973636
+                  array('style' => 'width:' . $width . 'px;height:' . $height + 24 . 'px;')
+    );
+  }
+}
diff -rupN original/theme/videojs.tpl.php new/theme/videojs.tpl.php
--- original/theme/videojs.tpl.php	2010-11-30 15:40:00.000000000 -0500
+++ new/theme/videojs.tpl.php	2011-01-07 10:47:14.000000000 -0500
@@ -6,61 +6,42 @@
  */
 ?>
 <!-- Begin VideoJS -->
-<div class="video-js-box" id="<?php print $player_id; ?>">
-  <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
-  <video id="<?php print $player_id; ?>" class="video-js" width="<?php print(variable_get('videojs_width', 640)) ?>" height="<?php print(variable_get('videojs_height', 264)) ?>" controls="controls" preload="auto" poster="<?php print $poster; ?>">
-    <?php //dd($items); ?>
-    <?php static $videojs_sources; ?>
-    <?php $codecs = array('video/mp4' => 'avc1.42E01E, mp4a.40.2', 'video/webm' => 'vp8, vorbis', 'video/ogg' => 'theora, vorbis', 'video/quicktime' => 'avc1.42E01E, mp4a.40.2'); ?>
-    <?php foreach ($items as $item): ?>
-    <?php $filepath = file_create_url($item['filepath']); ?>
-    <?php $mimetype = $item['filemime']; ?>
-    <?php if (array_key_exists($mimetype, $codecs)): ?>
-    <?php $mimetype = ($mimetype == 'video/quicktime') ? 'video/mp4' : $mimetype; ?>
-    <?php if($mimetype == 'video/mp4' || $mimetype == 'video/flv') $flash =  $filepath;?>
-    <?php $videojs_sources .= "<source src=\"$filepath\" type='$mimetype; codecs=\"" . $codecs[$mimetype] . "\"' />"; ?>
-    <?php endif; ?>
-    <?php endforeach; ?>
-    <?php print $videojs_sources; ?>
-        <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
-    <?php
-        if (module_exists('swftools')) {
-          $options = array(
-            'params' => array(
-              'width' => variable_get('videojs_width', 640),
-              'height' => variable_get('videojs_height', 264),
-            ),
-            'othervars' => array(
-              //@todo: swftools bug, can't enable this until they fix their pathing for the images.
-              'image' => $poster,
-            ),
-          );
-          $themed_output = swf($flash, $options);
-        } elseif (module_exists('flowplayer')) {
-          // kjh: use a playlist to display the thumbnail if not auto playing
-          if (!empty($poster)) {
-            $options = array(
-              'playlist' => array($poster,
-                array('url' => urlencode($flash),
-                  'autoPlay' => FALSE,
-                  'autoBuffering' => TRUE,
-                ),),);
-          } else {
-            $options = array(
-              'clip' => array('url' => urlencode($flash),
-                'autoPlay' => FALSE,
-                'autoBuffering' => TRUE,
-              ),);
-          }
-
-          $themed_output = theme(
-                  'flowplayer',
-                  $options,
-                  // adding 24px to height #973636
-                  array('style' => 'width:' . variable_get('videojs_width', 640) . 'px;height:' . variable_get('videojs_height', 264) + 24 . 'px;')
-          );
-        }
-    ?>
-  </video>
-</div>
-<!-- End VideoJS -->
\ No newline at end of file
+<?php if (count($items) > 0): ?>
+  <div class="video-js-box" id="<?php print $player_id; ?>">
+    <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
+    <video id="<?php print $player_id; ?>" class="video-js" width="<?php print($width)?>" height="<?php print($height)?>" controls="controls" preload="auto" poster="<?php print($poster)?>">
+      <?php foreach ($items as $item):?>
+      <?php $filepath = file_create_url($item['filepath']); ?>
+         <source src="<?php print(file_create_url($item['filepath']))?>" type="<?php print($item['videotype'])?>" />
+      <?php endforeach; ?>
+      <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
+      <?php
+        if (isset($flash_player)): ?>
+          <div class="vjs-flash-fallback">
+          <?php print($flash_player); ?>
+          </div>
+        <?php else: ?>
+        <object class="vjs-flash-fallback" width="<?php print($width)?>" height="<?php print($height)?>" type="application/x-shockwave-flash"
+          data="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf">
+          <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf" />
+          <param name="allowfullscreen" value="true" />
+          <param name="flashvars" value="config={'playlist': [ '<?php print($poster)?>', {'url': '<?php print($flash)?>', 'autoPlay':false, 'autoBuffering':true} ]}" />
+          <embed id="flash-<?php print $player_id; ?>"
+                 name="flash-<?php print $player_id; ?>"
+                 src="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf"
+                 width="<?php print($width)?>"
+                 height="<?php print($height)?>"
+                 type="application/x-shockwave-flash"
+                 allowscriptaccess='always'
+                 allowfullscreen='true'
+                 flashvars="config={'playlist': [ '<?php print($poster)?>', {'url': '<?php print($flash)?>', 'autoPlay':false, 'autoBuffering':true} ]}"
+          />
+          <!-- Image Fallback. Typically the same as the poster image. -->
+          <img src="<?php print($poster)?>" width="<?php print($width)?>" height="<?php print($height)?>" alt="Poster Image"
+            title="No video playback capabilities." />
+        </object>
+      <?php endif; //$flash_player  ?>
+    </video>
+  </div>
+<?php endif; ?>
+<!-- End VideoJS -->
