diff -ruN mythtv-0.24.1+fixes.20111005.c8c1582//mythtv/libs/libmythtv/firewirerecorder.cpp mythtv-0.24.1+fixes.20111005.c8c1582-asp1//mythtv/libs/libmythtv/firewirerecorder.cpp
--- mythtv-0.24.1+fixes.20111005.c8c1582//mythtv/libs/libmythtv/firewirerecorder.cpp	2011-10-05 19:00:33.985679727 -0300
+++ mythtv-0.24.1+fixes.20111005.c8c1582-asp1//mythtv/libs/libmythtv/firewirerecorder.cpp	2011-10-05 20:15:02.833245705 -0300
@@ -31,6 +31,8 @@
     if (!isopen)
         isopen = channel->GetFirewireDevice()->OpenPort();
 
+    memset(_stream_id,  0, sizeof(_stream_id));
+
     return isopen;
 }
 
@@ -140,7 +142,19 @@
         // Pass or reject packets based on PID, and parse info from them
         if (lpid == GetStreamData()->VideoPIDSingleProgram())
         {
-            _buffer_packets = !FindMPEG2Keyframes(&tspacket);
+            uint streamType = _stream_id[tspacket.PID()];
+
+            // Check for keyframes and count frames
+            if (streamType == StreamID::H264Video)
+            {
+                _buffer_packets = !FindH264Keyframes(&tspacket);
+                if (!_seen_sps)
+                    return;
+            }
+            else
+            {
+                _buffer_packets = !FindMPEG2Keyframes(&tspacket);
+            }
             BufferedWrite(tspacket);
         }
         else if (GetStreamData()->IsAudioPID(lpid))
@@ -216,6 +230,10 @@
     if (!pmt)
         return;
 
+    // collect stream types for H.264 (MPEG-4 AVC) keyframe detection
+    for (uint i = 0; i < pmt->StreamCount(); i++)
+        _stream_id[pmt->StreamPID(i)] = pmt->StreamType(i);
+
     int next = (pmt->tsheader()->ContinuityCounter()+1)&0xf;
     pmt->tsheader()->SetContinuityCounter(next);
     BufferedWrite(*(reinterpret_cast<const TSPacket*>(pmt->tsheader())));
diff -ruN mythtv-0.24.1+fixes.20111005.c8c1582//mythtv/libs/libmythtv/firewirerecorder.h mythtv-0.24.1+fixes.20111005.c8c1582-asp1//mythtv/libs/libmythtv/firewirerecorder.h
--- mythtv-0.24.1+fixes.20111005.c8c1582//mythtv/libs/libmythtv/firewirerecorder.h	2011-10-04 20:00:21.000000000 -0300
+++ mythtv-0.24.1+fixes.20111005.c8c1582-asp1//mythtv/libs/libmythtv/firewirerecorder.h	2011-10-05 20:03:51.108076079 -0300
@@ -63,6 +63,8 @@
     FirewireChannel       *channel;
     bool                   isopen;
     vector<unsigned char>  buffer;
+
+    unsigned char _stream_id[0x1fff + 1];
 };
 
 #endif //  _FIREWIRERECORDER_H_
