[FFmpeg-devel] ASS in AVI
Tue Aug 11 22:00:41 CEST 2009
On Tue, Aug 11, 2009 at 09:08:03PM +0200, Aurelien Jacobs wrote:
> On Tue, Aug 11, 2009 at 08:37:53PM +0200, Michael Niedermayer wrote:
> > On Tue, Aug 11, 2009 at 02:30:45PM +0200, Aurelien Jacobs wrote:
> > > Hi,
> > >
> > > This patchset add support for ASS subtitles in AVI demuxer.
> > > The format is documented  and implemented in various tools since sevral
> > > years.
> > >
> > > First patch export functions of the ASS demuxer so that they can be used
> > > from the AVI demuxer.
> > > Second patch add seeking support in the ASS demuxer.
> > > Third patch finally add support for demuxer ASS subtitles from AVI files
> > > using functions from the ASS demuxer.
> > uhm eh hmm wtf ...
> > what exactly is this patch set doing and why?
> > ok on can store a whole subtitle file in one chunk, this isnt really sane
> > but hey the windoz kiddies arent sane.
> Yes, this kind of non-interleaved storage is ugly... But I fear we will
> have to deal with it :-(
> > still i dont see why that would require this mess
> > 1. avi demuxer returns 1 chunk
> This chunk is generally at the very end of the file, so it have to
> seek to this chunk and read it during read_header.
if its at the very end the file qualifies as non interleaved avi and
the code handling that should run.
> > 2. ass parser splits chunk
> Here I added a step:
> 2.5. avi demuxer get the next packet from ass parser and output it
> interleaved with other streams at correct time.
thats not the demuxers job, the common code can interleave the output of
each streams parser. If thats not done already its a bug
> > 3. add decoder makes many AVSubtitles ot of it
> > 4. render renders out of the hundreads of AVSubtitles which are needed
> > at the current frame
> So the renderer needs to buffer all the AVSubtitles from all the subtitle
> streams ?
> And it needs to be able to select which stream to render (and
> change it at runtime) ?
> Or do we need one renderer per subtitle stream, with the possibility to
> enable/disable each renderer at runtime ?
i dont see how one vs. many renderers would be related here
and each subtitle packet could contain subtitles that are displayed,
moved, have effects changed and so on, the renderer need to keep track
of what to do when already.
> And renderer needs to handle seeking ?
the renderer is reset on seeks, the demuxer must return the chunk again
if the seek target falls within its start-duration (thats the natural thing
to do, of course one could do it differently ...)
> All of this doesn't sound really natural.
the design of ass in avi is not natural, storing a whole movie in one chunk
is silly but its like storing s 3d wavelet block of the whole movie in one
> And how would you handle stream copy from AVI to NUT for example ?
after the parser you have splited chunks, i see no problem here
am i missing one?
> Basically, my code does more or less the same thing that the non-interleaved
> avi code.
the non interleaved avi code does not call functions from other demuxers, nor
include their headers
i wouldnt mind havng ass split in the demuxer if it could be done naturally
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel