Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3287 closed defect (fixed)

Can't correctly time frame-based subtitle formats

Reported by: gjdfgh Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: sub
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Some subtitle formats, like MicroDVD, do not always use absolute timestamps. Instead, they use something like frame numbers.

This makes subtitle timestamps dependend on video FPS. A subtitle demuxer can't return correct timestamps, because it (of course) does not know the video FPS. libavformat's MicroDVD demuxer just assumes 23.976 FPS.

To further complicate the situation, MicroDVD subtitles _can_ declare a video FPS, in which case libavformat will use that, instead of the 23.976 FPS fallback.

This makes it impossible for an application to determine the subtitle timestamps correctly: the timestamps could be using the fallback (in which case the application would have to recompute all subtitle timestamps by reversing the fallback, and using the video's actual FPS instead), or the timestamps could be correct (in which case the application should not touch them).

I propose adding a flag that tells the application whether the timestamps are correct. I would also consider this issue relatively critical, because it makes the MicroDVD demuxer more or less unusable.

Change History (2)

comment:1 Changed 5 years ago by ubitux

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

comment:2 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords sub added
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.