[FFmpeg-devel] [libav-devel] mpegts encoder not interleaving audio/video packets well

Michael Niedermayer michaelni at gmx.at
Thu Jun 16 18:09:49 CEST 2011

On Thu, Jun 16, 2011 at 12:05:34PM -0400, Tony Strauss wrote:
> On Wed, Jun 15, 2011 at 4:18 AM, Martin Storsjö <martin at martin.st> wrote:
> > On Tue, 14 Jun 2011, Kieran Kunhya wrote:
> >
> > > >> What does everyone think?
> > >
> > > The proper fix is to follow the buffering model of the spec and
> > interleave
> > > ts packets appropriately. However, this will break iPhone, iPad and other
> > things because they don't follow the spec.
> >
> > Could this be settable via a muxer specific avoption, choosing between
> > apple-compatible or spec compliant mode?
> I think that the iPhone is compatible with streams with relatively little
> interleaving (the current mpegts muxer output) and with streams with a high
> degree of interleaving (my "fix" of removing the buffering of audio frames).
>  Certainly, the streams that are produced by the mpegts muxer after my "fix"
> are playable on my iPhone.
> I took a look through the mpeg ps encoder (libavformat/mpegenc.c).  It seems
> to require interleaving within .7 sec by default (max_delay).  I think that
> it's reasonable to implement this for the mpegts muxer as well.  max_delay
> also is configurable via ffmpeg's command-line, so people can set it to be
> whatever they want.  I can create a patch for this, if it sounds reasonable
> to everyone.

sounds reasonable to me

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110616/f0c31707/attachment.asc>

More information about the ffmpeg-devel mailing list