[MPlayer-dev-eng] Search avi with vorbis audio sample

Alban Bedel albeu at free.fr
Sun Feb 17 02:19:43 CET 2002


Hi Arpi,

on Sat, 16 Feb 2002 06:34:54 +0100 you wrote:

> Hi,
> 
> > I'm trying to write an ogg demuxer (I got a first version). But in avi, look
> > ing at the code
> > the vorbis stream is muxed in an ogg stream except the first 3 packets. I go
> > t something
> > working (at least with ogg/vorbis audio) but now I need some avi samples. On
> >  the ftp 
> > I just found one wich don't even work with the current version. So if you ha
> > ve some 
> > please upload. Thx in advance.
> 
> huh.
> there are 2 things.
> - ogg file format containing vorbos audio steram and any video codecs - not
> supported by nowdays requested by users.
> - ogg stream with vorbis audio muxed into .AVI file format. it is supported,
> but no working encoder yet, only NanDub can create such files but they are
> broken, at least a-v sync and interleaving is bad :(
> (nandub assumes fixed 600 byte frame size but it depends ion many encoding
> parameters)
> 
> if you implemented demux_ogg, it won't work with current ogg/vorbis audio
> support as it demuxes things _again_... i think it should be removed...
> and later use some demuxer loopback to decode ogg-in-avi files
> (similar to mpeg pes-in-ts)

Ok I didn't have the time to all explain when I writed this mail. I found two ways
of handeling this problem.
The first I found, is more complexe but the best I think. It's also my first idea, my mind
seems to don't like too simple solution ;)
Let's do some (bad) ascii art first : 

+-------+       VIDEO                                                                 +-------+  VIDEO
|                  |--------------------------------------|                  | ----
|                  |                                                                                      |DEMUXER|
|    AVI       | OGG/VORBIS+---------+      +---------+       |DEMUXER| VORBIS
|DEMUXER|-----------| DS STREAM |---|OGG DEMUX|---|                  |------
|                  |                        +---------+      +---------+      +-------+
+-------+

Now some explanations :

DS STREAM is a stream wich take his data from from a demuxer_stream_t.
DEMUXER DEMUXER is demuxer wich merge two demuxer. Taking the audio
stream from one and the video one from another.
I got a first version of this two things. Only the demuxer demuxer is somewhat
tested. It's can also be used to use an external audio stream now we have an
audio demuxer. The ds stream is not really tested be should work good.
I also got a first version of the ogg demuxer. I must redo it because it need seeking
after opening.
Then we need a vorbis decoder. This is done, yes I played ogg/vorbis files with 
mplayer :)))
But this solution is pretty complex, and still need some special code for the avi files
because as I said the first 3 vorbis packets are not muxed in the ogg stream. They
are in the header in a strange manner from what I understanded of the actual ogg/vorbis 
decoder (but this decoder is only useful for avi, nothing else :(  )
The good is that we have a framework to handle multilevel multiplexing (a muxed
stream wich contain a muxed stream).

The second solution is really simpler. Keep the actual ogg/vorbis decoder and add
the vorbis decoder. So let this bad avi as they are. I don't really like this one, as we
got duplicate code and a decoder wich also demux and is useful only for one sort of
file.

By the way, when we add vorbis support to mencoder. Don't do it this way, we should
use a true vorbis stream, not an ogg/vorbis (or the two solutions ;) ).

Ok I hope all this can be undertanded by somebody ;)

	Albeu



More information about the MPlayer-dev-eng mailing list