Index: libs/libmythtv/recorderbase.cpp
===================================================================
--- libs/libmythtv/recorderbase.cpp	(revision 19149)
+++ libs/libmythtv/recorderbase.cpp	(working copy)
@@ -294,6 +294,9 @@ void RecorderBase::AspectChange(AspectRatio aspect
         case ASPECT_21_1_1 :
             mark = MARK_ASPECT_21_1_1;
             break;
+        case ASPECT_OTHER :
+            mark = MARK_ASPECT_OTHER;
+            break;
         default :
             mark = MARK_ASPECT_4_3;
     }
Index: libs/libmythtv/dtvrecorder.cpp
===================================================================
--- libs/libmythtv/dtvrecorder.cpp	(revision 19149)
+++ libs/libmythtv/dtvrecorder.cpp	(working copy)
@@ -483,6 +483,7 @@ bool DTVRecorder::FindH264Keyframes(const TSPacket
         _start_code = 0xffffffff;
     }
 
+    uint aspectRatio = 0;
     uint height = 0;
     uint width = 0;
 
@@ -567,9 +568,11 @@ bool DTVRecorder::FindH264Keyframes(const TSPacket
                 hasKeyFrame = m_h264_parser.onKeyFrameStart();
                 hasFrame = true;
                 _seen_sps |= hasKeyFrame;
+            
+                width = m_h264_parser.pictureWidth();
+                height = m_h264_parser.pictureHeight();
+                aspectRatio = m_h264_parser.aspectRatio();
             }
-            width = m_h264_parser.pictureWidth();
-            height = m_h264_parser.pictureHeight();
         }
     } // for (; i < TSPacket::SIZE; i++)
 
@@ -586,6 +589,12 @@ bool DTVRecorder::FindH264Keyframes(const TSPacket
             _frames_written_count++;
     }
 
+    if ((aspectRatio > 0) && (aspectRatio != m_videoAspect))
+    {
+        m_videoAspect = aspectRatio;
+        AspectChange((AspectRatio)aspectRatio, _frames_written_count);
+    }
+
     if (height && width && (height != m_videoHeight || m_videoWidth != width))
     {
         m_videoHeight = height;
Index: libs/libmythtv/recorderbase.h
===================================================================
--- libs/libmythtv/recorderbase.h	(revision 19149)
+++ libs/libmythtv/recorderbase.h	(working copy)
@@ -217,7 +217,8 @@ class MPUBLIC RecorderBase
         ASPECT_1_1           = 0x01,
         ASPECT_4_3           = 0x02,
         ASPECT_16_9          = 0x03,
-        ASPECT_21_1_1         = 0x04
+        ASPECT_21_1_1        = 0x04,
+        ASPECT_OTHER         = 0x05,
     };
 
   protected:
Index: libs/libmythtv/mpeg/H264Parser.h
===================================================================
--- libs/libmythtv/mpeg/H264Parser.h	(revision 19147)
+++ libs/libmythtv/mpeg/H264Parser.h	(working copy)
@@ -108,6 +108,10 @@ class H264Parser {
     uint pictureWidth(void) const { return pic_width; }
     uint pictureHeight(void) const { return pic_height; }
 
+    /** \brief Computes aspect ratio from picture size and sample aspect ratio
+     */
+    uint aspectRatio(void) const;
+
     uint64_t frameAUstreamOffset(void) const {return frame_start_offset;}
     uint64_t keyframeAUstreamOffset(void) const {return keyframe_start_offset;}
 
@@ -177,6 +181,7 @@ class H264Parser {
     uint       frame_crop_right_offset;
     uint       frame_crop_top_offset;
     uint       frame_crop_bottom_offset;
+    uint8_t    aspect_ratio_idc;
     uint       sar_width, sar_height;
 
     uint64_t   AU_offset, frame_start_offset, keyframe_start_offset;
Index: libs/libmythtv/mpeg/H264Parser.cpp
===================================================================
--- libs/libmythtv/mpeg/H264Parser.cpp	(revision 19147)
+++ libs/libmythtv/mpeg/H264Parser.cpp	(working copy)
@@ -7,8 +7,10 @@ extern "C" {
 #include "avcodec.h"
 }
 
-// #include <math.h>
+#include <cmath>
 
+static const float eps = 1E-5;
+
 /*
   Most of the comments below were cut&paste from ITU-T Rec. H.264
   as found here:  http://www.itu.int/rec/T-REC-H.264/e
@@ -129,6 +131,7 @@ void H264Parser::Reset(void)
     pic_width = pic_height = 0;
     frame_crop_left_offset = frame_crop_right_offset = 0;
     frame_crop_top_offset = frame_crop_bottom_offset = 0;
+    aspect_ratio_idc = 0;
     sar_width = sar_height = 0;
 
     AU_offset = frame_start_offset = keyframe_start_offset = 0;
@@ -819,7 +822,7 @@ void H264Parser::vui_parameters(GetBitContext * gb
           present, aspect_ratio_idc value shall be inferred to be
           equal to 0.
          */
-        uint8_t aspect_ratio_idc = get_bits(gb, 8);
+        aspect_ratio_idc = get_bits(gb, 8);
 
         switch (aspect_ratio_idc)
         {
@@ -921,3 +924,87 @@ void H264Parser::vui_parameters(GetBitContext * gb
     else
         sar_width = sar_height = 0;
 }
+
+uint H264Parser::aspectRatio(void) const
+{
+
+    double aspect = 0.0;
+
+    if (pic_height)
+        aspect = pic_width / (double)pic_height;
+
+    switch (aspect_ratio_idc)
+    {
+        case 0:
+            // Unspecified
+            break;
+        case 1:
+            // 1:1
+            break;
+        case 2:
+            // 12:11
+            aspect *= 1.0909090909090908;
+            break;
+        case 3:
+            // 10:11
+            aspect *= 0.90909090909090906;
+            break;
+        case 4:
+            // 16:11
+            aspect *= 1.4545454545454546;
+            break;
+        case 5:
+            // 40:33
+            aspect *= 1.2121212121212122;
+            break;
+        case 6:
+            // 24:11
+            aspect *= 2.1818181818181817;
+            break;
+        case 7:
+            // 20:11
+            aspect *= 1.8181818181818181;
+            break;
+        case 8:
+            // 32:11
+            aspect *= 2.9090909090909092;
+            break;
+        case 9:
+            // 80:33
+            aspect *= 2.4242424242424243;
+            break;
+        case 10:
+            // 18:11
+            aspect *= 1.6363636363636365;
+            break;
+        case 11:
+            // 15:11
+            aspect *= 1.3636363636363635;
+            break;
+        case 12:
+            // 64:33
+            aspect *= 1.9393939393939394;
+            break;
+        case 13:
+            // 160:99
+            aspect *= 1.6161616161616161;
+            break;
+        case EXTENDED_SAR:
+            if (sar_height)
+                aspect *= sar_width / (double)sar_height;
+            else
+                aspect = 0.0;
+            break;
+    }
+
+    if (aspect == 0.0)
+        return 0;
+    if (fabs(aspect - 1.3333333333333333) < eps)
+        return 2;
+    if (fabs(aspect - 1.7777777777777777) < eps)
+        return 3;
+    if (fabs(aspect - 2.21) < eps)
+        return 4;
+    
+    return 5;
+}
Index: libs/libmythtv/programinfo.h
===================================================================
--- libs/libmythtv/programinfo.h	(revision 19149)
+++ libs/libmythtv/programinfo.h	(working copy)
@@ -46,6 +46,7 @@ typedef enum {
     MARK_ASPECT_4_3    = 11,
     MARK_ASPECT_16_9   = 12,
     MARK_ASPECT_21_1_1 = 13,
+    MARK_ASPECT_OTHER  = 14,
     MARK_VIDEO_WIDTH   = 30,
     MARK_VIDEO_HEIGHT  = 31,
 } MarkTypes;
