[MPlayer-dev-eng] [PATCH] Subtitle display is based on audio - should be video
gillou.ray at free.fr
gillou.ray at free.fr
Sat Oct 2 15:42:16 CEST 2010
Hi,
the subtitles demuxing code currently base its timestamps on audio
time. That is, when an A/V desync occurs, you see the subtitles of what
you are hearing, not what you are seeing. I think this is wrong because
subtitles timestamps are based on video, typically synced with scenes
changes. Moreover, my proposed patch makes the ds_get_packet_sub()
parameters to actually do what their documentation says.
You can easily produce the bug giving a -delay option to a subtitled
movie. I tested various combinations of demuxers and files. The bug
happens when :
- ass rendering is disabled
- subtitles are packed in a container (not red from a text file)
- with both ffpmeg and mplayer mkv demuxer, and ffmpeg ogg demuxer
- with muxed ASS or SRT
Another thing: with certain combination of stream types and demuxers
(e.g. with mplayer mkv demuxer and ASS muxed subs), the resulting bug
is a bit different. It displays each subtitle from their audio timestamp
start to their video timestamp end, resulting in overlaps. E.g. if a
subtitle is from 00:03s to 00:06s, with -delay 2 it is displayed from
00:01s to 00:06s. The patch solves this problem too.
I cannot assert it is all right because I don't understand the whole
mplayer timing process. However, giving the trivialness of the changes
and the few tests I did, I hadn't see anything wrong.
-- gillux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-subtitles-timing.patch
Type: application/octet-stream
Size: 844 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20101002/d55a7263/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20101002/d55a7263/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list