[mythtv] How to deal with dropped frames

Geoffrey Hausheer ou401cru02 at sneakemail.com
Tue Aug 12 10:53:37 EDT 2003

The reencoder still has a problem dealing with dropped frames.  During
recording, myth just ignores them, resyncing on the next key frame.  the
rncoder does effectively the same thing (though it treats the missing
frames as a (very short) comercial skip, and adjusts the key position.  I
was considering instead padding out the missing frames with 'no-change'
frames, but there is no way to know which frames between a set of keys
were dropped, so this will never work right.  It seems to me the better
solution is to deal with this during recording, and either write a
placeholder video frame (with no data), or call the encoder with either
the previous frame or NULL (i think at least in the case af avcodec,
sending NULL data results in the same result as a duplicate frame). 
Sending data to the encoder could of course make the problem worse,
assuming the dropped frames have to do with the CPU being heavily loaded.
 Creating a placeholder video frame with just a header and no data would
work I think, but would require changes to the mencoder/mplayer patches
again to deal with the new format.  Comments?  This is, unfortunately
hard to test, as i haven't found a reliable way to make my system drop
frames.  The point of all this would be to try to keep audio synced with
the video in cases where there was significant frame loss.



More information about the mythtv-dev mailing list