--- bindings/perl/MythTV/Recording.pm	(revision 22186)
+++ bindings/perl/MythTV/Recording.pm	(working copy)
@@ -309,7 +309,7 @@
     # Grab the info we want from mplayer (go uber-verbose to override --really-quiet)
         my $data = `$program -v -v -v -v -nolirc -nojoystick -vo null -ao null -frames 1 -identify '$file' 2>/dev/null`;
         study $data;
-        ($info{'video_type'})            = $data =~ m/^VIDEO:\s*(MPEG[12])/m;
+        ($info{'video_type'})            = $data =~ m/^VIDEO:?\s*(MPEG[12]|H264)/m;
         ($info{'width'})                 = $data =~ m/^ID_VIDEO_WIDTH=0*([1-9]\d*)/m;
         ($info{'height'})                = $data =~ m/^ID_VIDEO_HEIGHT=0*([1-9]\d*)/m;
         ($info{'fps'})                   = $data =~ m/^ID_VIDEO_FPS=0*([1-9]\d*(?:\.\d+)?)/m;
@@ -321,6 +321,14 @@
         ($info{'aspect'})                = $data =~ m/^ID_VIDEO_ASPECT=0*([1-9]\d*(?:[\.\,]\d+)?)/m;
         ($info{'audio_type'})            = $data =~ m/^ID_AUDIO_CODEC=0*([1-9]\d*(?:\.\d+)?)/m;
         ($info{'mpeg_stream_type'})      = $data =~ m/^ID_DEMUXER=(\w+)/mi;
+        if (!defined($info{'width'})) 
+            {
+               my $altdata = `$program -v -v -v -v -nolirc -nojoystick -vo null -ao null -frames 1 -identify -demuxer lavf '$file' 2>/dev/null`;
+               study $altdata;
+               ($info{'width'}) = $altdata =~ m/^ID_VIDEO_WIDTH=0*([1-9]\d*)/m;
+             ($info{'height'})  = $altdata =~ m/^ID_VIDEO_HEIGHT=0*([1-9]\d*)/m;
+            } 
+
     # Stream type
         $info{'mpeg_stream_type'} = lc($info{'mpeg_stream_type'});
         if ($info{'mpeg_stream_type'} && $info{'mpeg_stream_type'} !~ /^mpeg/) {

