--- video/transcoders/video_ffmpeg.inc	2011-04-22 07:08:50.000000000 +0200
+++ video_ffmpeg.inc	2011-04-28 14:39:12.000000000 +0200
@@ -253,11 +253,10 @@
     $ffmpeg_output = $this->get_video_info($video);
     $res = array('width' => 0, 'height' => 0);
     // Get dimensions
-    $regex = preg_match('/([0-9]{1,5})x([0-9]{1,5})/', $ffmpeg_output, $regs);
+    $regex = preg_match('/Stream #.*:.*\s([0-9]{1,5})x([0-9]{1,5})/', $ffmpeg_output, $regs);
     if (isset($regs[0])) {
-      $dimensions = explode("x", $regs[0]);
-      $res['width'] = $dimensions[0] ? $dimensions[0] : NULL;
-      $res['height'] = $dimensions[1] ? $dimensions[1] : NULL;
+      $res['width'] = $regs[1];
+      $res['height'] = $regs[2];
     }
     return $res;
   }
