[Ffmpeg-devel] Interleaving audio and video

Roman Shaposhnik rvs
Sun Feb 4 21:49:28 CET 2007


On Sun, 2007-02-04 at 10:51 +0100, Michael Niedermayer wrote:
> Hi
> 
> On Sat, Feb 03, 2007 at 09:57:19PM -0800, Roman Shaposhnik wrote:
> [...]
> >   So, where I was driving at was a sort of solution where somehow
> > muxers like DV and GXF would *mandate* usage of
> > av_interleaved_write_frame().
> > 
> >   An alternative (at least for DV and GXF) would be an actual
> > packetizer.
> 
> both rejected, the muxer can if it likes, check if the packets are correctly
> interleaved and sized but it cannot insist on redundant repacking to be
> performed

  Hm. So it seems that you don't like an idea of a general packetizer
after all. In that case -- I'm not sure I understand where can I 
factor out the common code from DV and GFX (and some others) muxers to.
Care to elaborate ?

> also we can add a flag  to indicate if standard dts ordering is sufficient
> if you like ...

  That would be a step forward. Although, as far as I can tell for
any client that doesn't have a preset wellknown set of output
formats they wish to use it'll lead to something like:

    if (s->oformat->flags & AVFMT_NEEDINTERLEAVED) {
        av_interleaved_write_frame(s, pkt);
    } else {
        av_write_frame(s, pkt);
    }

on the client side. Which begs the question why not hide the same
code in libavformat/util.c.

Thanks,
Roman.





More information about the ffmpeg-devel mailing list