[FFmpeg-devel] [RFC] XSUB subtitle decoder
Michael Niedermayer
michaelni
Sun Aug 5 13:21:22 CEST 2007
Hi
On Sat, Aug 04, 2007 at 08:55:20PM +0200, Reimar D?ffinger wrote:
> Hello,
> here is my first approach it this, unfortunately there are a lot of
> problems.
> 1) I have only one very short sample:
> http://samples.mplayerhq.hu/sub/small.divx
> The other sample on our server:
> http://samples.mplayerhq.hu/sub/DivX+Subtitles.divx
> I am fairly certain that this does not contain any subtitles at all
> (though it contains a subtitle stream).
> 2) ffplay is the only application to test, but unfortunately seems to be
> quite buggy:
> It does not check the boundaries if the subtitle before drawing
> it, so the small sample above crashes it since the y-Koordinate is
> too big. The reason for this is I think, that xsub gives
> Koordinates as on the DVD, i.e. assuming PAL resolution while
> ffplay assumes they are actual coordinates.
> The decoder can not do this transformation though since currently
> the actual movie resolution is not provided to it.
hmm, whats in AVCodecContext.width/height? it seems these get read from
avi for the subtitle stream?
> 3) The start_display_time and end_display_time are relative to the
> packet pts. I lack a large enough sample to know if this works for
> xsub, but for the general case it seems like quite a strong
> assumption. Since packet pts is not passed to the decode function,
> a conversion is not possible here either.
if relative doesnt work for some subtitle codec, we will have to think
about what to do ...
maybs simply adding a absolute_ts flag to AVCodec would do but maybe there
are better solutions ...
patch looks ok ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070805/f3c95db6/attachment.pgp>
More information about the ffmpeg-devel
mailing list