Opened 10 years ago

Closed 10 years ago

Last modified 10 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 by Clément Bœsch, 10 years ago

Resolution: fixed
Status: newclosed

comment:2 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Keywords: sub added
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.