diff --git a/transcoders/video_ffmpeg.inc b/transcoders/video_ffmpeg.inc
index 3166895..c1ba87d 100644
--- a/transcoders/video_ffmpeg.inc
+++ b/transcoders/video_ffmpeg.inc
@@ -68,6 +68,10 @@ class video_ffmpeg implements transcoder_interface {
     // Total thumbs to generate
     $total_thumbs = variable_get('video_thumbs', 5);
     $videofile = escapeshellarg($video['filepath']);
+    if (!file_exists($videofile)) {
+      return FALSE;
+    }
+
     //get the playtime from the current transcoder
     $duration = $this->get_playtime($video['filepath']);
 
@@ -213,8 +217,12 @@ class video_ffmpeg implements transcoder_interface {
    */
   public function get_video_info($video) {
     static $command_ouput;
-    if (!empty($command_output))
+    if (!empty($command_output)) {
       return $command_output;
+    }
+    if (!file_exists($video)) {
+      return FALSE;
+    }
 
     $file = escapeshellarg($video);
     // Execute the command
@@ -228,6 +236,9 @@ class video_ffmpeg implements transcoder_interface {
    */
   public function get_playtime($video) {
     $ffmpeg_output = $this->get_video_info($video);
+    if (empty($ffmpeg_output)) {
+      return FALSE;
+    }
     // Get playtime
     $pattern = '/Duration: ([0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9])/';
     preg_match_all($pattern, $ffmpeg_output, $matches, PREG_PATTERN_ORDER);
@@ -248,6 +259,10 @@ class video_ffmpeg implements transcoder_interface {
   public function get_dimensions($video) {
     $ffmpeg_output = $this->get_video_info($video);
     $res = array('width' => 0, 'height' => 0);
+    if (empty($ffmpeg_output)) {
+      return $res;
+    }
+
     // Get dimensions
     $regex = ereg('[0-9]?[0-9][0-9][0-9]x[0-9][0-9][0-9][0-9]?', $ffmpeg_output, $regs);
     if (isset($regs[0])) {
@@ -541,5 +556,3 @@ class video_ffmpeg implements transcoder_interface {
   }
 
 }
-
-?>
diff --git a/video.module b/video.module
index 234f828..920c378 100644
--- a/video.module
+++ b/video.module
@@ -291,7 +291,7 @@ function video_cron() {
  * Implementation of hook_form_alter()
  * @param string $form
  * @param <type> $form_state
- * @param <type> $form_id 
+ * @param <type> $form_id
  */
 function video_form_alter(&$form, &$form_state, $form_id) {
   if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] . '_node_form' == $form_id) {
@@ -698,7 +698,7 @@ function video_upload_manual_thumb(&$element) {
 
 /*
  * Function updates our options list to show matching aspect ratios and if we have a matching resolution.
- * 
+ *
  * We will update the options array by reference and return the aspect ratio of the file.
  */
 
@@ -723,7 +723,7 @@ function _video_dimensions_options(&$options, $video) {
 
 /*
  * Returns the width/height and aspect ratio of the video
- * 
+ *
  * @todo: move this to the transcoder class instead?
  */
 
