Opened 15 years ago

Closed 14 years ago

#7067 closed defect (fixed)

Initial DVD playback speed too fast.

Reported by: Johnny Stenback <mythtv@…> Owned by: Janne Grunau
Priority: major Milestone: 0.24
Component: MythTV - Video Playback Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When playing a ripped DVD (.iso), the initial playback speed is on the order of 2x of what it should be. The audio plays back at the right speed, but the video plays too fast. I can't say for sure that I see this with every single DVD, but the ones I've tried with do show this problem. If I skip forward/back (PgUp/PgDown?) the video and audio re-syncs, but the video speed remains too fast, if I fast forward and hit play again, the speed drops down to the expected 1x, and the video and audio stay in sync.

This is all with the internal player, using VDPAU on an Nvidia ION system. I'm happy to provide any additional info that would help out here. I *think* this behavior started on trunk a couple of weeks ago, but I don't have version numbers to back that up :( But I do see it with trunk versions from the last couple of weeks for sure.

Attachments (16)

frontend.log (135.9 KB) - added by Johnny Stenback <mythtv@…> 14 years ago.
Frontend log using software decoder/xv rendering
patch2.txt (2.4 KB) - added by Davin McCall <davmac@…> 14 years ago.
Patch to fix #7067
patch2.2.txt (1.2 KB) - added by Davin McCall <davmac@…> 14 years ago.
A simpler patch for #7067.
patch2.3.txt (1.1 KB) - added by Davin McCall <davmac@…> 14 years ago.
Fix for #7067 incorporating additional fixes to prevent liveTV problems
t7067_setscan_extra_checks.diff (2.3 KB) - added by skamithi 14 years ago.
patch that should prevent the excess SetScanType?() processing from Taylor Ralph
mythtv.patch (13.9 KB) - added by Davin McCall <davmac@…> 14 years ago.
New patch for trunk. Solves problem for DVDs without menus.
mythtv.2.patch (14.4 KB) - added by Davin McCall <davmac@…> 14 years ago.
Updated patch, applies to current trunk (23321)
mythtv.3.patch (13.8 KB) - added by Davin McCall <davmac@…> 14 years ago.
Cut down version of the patch; minimal changes to remove frame interval knowledge from vsync
mythtv.4.patch (13.8 KB) - added by Davin McCall <davmac@…> 14 years ago.
Another patch. Same as the last, but corrects the tolerance for checking whether framerate can be doubled.
mythtv.5.patch (13.8 KB) - added by Davin McCall <davmac@…> 14 years ago.
And another one, corrects *both* instances of the the m_can_double check.
mythtv.6.patch (13.8 KB) - added by Davin McCall <davmac@…> 14 years ago.
Trying again.
mythtv.patch3 (13.4 KB) - added by Davin McCall <davmac@…> 14 years ago.
Updated patch, applies to current trunk (23844)/
mythtv7067.patch (12.1 KB) - added by Davin McCall <davmac@…> 14 years ago.
Updated patch, applies to current trunk (25150)
t7067_avsync_improvements.diff (12.7 KB) - added by tralph 14 years ago.
fix a couple issues with previous patch
t7067_avsync_improvements_rev2.diff (12.7 KB) - added by tralph 14 years ago.
remove deprecated isDVD() call and fix typo
t7067_avsync_improvements_rev3.diff (11.7 KB) - added by tralph 14 years ago.
move code segment back to original location since it may not be necessary any longer

Download all attachments as: .zip

Change History (52)

comment:1 Changed 15 years ago by robertm

Component: Plugin - MythVideoMythTV - Video Playback
Owner: changed from Anduin Withers to Janne Grunau

comment:2 Changed 14 years ago by Janne Grunau

Status: newinfoneeded_new

please check if the problem persist with the software decoder/xv rendering and without deinterlacer and attach -v playback log of the frontend

comment:3 Changed 14 years ago by Johnny Stenback <mythtv@…>

The problem does persist with software decoder (w/o an deinterlacer) as well as with VDPAU, across different hardware setups even. I'll get logs attached a bit later today.

Changed 14 years ago by Johnny Stenback <mythtv@…>

Attachment: frontend.log added

Frontend log using software decoder/xv rendering

comment:4 Changed 14 years ago by anonymous

If it's of any value I can get you a -v playback log on a frontend using VDPAU as well, but it's a bit tricky for me to capture a complete log there so if it won't be useful I won't bother.

comment:5 Changed 14 years ago by Johnny Stenback <mythtv@…>

Oh, and I forgot to mention what I did in that log I attached last night. The log shows the frontend starting up, me finding the DVD SAHARA.iso and playing it. Once playback starts (previews etc), I hit menu, jumped to the root menu and hit play. Right from the start of the DVD (i.e. in the previews and in the menus) I see the video playing too fast. Once the actual movie starts, I skipped a coupled of chapters into the movie (it's more obvious that the playback is way too fast once there's people involved) and then hit fast forward, followed by pause (meant to hit play), and then play. After that playback speed settles to the correct speed, and remains correct for the whole movie if I was to let it play.

comment:6 Changed 14 years ago by Johnny Stenback <mythtv@…>

Any more information I can provide here?

comment:7 Changed 14 years ago by joe@…

I can confirm this bug. I have the identical issue playing actual DVD's, and .iso images from an NFS share. I opened ticket #7349

Lets compare notes: I don't use any GPU acceleration (I use an ATI card with binary drivers), nor do I use any deinterlacing. I can play .img files (created on my Mac) with no problems, which seems strange because I would expect DVD image formats to work similarly if the problem is with DVD playback. I am using an older Dell Optiplex GX260 (2.5 Ghz, 1GB, 845G chipset), running Mythbuntu 9.10 Beta, fully updated. Issue presented with all 0.22 versions tested, though I am currently running the daily builds of 0.22 trunk.

Notice any similarities?

comment:8 Changed 14 years ago by Johnny Stenback <mythtv@…>

I see the problem with a Zotac IONITX motherboard based diskless frontend using VDPAU, and I also see it playing back the DVDs under VNC where there is no GPU, so it's all done in software. I however do *not* see this problem on a different system I recently upgraded from 0.21 to 0.22 pre1, and that system is using an old Nvidia GeForce? 6200 graphics card for playback.

comment:9 Changed 14 years ago by joe@…

I am leaving it to developer to determine if these are duplicates, but in addition to this ticket I opened #7349 (prior to seeing this ticket), and just found #7430 which appears similar.

comment:10 Changed 14 years ago by JYA

I've seen this issue with a few DVDs here as well ... Sound is good but video playback is twice the speed. Using trunk

comment:11 Changed 14 years ago by sphery

In http://www.gossamer-threads.com/lists/mythtv/dev/405050#405050 (DVD playback issues, from revision 22120 onwards), Davin McCall? found that [22120] introduced the issue.

comment:12 Changed 14 years ago by Davin McCall <davmac@…>

I have posted a patch which may address this problem, please see: http://mythtv.org/pipermail/mythtv-dev/2009-November/066644.html

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: patch2.txt added

Patch to fix #7067

comment:13 Changed 14 years ago by Davin McCall <davmac@…>

New patch attached to this ticket (patch2.txt).

(The problem is that NuppelVideoPlayer? never updates the videosync object with the correct frame rate.)

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: patch2.2.txt added

A simpler patch for #7067.

comment:14 Changed 14 years ago by Davin McCall <davmac@…>

Another patch attached. Even simpler than the last one. Corrects only the one problem - that the videosync object never gets told the correct frame rate.

Developers, please apply patch or give feedback.

comment:15 Changed 14 years ago by anonymous

Add me as someone else who's seeing this. I just upgraded to 0.22 today and this is the only real problem I'm seeing with it.

comment:16 Changed 14 years ago by manuel@…

Forgot to put my email address in the last entry.

comment:17 Changed 14 years ago by markk

Resolution: fixed
Status: infoneeded_newclosed

Fixed in r22881.

comment:18 Changed 14 years ago by Davin McCall <davmac@…>

The fix for this bug exposes another bug, entered as #7644 (with patch).

comment:19 Changed 14 years ago by Davin McCall <davmac@…>

Can this patch please be re-opened as the fix (r22881, r22889) has been reverted?

(or better yet, re-apply r22881 and r22889 plus the patch in #7644).

comment:20 Changed 14 years ago by Joel

This ticket should be re-opened since the SVN changes were reverted.

I ran into this bug upon upgrading to 0.22. I patched the 0.22.0+fixes22594-0ubuntu1 version that ships with Ubuntu Karmic Koala with r422881, r22891 and the patch in #7644, and the severe sync issues that I was experiencing in .iso playback disappeared. Thanks, Davin McCall?, for your patches.

I agree with the above recommendation... re-open or re-commit the changes from r422881, r22891 and the patch in #7644. Additionally, it would be great if these could be added to the 0.22 fixes branch. Thanks!

comment:21 Changed 14 years ago by Joel

Sorry, somehow I got an extra 4 in my svn revision numbers. My comment should reference r22881 and r22891.

comment:22 Changed 14 years ago by robertm

Resolution: fixed
Status: closednew

Reopening because the bug still exists, but please, please... PLEASE.

Discussion. Belongs. On. Mailing. Lists.

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: patch2.3.txt added

Fix for #7067 incorporating additional fixes to prevent liveTV problems

comment:23 Changed 14 years ago by skamithi

(In [22947]) Refs #7067. Patch from Davin McCall?. It should resolve dvd playback issues and not affect live tv playback. patch tested by other users. will commit to 0.22 fixes in a week or 2 if no further issues are reported.

comment:24 Changed 14 years ago by sergeevsp43@…

The problem is still exists on DVD-Video without leading warnings and menu (for example from local folder on HDD)!

comment:25 Changed 14 years ago by skamithi

(In [23002]) Refs #7067. Commit [22947] to 0.22 fixes. it fixes a big problem with dvd playback but there are some side effects that Davin McCall? and others are working on fixing.

Changed 14 years ago by skamithi

patch that should prevent the excess SetScanType?() processing from Taylor Ralph

comment:26 Changed 14 years ago by arvdm@…

I can confirm this bug is present in Ubuntu Karmic. After switching to 0.22 fixes svn, dvd playback is working correctly.

comment:27 Changed 14 years ago by sergeevsp43@…

I'd like to confirm that this problem still exists in trunk version 23034 during watching DVD-Video which doesn't contain leading warnings and menu.

comment:28 Changed 14 years ago by skamithi

(In [23050]) Refs #7067. Patch from Taylor Ralph to prevent the excess SetScanType??() processing after [22947] was applied

comment:29 Changed 14 years ago by Stuart Auchterlonie

Milestone: unknown0.23

Running with --verbose playback gives a constant stream of "Enabled deinterlacing".

Stuart

comment:30 Changed 14 years ago by Stuart Auchterlonie

(In [23069]) Refs #7067. Backports [23050] to 0.22-fixes. This prevents the excess "Enabled deinterlacing" messages mentioned previously.

comment:31 Changed 14 years ago by sergeevsp43@…

I'd like to confirm that this problem still exists in trunk version 23158 during watching DVD-Video which doesn't contain leading warnings and menu.

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv.patch added

New patch for trunk. Solves problem for DVDs without menus.

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv.2.patch added

Updated patch, applies to current trunk (23321)

comment:32 Changed 14 years ago by skamithi

(In [23428]) Refs #7067 patch from davin mccall. resolves av sync issues when watching certain dvds. simplified the interface between vsync and NuppelVideoPlayer?. The videosync/vsync object now has no knowledge of the video framerate and instead gets the frame rate for each frame as part of the WaitForFrame? call. tested it on various recorded shows, avis and dvds. no problem yet. applying to trunk to expand test audience.

comment:33 Changed 14 years ago by skamithi

(In [23437]) Refs #7067. reverting [23428]. danielk advised adding a av-sync patch this late in the cycle is not the best thing. patch will be reviewed further and may be applied after the next release.

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv.3.patch added

Cut down version of the patch; minimal changes to remove frame interval knowledge from vsync

comment:34 Changed 14 years ago by markk

Milestone: 0.230.24

Pushing back to 0.24

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv.4.patch added

Another patch. Same as the last, but corrects the tolerance for checking whether framerate can be doubled.

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv.5.patch added

And another one, corrects *both* instances of the the m_can_double check.

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv.6.patch added

Trying again.

comment:35 Changed 14 years ago by sergeevsp43@…

The patches are inapplicable for trunk version 23669.

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv.patch3 added

Updated patch, applies to current trunk (23844)/

Changed 14 years ago by Davin McCall <davmac@…>

Attachment: mythtv7067.patch added

Updated patch, applies to current trunk (25150)

Changed 14 years ago by tralph

fix a couple issues with previous patch

Changed 14 years ago by tralph

remove deprecated isDVD() call and fix typo

Changed 14 years ago by tralph

move code segment back to original location since it may not be necessary any longer

comment:36 Changed 14 years ago by tralph

Resolution: fixed
Status: newclosed

(In [25286]) Applying patch which provides the following major changes

  • move the trigger advancing controls and frame interval knowledge out of vsync
  • give NVP complete control over frame interval and trigger handling

This greatly simplifies how part of the AV sync code works and should help reduce or eliminate hard to identify bugs.

Thanks to Davin McCall? for the his efforts in idenfying the problem and creating this patch.

Fixes #7067.

Note: See TracTickets for help on using tickets.