Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#11579 closed Patch - Bug Fix (fixed)

Slideshow DVDs do not play back correctly

Reported by: peper03@… Owned by: Richard <peper03@…>
Priority: minor Milestone: 0.27
Component: MythTV - DVD Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Slideshow DVDs (i.e. when a single video frame should be displayed for an arbitrary length of time) do not play back correctly (the audio track skips very quickly). This makes playback of audio DVDs impossible.

Playback of slideshows in menus works but CPU usage rises to 100% due to the fact that the video buffers are usually used to regulate the processing of new audio/video packets. As there are always video buffers available, the audio buffers are filled with several seconds worth of data (depending on configuration this can be up to around 15 seconds) and the decoding loop spins rather than sleeps until space becomes available.

The attached patches fix this problem by generating dummy video frames as needed.
They also introduce a 'DVD context' class to provide a snapshot of DVD playback, which can be passed through the chain from the ringbuffer to the decoder to (in the future) the player code. This allows the different stages to make decisions based on the state of the DVD data at the time any given frame was originally read. The ringbuffer is sometimes around 2 seconds ahead of the player, so if the player queries the current state of a value (e.g. playback time) from the ringbuffer, it may get a value that corresponds to the frame it will display in 2 seconds, not the frame it is currently displaying.

The context class will be extended in future patches.

Attachments (4)

0001-Add-passing-of-DVD-NAV-blocks-to-ffmpeg.patch (18.0 KB) - added by peper03@… 10 months ago.
Corresponds to https://github.com/FFmpeg/FFmpeg/commit/9cde9f7
0002-Add-DVD-context-class-to-encapsulate-the-state-of-th.patch (16.0 KB) - added by peper03@… 10 months ago.
0003-Added-more-consistent-handling-of-slide-shows-i.e.-i.patch (14.8 KB) - added by peper03@… 10 months ago.
0004-Handle-seeking-within-slideshows.patch (21.5 KB) - added by peper03@… 10 months ago.

Download all attachments as: .zip

Change History (9)

Changed 10 months ago by peper03@…

Changed 10 months ago by peper03@…

Changed 10 months ago by peper03@…

Changed 10 months ago by peper03@…

comment:1 Changed 10 months ago by peper03@…

Sample DVD images added to stuartm's repository - StillFeatureWithAudio?.iso and Rach_Sonata2.iso

comment:2 Changed 10 months ago by Richard <peper03@…>

In aa1fb8fc45c01684e1d68f77fd0084f36f39e431/mythtv:

Add DVD context class to encapsulate the state of the DVD VM so that this can be decoupled from the ringbuffer. As the decoder and player lag the ringbuffer by up to a second or more, this will allow them to base their operation on the DVD state at the time any given frame was read and not on the 'current' state, which may well not be the same.

This change adds no real functionality but implements the base functionality to be built on in further commits.

Refs #11579

comment:3 Changed 10 months ago by Richard <peper03@…>

In 4df1612e567c1c5e2f19fc312ffef4532fb61bae/mythtv:

Added more consistent handling of slide shows (i.e. individual video frames to be shown until the next video frame appears in the stream). This allows correct playback of still frames with or without audio regardless of domain (previously still frames with audio was only handled in a menu), so this change allows audio DVDs to be played.

Refs #11579

comment:4 Changed 10 months ago by Richard <peper03@…>

  • Owner set to Richard <peper03@…>
  • Resolution set to fixed
  • Status changed from new to closed

In b670ba578f5571ca29b96a2bd30bf226287f1cb6/mythtv:

Handle seeking within slideshows.

As slideshows only contain a single video frame to be displayed for an arbitary amount of time along with audio, seeking can cause issues as you may jump over the frame to be displayed.

Using an audio DVD of classical music as an example:

  1. Each movement contains a single video frame at the beginning.
  2. The second movement has just begun and the user skips back several seconds to the end of the first movement.
  3. This change detects that a different video frame should be displayed and jumps back further to retrieve the video frame and, once retrieved, returns to the original position to continue playback.

Closes #11579

comment:5 Changed 10 months ago by peper03

  • Milestone changed from unknown to 0.27

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.