[ogg-dev] Storing RTP in Ogg

Andrew Donkin andrew.donkin.ogg at gmail.com
Tue Jan 2 18:47:38 PST 2007


Hello learned ogg folks, and welcome to 2007.  Sadly I am back at work
already, and I'd like to seek your advice.

We need to store raw RTP packets on disk as they are received from the
network.  There will be multiple streams of media--at least one audio
and one video--that all need to go in the same file.  We have decided to
use ogg because it is the simplest container format that meets our
modest needs, and because the members of its dev mailing list are so
darned good looking.  The other sort-of contenders were pcap and mpeg4, btw.

Currently ours is the only application that will be reading these
packets back off disk, so there are no interoperability concerns, so one
valid answer to anything I ask now is "do whatever you damned well want
and let us get back to our drinking."  Nevertheless I will continue.

My original plan was to store one RTP packet per ogg packet, one packet
per page, with the granule position of the page to the arrival time
of the RTP packet, and metadata in a custom format in the BOS packet.

[ Which reminds me of an early trap for young players I fell right into:
   why on earth is the granule position part of the packet in the API
   when it is actually part of a page? ]

But this naive design gnawed at my conscience.  Other ogg parsers would 
make no sense of our files.  I should use liboggz and a skeleton stream. 
But I like the simplicity of libogg and I would like to avoid depending 
on a second external library.


Does anyone else have experience to share about using Ogg for their own 
in-house applications?  Or any advice they can give?

Should I consider libogg2 for a commercial app due mid-year?


Thanks in advance, and happy hangovers.




More information about the ogg-dev mailing list