[mythtv] Ticket #2355: Loss of A/V sync in playback with standard decoder

Martin Ebourne lists at ebourne.me.uk
Mon Sep 11 22:32:03 UTC 2006


On Sat, 09 Sep 2006 16:42:36 -0400, Brian C. Huffman wrote:
> On Sat, 2006-09-09 at 16:35 -0400, Isaac Richards wrote:
>> Because it works fine for me, and you provided no way for me to reproduce 
>> things?  Because I'm very, very tired of people completely ignoring the 
>> TicketHowTo (linked to on the 'new ticket' page) as well as repeated requests 
>> not to play with the severity/priority/milestone settings?
>> 
>> If you want to provide additional debugging, please try finding out what 
>> revision the problem showed up in.
>> 
> 
> Fair enough.  How much time do I have to find this before .20 comes
> out?  ;-)

This sounds quite similar to problems I had which I reported here:

http://www.gossamer-threads.com/lists/mythtv/dev/204857

I suggested a possible workaround but unfortunately there wasn't really
a response to that email and I didn't get round to chasing it up. It's
definitely broken for some vob and mpg files.

I've been running with the below patch in my tree ever since then and it
has worked well for me. If it's considered an acceptable fix I'll submit
it to trac properly.

As to the seeking problems that could be a lack of seek table and the
problem with not using gop by frame. There's a proper ticket for the gop
issue (trac is disabled at the moment though so can't look for it) and the
devs want a real fix not a hack (see second patch for the hack) which is
reasonable. If there was a bit of guidance on what the proper fix should
include (esp. wrt database upgrade if required) I might code that one up
myself. Once you've got the gop hack in you need to run 'mythcommflag
--video <full-path-to-file>' to build the seek table.

After these two changes all my videos and vobs work well in the
internal player which I've been using exclusively for ages. I use ffmpeg
but libmpeg2 works as well (as far as I've tried).

Cheers,

Martin.

(Sorry, can't do attachments in pan)

mythtv-disable-wraptimecode.patch

--- libs/libmythtv/NuppelVideoPlayer.cpp        (revision 9953)
+++ libs/libmythtv/NuppelVideoPlayer.cpp        (working copy)
@@ -3329,6 +3329,11 @@
 
 void NuppelVideoPlayer::WrapTimecode(long long &timecode, TCTypes tc_type) 
 {
+    if (!ringBuffer->LiveMode())
+    {
+        return;
+    }
+
     if ((tc_type == TC_AUDIO) && (tc_wrap[TC_AUDIO] == LONG_LONG_MIN))
     {
         long long newaudio;


mythtv-gop-byframe.patch

--- libs/libmythtv/avformatdecoder.cpp  (revision 9953)
+++ libs/libmythtv/avformatdecoder.cpp  (working copy)
@@ -859,17 +859,8 @@
         }
 
         // we will not see a position map from db or remote encoder,
-        // set the gop interval to 15 frames.  if we guess wrong, the
-        // auto detection will change it.
-        keyframedist = 15;
-        positionMapType = MARK_GOP_START;
-
-        if (!strcmp(fmt->name, "avi"))
-        {
-            // avi keyframes are too irregular
-            keyframedist = 1;
-            positionMapType = MARK_GOP_BYFRAME;
-        }
+        keyframedist = 1;
+        positionMapType = MARK_GOP_BYFRAME;
     }
 
     // Don't build a seek index for MythTV files, the user needs to



More information about the mythtv-dev mailing list