#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 , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | sub added |
Version: | unspecified → git-master |
Fixed in b416517cce6b05bcdd838b8f34a0050e729beec2 by you.