[theora] oggcat or other ways to combine theora videos (with or without re-encoding)?

yorn at gmx.net yorn at gmx.net
Tue Sep 15 08:21:00 PDT 2009

Hey all,

Oh yes, I came around the problem before, but forgot about that.

So this goes to the Theora guys:

I encounted the following issue: The packet numbers for the theora headers created by the theora encoder are not numbered (all set to 0). This causes the strange output. Vorbis does create packet numbers for the header packets.

Second thing is: The first packet number is set to "2", so the oggvt library expects a packet with number "3" and got a packet with number "2".

Maybe someone could tell me if I am wrong and got some problems with my packet number reader or if this is true.

- Yorn

-------- Original-Nachricht --------
> Datum: Tue, 15 Sep 2009 11:04:29 -0400
> Von: Gregory Maxwell <gmaxwell at gmail.com>
> An: "Orton AKINCI aka .-_-." <ortonak at yahoo.com>
> CC: yorn at gmx.net, mdale at wikimedia.org, theora at xiph.org
> Betreff: Re: [theora] oggcat or other ways to combine theora videos (with or 	without re-encoding)?

> [Please don't send HTML mail to these lists]
> On Tue, Sep 15, 2009 at 10:48 AM, Orton AKINCI aka .-_-.
> <ortonak at yahoo.com> wrote:
> > hi yorn, i have reported the issue (not a bug possibly) i have e-mailed
> to
> > this list about "packet number for stream <2> not matching:"  to the
> support
> > request of sourceforge bug tracker...
> >
> > my question for now, is there a safe conversion method to theora, so
> that i
> > can use these theora files to cat safely with oggcat? i never use
> > oggz-chop.  i am using the latest builds of ffmpeg2theora on windows...
> or
> > is it about the input files to be converted to theora? if so what is the
> > safe input file format to convert to theora(if there is any or that is
> the
> > case:)).
> >
> > as i know, a part of the problem is about vorbis, that cannot be cut at
> a
> > desired precise point... is there a way to cut the video(video)
> according to
> > where vorbis(audio) let to be cut, so that there should be no sync
> problems,
> > 'cos theora can be cut any precise point? no?
> Typically Theora can only be cut at keyframes unless you're willing to
> tolerate garbage in any output that doesn't consist of the cut parts
> back together exactly as they came.  You can have full,
> frame-granularit, lossless editing with Theora by running with
> keyint=1. This results in an enormous loss of compression efficiency.
> The same is true of pretty much all video formats.
> Vorbis can be cut with sample granularity but if you are going to
> paste the cut vorbis streams back together without creating a chained
> stream (which many things will not play) the cuts will need to have
> vorbis-frame granularity.  Vorbis frames will not align with video
> frame times.  This shouldn't be a problem for simple excerpting where
> the granpos can be preserved, but it would be a problem for retaining
> sync with chainless recombination.
> You can't reliably concatenate streams from different sources without
> chaining, because they may have different setup headers.
> Chained files will not reliably play in all players.

More information about the theora mailing list