Opened 15 years ago

Closed 15 years ago

#2355 closed defect (fixed)

Loss of A/V sync in playback with standard decoder

Reported by: bhuffman@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version:
Severity: medium Keywords:
Cc: Ticket locked: no


SVN 11064 - I'm seeing loss of sync (or inability to maintain sync) in playback of both DVDs and videos using the standard decoder. Both of these work fine using the libmpeg2 decoder. I'm attaching output with "-v playback"

Attachments (1)

output.txt (37.5 KB) - added by bhuffman@… 15 years ago.

Download all attachments as: .zip

Change History (6)

Changed 15 years ago by bhuffman@…

Attachment: output.txt added

comment:1 Changed 15 years ago by Isaac Richards

Priority: blockerminor

comment:2 Changed 15 years ago by bhuffman@…

I can't find a revision where this works. I've gone all the way back to revision 9875 (early May) and still have this problem. Honestly, I can't remember if I've ever successfully used the Internal playback for Video. I know that it's worked for DVDs. As far as standard recordings, I don't see this - perhaps it's only happening on progressive recordings? All of my TV recordings are interlaced (ivtv capture via svideo).

Anyway - here's a little more info: It seems like there's always some initial "glitch" that throws off the sync. Or in the case of one DVD that I have (Madagasgar), it can't seem to ever quite get in sync. But with the standard decoder on my system, once it's out of sync, it can't seem to get back in. I just keep getting "Write Audio: buffer underrun" messages. If I do a quick fast forward and then play again, that fixes it (at least temporarily - I haven't watched for long).

Using libmpeg2 in all cases that I've tested at least allow the decoder to get back in sync. I still see small glitches in some of my ripped DVDs (I see a message about SUBTITLES in the output of mythfrontend right before this glitch - is it something with DVDNAV packets?), but libmpeg2 seems to be able to re-sync the audio and video after this glitch where the standard decoder can not.

comment:3 Changed 15 years ago by bhuffman@…

This small patch by Martin Ebourne at least works around the problem for me.

--- 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;

comment:4 Changed 15 years ago by bhuffman@…

This appears to be only in my videos (that have been ripped from DVD). The problem with the DVD A/V sync has been resolved by skamithi in commit #11275. I don't see this in recordings, but I only record SD (via PVR-250).

comment:5 Changed 15 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [11324]) Disable the automatic bits of WrapTimecode?. If this causes any problems, I will need sample videos.

Fixes #2471, #2355, possibly others..

Note: See TracTickets for help on using tickets.