[mythtv] Problems with NVP::WrapTimecode

Martin Ebourne lists at ebourne.me.uk
Sun May 21 00:30:11 UTC 2006

I've got a whole bunch of videos that don't play properly in MythVideo
using the Internal player. Mostly these are DVD feature rips (not ISO),
but also some edited camcorder output.

The symptoms are various: broken a/v sync, audio dropping out, frame
rate and audio playback doubling in speed. All are fixable by seeking
backwards 10s after the initial problem, and all seem ok in mplayer.
Some work ok with libmpeg2 rather than ffmpeg but it doesn't help all of
them. (libmpeg2 seems to handle stream data corruption better and those
are the cases it appears to help with.)

I've been debugging it today to find the problem (mostly using ffmpeg),
and it all comes down to NVP::WrapTimecode. I'm seeing different
problems in different files, but when I disable WrapTimecode they all
play ok.

One example is a DVD rip which appears to have a bit of corruption. The
video timecode jumps back briefly before catching up with where it
originally was, the audio timecode is continuous. With WrapTimecode
active this causes the adjusted video timecode to be way ahead of the
audio and the sound just dies.

Another example is edited camcorder video. With this one the audio and
video timecodes jump around all over the place, and not always at the
same time. eg. The audio timecode is in the 33,000's then up at 95
million for a brief while, then back to -600 incrementing sensibly
through into positive numbers for quite a while. In this case the video
timebase resets just once, from about 32,000 to 229 after the audio
timecode has gone negative and got back up to 1,200 again!

I haven't come up with a way of fixing WrapTimecode, in fact I'm not
sure we could in its current form since it can only apply guesswork as
to what has really happened and cannot distinguish all the cases.

I notice that the new DVD playback code disables the WrapTimecode
completely (just does not call it). Is that the correct solution for
MythVideo as well? If so I'll make a patch up for that one.



More information about the mythtv-dev mailing list