[theora] Add an intro to a theora file without re-encoding?

yorn at gmx.net yorn at gmx.net
Thu Jul 16 21:55:10 PDT 2009

Hey Michael,

> Hello,
> I would like to add a introduction video (typically a title with fade-in
> / fade-out) at the beginning of an Ogg/Theora video. I generated this
> intro video in Ogg/Theora from a sequence of png files.
> I would need to do this in an automatic script, because I have many such
> videos to process, and without doing any re-encoding step (which would
> be very costly because my videos are huge).
> I tried to use oggCat:
> oggCat final.ogv intro.ogv video.ogv
> Unfortunately, this doesn't work well because my intro video has no
> sound track to be concatenated with the one in the real video. As a
> consequence, the concatenated video only has a video track.

The first file is the main one, oggCat tries to concatenate the others to fullfill the requirements of this first file. So if there is no audio stream, in the next files, the audio stream is not used. 

If you would do it the other way round, like oggCat final.ogv video.ogv intro.ogv then oggCat would complain, that there is no audio in the second file (as the first one has one).  

> It tried to add a silent track to my introduction video (same bitrate)
> with oggzmerge, but oggCat doesn't like the result:
> Warning: found unknown stream, this stream will be ignored
> Warning: found unknown stream, this stream will be ignored
> StreamSerializer::fillStreams: we got a real problem with the stream

How do you produce the "silence"? Sounds as if it was not a vorbis stream!?

The message "We got a real problem ... " is a bit missleading ;-). This usually means the stream ends invalid (e.g. there is no End-Of-File indicator or a packet is corrupt because it is read from a livestream etc). oggCat tries (mostly successfully) to create a valid stream also in such situations.

However, with version 0.9 I need to rework the error handling :-/
> Any suggestion for a way to add such an intro video in a simple way?

I have a small program to create silence (in wave). I then use oggenc with the same parameters as from the subsequent audio stream and I have had no problems. I've used that method for my video tutorial. 


More information about the theora mailing list