Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4685 closed defect (fixed)

MythDVD playback chunks out

Reported by: Greg Grotsky <spikeygg@…> Owned by: skamithi
Priority: minor Milestone: 0.21.1
Component: mythtv Version: head
Severity: medium Keywords: MythDVD Playback
Cc: Ticket locked: no

Description

I'm currently running SVN 15728, however, I have had this issue for a long time (years) and I've never had it be as repeatable as it is on Lord of the Rings, Return of the King.

When playing a DVD back using MythDVD the playback becomes choppy and sometimes even cause the audio to cut out. The problems appear to happen on the chapter breaks though I'm not fully convinced that it's only at chapter breaks. This happens almost randomly on some DVDs but it's definitely a problem in the MythDVD software because I have no issues like this using Xine. See this link for an example of what it looks like (17MB wmv):

MythDVD Playback Issue Video

Also, the following is a "mythfrontend -v playback" log showing what the frontend is doing when the chunking happens.

'video_output' mean = '41561.92', std. dev. = '8614.47', fps = '24.06'
'video_output' mean = '41901.58', std. dev. = '8360.99', fps = '23.87'
2008-02-16 09:20:22.348 NVP: 400 progressive frames seen.
'video_output' mean = '41566.01', std. dev. = '8538.73', fps = '24.06'
'video_output' mean = '41731.62', std. dev. = '8543.02', fps = '23.96'
'video_output' mean = '41731.22', std. dev. = '8549.31', fps = '23.96'
'video_output' mean = '41733.19', std. dev. = '8344.59', fps = '23.96'
2008-02-16 09:20:39.055 NVP: 800 progressive frames seen.
'video_output' mean = '41732.51', std. dev. = '8358.34', fps = '23.96'
'video_output' mean = '41563.39', std. dev. = '8540.06', fps = '24.06'
2008-02-16 09:20:50.147 DVDNAV_CELL_CHANGE: pg_length == 43815000, pgc_length == 688815000, cell_start == 195234000, pg_start == 156324000, title == 2, part == 8 titleParts 37
2008-02-16 09:20:50.147 DVDNAV_SPU_CLUT_CHANGE happened.
2008-02-16 09:20:50.147 DVDNAV_SPU_STREAM_CHANGE: physical_wide==-1, physical_letterbox==-1, physical_pan_scan==-1, current_track==-1, total count 4
2008-02-16 09:20:50.148 DVDNAV_AUDIO_STREAM_CHANGE: Current Active Stream 0 Track Count 2
2008-02-16 09:20:50.148 AFD: DVD Cell Changed. Update framesPlayed: 65004
2008-02-16 09:20:50.212 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.279 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.346 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.414 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.481 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.548 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.616 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.683 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.750 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.817 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.885 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:50.952 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.019 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.087 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.154 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.221 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.289 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.356 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.423 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.491 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.558 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.625 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.693 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.760 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.827 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:51.895 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
'video_output' mean = '48294.07', std. dev. = '13498.53', fps = '20.71'
2008-02-16 09:20:51.962 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.029 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.096 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.164 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.231 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.298 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.366 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.416 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.484 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.551 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.618 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.686 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.753 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.820 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.888 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:52.955 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.022 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.090 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.157 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.224 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.291 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.359 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.426 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.493 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.561 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.628 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.695 NVP: Video is 30 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.702 WriteAudio: buffer underrun
2008-02-16 09:20:53.763 NVP: Video is 15.1441 frames ahead of audio,
                        doubling video frame interval to slow down.
2008-02-16 09:20:53.830 NVP: Video is 7.89226 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.830 NVP: Video is 15.0078 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.830 NVP: Video is 19.9698 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.830 NVP: Video is 23.4365 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.830 NVP: Video is 25.662 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.830 NVP: Video is 27.0838 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 27.7755 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 28.047 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 27.876 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 27.4931 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 26.8312 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 26.0875 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 25.1552 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 24.2011 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 23.1185 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 22.0592 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 20.8902 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 19.7661 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 18.5409 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 17.3748 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 16.1255 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 14.9413 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.831 NVP: Video is 13.6786 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.832 NVP: Video is 12.4767 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.832 NVP: Video is 11.2007 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.832 NVP: Video is 9.99649 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.832 NVP: Video is 8.71867 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.832 NVP: Video is 7.50554 frames behind audio (too slow), dropping frame to catch up.
2008-02-16 09:20:53.832 NVP: prebuffering pause
2008-02-16 09:20:53.832 NVP: Waiting for prebuffer.. 0 AAAAAAAALaAAAAAAALAAAAAAAAAUAAA
2008-02-16 09:20:53.833 WriteAudio: buffer underrun
2008-02-16 09:20:53.897 NVP: Video is 6.22106 frames behind audio (too slow), dropping frame to catch up.
'video_output' mean = '37020.85', std. dev. = '26138.20', fps = '27.01'
2008-02-16 09:20:55.917 NVP: 1200 progressive frames seen.
'video_output' mean = '41566.42', std. dev. = '8524.80', fps = '24.06'
'video_output' mean = '41732.77', std. dev. = '8367.21', fps = '23.96'
'video_output' mean = '41732.38', std. dev. = '8549.20', fps = '23.96'
'video_output' mean = '41730.99', std. dev. = '8355.10', fps = '23.96'
2008-02-16 09:21:12.577 NVP: 1600 progressive frames seen.

Attachments (3)

ticket_4685_potential_fix.diff (1.8 KB) - added by skamithi 12 years ago.
trust pts and do not manipulate it.
mythdvd_error2.txt (12.0 KB) - added by Greg Grotsky <spikeygg@…> 12 years ago.
Error obtained while using code with patch #1
ticket_4685_potential_fix_#2.diff (2.9 KB) - added by skamithi 12 years ago.

Download all attachments as: .zip

Change History (18)

Changed 12 years ago by skamithi

trust pts and do not manipulate it.

comment:1 Changed 12 years ago by skamithi

Component: mythdvdmythtv
Owner: changed from Anduin Withers to skamithi
Status: newassigned
Version: unknownhead

comment:2 Changed 12 years ago by skamithi

greg pls test patch.

Changed 12 years ago by Greg Grotsky <spikeygg@…>

Attachment: mythdvd_error2.txt added

Error obtained while using code with patch #1

comment:3 Changed 12 years ago by Greg Grotsky <spikeygg@…>

Tested patch against SVN 16116, no dice, same failure. Error messages from latest attempt attached to ticket.

comment:4 Changed 12 years ago by skamithi

Status: assignedinfoneeded

attach the "-v playback,audio,timestamp" debug output of the affected section highlighted in the previous logs. gzip the output since this is alot of data.

comment:5 Changed 12 years ago by skamithi

Status: infoneededassigned

oh pls capture the debugs with my patch applied. thanks.

comment:6 Changed 12 years ago by Greg Grotsky <spikeygg@…>

Here's a link to the 327k gzipped log file of "mythfrontend -v playback,audio,timestamp":

http://www.spartanframeworks.com/Spikey/big_dvd_debug2.txt.gz

This was run to 16116 with your patch applied. Let me know if you need anything else, thanks Stanley.

-Greg

Changed 12 years ago by skamithi

comment:7 Changed 12 years ago by anonymous

I tried the second patch on SVN 16148 and it made the playback around the broken section a little worse. Here's the resulting log file (437kb): http://www.spartanframeworks.com/Spikey/mythdvd_error3.txt.gz

comment:8 Changed 12 years ago by stuartm

Status: assignedinfoneeded

Could you update to latest trunk or 0.21-fixes and let us know if the problem still exists.

comment:9 Changed 12 years ago by Greg Grotsky <spikeygg@…>

I have updated to SVN 16517 and the problem persists, exactly the same as in my first video. I have captured a log of the result but I cannot upload it now due to server problems. If you would like to see it I can email it directly to you (335k), let me know.

comment:10 in reply to:  9 Changed 12 years ago by Greg Grotsky

In reference to Greg Grotsky <spikeygg@gmail.com>:

I have updated to SVN 16517 and the problem persists, exactly the same as in my first video. I have captured a log of the result but I cannot upload it now due to server problems. If you would like to see it I can email it directly to you (335k), let me know.

Here is a link to the log of SVN 16517: http://www.spartanframeworks.com/Spikey/mythdvd_svn16517.txt.gz

comment:11 Changed 12 years ago by skamithi

Milestone: unknown0.21.1
Status: infoneededassigned

greg. no need for any more logs. I found a dvd that reproduces the issue more times then the lord of the rings. problem here is that after some cell changes, the audio timestamp resets to 0 before the video timestamp. avsync code takes a while to restore sync causing the "chunking out" effect.

working on a solution.

comment:12 Changed 12 years ago by skamithi

(In [17158]) Refs #4685. resolves internal dvd player jitter problems when the pts resets during a title.

comment:13 Changed 12 years ago by skamithi

Resolution: fixed
Status: assignedclosed

(In [17159]) Closes #4685. apply [17158] to 0.21 fixes

comment:14 Changed 12 years ago by skamithi

(In [17436]) Refs #4685. internal dvd player: fix for jitter issue causes some avsync problems on some dvds. value set is too low. increasing num.

comment:15 Changed 12 years ago by skamithi

(In [17437]) Refs #4685: internal dvd player. apply [17436] to 0.21 fixes

Note: See TracTickets for help on using tickets.