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 3 years ago

Closed 16 months ago

Last modified 11 months ago

#10104 closed Developer Task (fixed)

Proper Duration and Position Support

Reported by: tralph Owned by: stichnot
Priority: minor Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Ticket to track development for proper duration and position support.

The object of this feature is to provide accurate duration and total frame count for the recorder and commercial flagger. This will address the long standing issues with incorrect duration/position for variable frame rate and frame repeats.

For videos with a position map we will use the generated duration/frame count to generate duration/position. If no position map exists we will use the timestamp and duration provided by libav.

Attachments (0)

Change History (8)

comment:1 Changed 2 years ago by tralph

  • Owner set to tralph
  • Status changed from new to assigned

comment:2 Changed 2 years ago by Github

dtvrecorder: update MPEG-2 parser to properly generate repeat_pict values

This is going to be used for generating correct video duration.

Refs #10104

Branch: master
Changeset: be8919faf54b9c0384f44acbee3950c79e6230a8

comment:3 Changed 2 years ago by tralph

  • Resolution set to Won't Fix
  • Status changed from assigned to closed

There isn't much left to do to support this. Just not enough time to work on it anymore.

comment:4 Changed 16 months ago by stichnot

  • Resolution Won't Fix deleted
  • Status changed from closed to new

comment:5 Changed 16 months ago by stichnot

  • Milestone changed from 0.25 to 0.27
  • Owner changed from tralph to stichnot
  • Status changed from new to accepted
  1. Mythcommflag --rebuild produces MARK_DURATION_MS marks in recordedseek or filemarkup, mapping keyframes to time offsets relative to the beginning of the recording.
  1. Recorders produce this same information.
  1. New command added to myth protocol - "QUERY_RECORDER FILL_DURATION_MAP" - similar to FILL_POSITION_MAP, to send updated duration info for playback of an in-progress recording.
  1. Use the duration map during playback to provide more accurate display and seeking with durations and time offsets, by linear interpolation between close values in the duration map. Avoid using naive framerate based calculations, or inaccurate/noisy/discontinuous display timecodes from the recording. Also take the cutlist into account.

comment:6 Changed 16 months ago by Jim Stichnoth <jstichnoth@…>

  • Resolution set to fixed
  • Status changed from accepted to closed

In 49dbed5be0729b04a5f0fd0426a32fceb2dd7935/mythtv:

Provide accurate position/duration/seeking with non-constant framerates.

The recordedseek and filemarkup tables are enhanced to hold timestamp
data in addition to the existing file offset data. The millisecond
timestamps are produced by all recorders that subclass DTVRecorder, as
well as mythtranscode and mythcommflag --rebuild. These timestamps
are relative to the start of the recording/video.

A new command is added to the myth protocol, "QUERY_RECORDER
FILL_DURATION_MAP", modeled after FILL_POSITION_MAP, to send updated
timestamp info for playback of an in-progress recording.

The timestamp markup is used during playback to give accurate position
and duration information in the OSD wherever possible, and to provide
accurate time-based seeking, such as "skip forward 30 seconds" or
"jump to the 5-minute mark". Timestamps are linearly interpolated
from a frame's nearest neighbors in the map, and extrapolated based on
the current frame rate when the map is missing (e.g. legacy
recordings) or incomplete (e.g. in-progress recordings). Other than
that, the frame rate is not used for seeking or duration calculations.
(With the exception of a handful of areas that still need some
attention, including seeking based on commskipmap, seeking across
program boundaries during Live TV, and the watched flag calculation.)

The cutlist continues to be taken into account for seeking and
displaying timestamps, for the most part making cutlists
indistinguishable from the result of lossless transcoding.

Note that to get the benefit of these changes for preexisting
recordings, it may be necessary to run "mythcommflag --rebuild" on
such recordings.

Bumps the ABI and protocol versions. "make distclean" is recommended.

Fixes #10104.

comment:7 Changed 12 months ago by Karl Dietz <dekarl@…>

In 4995830547a1852ea46c42f3d9d5ff6a2fc490e5/mythtv:

split position and duration map in mythtranscode

after [49dbed5b] a lossless transcode would run into untested code and
fail to insert the new position map

factor 1000 adjustment by Jim Stichnoth

Refs #10104

comment:8 Changed 11 months ago by Karl Dietz <dekarl@…>

In dd5a80dcbdfd0ce856a6743c2e6f89b3a11fb318/mythtv:

there's no point in comparing frame number to key type

the .map file should now contain the same content as before addition
of proper duration support

Refs #10104

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.