Log in

View Full Version : Part 2: ogg demux tool / ogg multiplexer filter


kthulhu
9th May 2002, 23:30
I accidentaly deleted the original files of one of the clips I get. I had only the final ogm with the audio out of sync. So I needed to split the ogm into the original separate streams... To fix the sync problem and mux them again.

I started digging into libogg to try and separate the streams and I started building a tool to demux the ogm file. Not with the ds filters, but with libogg.

After testing a bit I started reading the forum, and I found the graphedit solution. So I built up a graph and separated the video into an AVI and the audio back into an ogg with a single stream.

Then I loaded the AVI and the ogg into the tool I made and there the problem appeared. According to vorbisfile API the vorbis stream was way shorter that it actually was, but it played fine, and showed the correct length, in wmplayer.

I dumped some more code in the tool I was building and, using libogg, I extracted the vorbis stream into a new ogg file. Just a straight forward read and copy... page by page.

That ogg worked fine.

Has anybody made some tests with libogg, libvorbis and ds filters? Any ideas on why this happend?

I haven't really dug up a lot of info on vorbis streams, just the header/info packet from libvorbis source code. My vorbis experience is with vorbisfile API. It beeing quite an abstract API I can't find anything wrong with the way I am trying to get the length of the vorbis stream. Its just a function to open the ogg file and another one to get the length in seconds...

ChristianHJW
10th May 2002, 05:08
@kthulhu,

interesting results my friend, you should talk to Tobias about what you found, maybe there is a small bug in his Ogg implementation ? The email adress should be found at http://tobias.everwicked.com .

ChristianHJW
10th May 2002, 05:20
Originally posted by kthulhu
My vorbis experience is with vorbisfile API. It beeing quite an abstract API I can't find anything wrong with the way I am trying to get the length of the vorbis stream. ... BTW, the MCF dev team is currently about to define the libmcf API ... your input here is highly appreciated, contact 'robux4' here via PM or join us on IRC, #mcf , openprojects server .....

Koepi
10th May 2002, 07:35
You have to remultiplex those streams.

For audio, you need to add an ogg multiplexer into the graph, 1 for each stream (hey, that sounds like i wrote that some days ago already, strike 1 for you not using the search function of this board!).

For the video you have to add an avi multiplexer (see the FAQ on top of this forum...)

Anything left?
Ah, dunno how broken subtitles will be, but I think yoiu can't demux them correctly into a file again.

Christian,
I'm a little suspicious why you didn't mention these points as they are treated in the FAQ already.

kthulhu
10th May 2002, 14:24
:confused: ????

Sorry. Maybe I was not clear explaining what I did.

I built the graph and got both files. The AVI and the ogg. The wierd problem was in the ogg file with the single vorbis audio stream.

When I tried to read the ogg with Xiphophorus's libvorbisfile API the length of the audio, reported by the API, was not correct.

ChristianHJW
10th May 2002, 15:03
Originally posted by Koepi
Christian,
I'm a little suspicious why you didn't mention these points as they are treated in the FAQ already. ... simply because the probs of this guys did not occur when using Graphedit, but when he was playing with libvorbis as i understood his post .....