Newer Older
conrad's avatar
conrad committed
1 2
About Oggz

conrad's avatar
conrad committed
Oggz comprises liboggz and the command-line tools oggzinfo, oggzdump,
5 6 7
oggzdiff, oggzmerge, oggzrip, oggz-chop, oggz-comment, oggz-scan, oggz-sort
and oggz-validate. oggz-chop can be used to serve time ranges of Ogg media
over HTTP by any web server that supports CGI.
conrad's avatar
conrad committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

liboggz is a C library providing a simple programming interface for reading
and writing Ogg files and streams. Ogg is an interleaving data container
developed by Monty at Xiph.Org, originally to support the Ogg Vorbis audio


Oggz depends only on libogg, available in most free software
distributions, or in source form at:

Support is built-in for parsing the headers of and seeking to time
positions in Ogg Speex, Vorbis, FLAC, Theora, PCM and CMML. Oggz is also
compatible with Annodex streams, and supports seeking on all tracks
described in an Ogg Skeleton track.


Release archives can be installed using the conventional commands:
conrad's avatar
conrad committed
29 30 31 32 33

    $ ./configure
    $ make check
    $ sudo make install

34 35 36
sequence. Configuration details are in the file INSTALL. If you obtained
this source by svn, first run "./" to create the configure script,
then run the above commands.
conrad's avatar
conrad committed
37 38 39 40 41 42

Read the file README.win32 for installing under MS Windows, and
README.symbian for information about building for Symbian devices.

Source layout
43 44 45 46

The src/ directory contains the source code.
The src/liboggz/ directory has the library source code.
The src/tools/ directory has some command line tools for analysing
conrad's avatar
conrad committed
47 48 49
               Ogg files.
The src/examples/ directory contains example programs using liboggz.
The src/tests/ directory contains unit and functional tests.
50 51 52 53 54 55 56 57 58

The include/ directory contains the oggz include files that will
be installed into the system include directory.

The doc/ directory contains some documentation for oggz. The
subdirectory liboggz is autocreated by doxygen from comments contained
in the source code.

The win32/ directory contains the files necessary to compile the
conrad's avatar
conrad committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
library and tools for MS Windows.

The symbian/ directory contains the files necessary to compile the
library for Symbian.

Programming with liboggz

liboggz supports the flexibility afforded by the Ogg file format while
presenting the following API niceties:

    * Full API documentation

    * Comprehensive test suite of read, write and seeking behavior.
    The entire test suite can be run under valgrind if available.

    * Developed and tested on GNU/Linux, Darwin/MacOSX, Win32 and
    Symbian OS. May work on other Unix-like systems via GNU autoconf.
    For Win32: nmake Makefiles, Visual Studio .NET 2003 solution files
    and Visual C++ 6.0 workspace files are provided in the source

    * Strict adherence to the formatting requirements of Ogg bitstreams,
    to ensure that only valid bitstreams are generated; writes can fail
    if you try to write illegally structured packets.

    * A simple, callback based open/read/close or open/write/close
    interface to raw Ogg files.

    * Writing automatically interleaves with packet queuing, and provides
    callback based notification when this queue is empty

    * A customisable seeking abstraction for seeking on multitrack Ogg
    data. Seeking works easily and reliably on multitrack and multi-codec
    streams, and can transparently parse Theora, Speex, Vorbis, FLAC,
    PCM, CMML and Ogg Skeleton headers  without requiring linking to those
    libraries. This allows efficient use on servers and other devices
    that need to parse and seek within Ogg files, but do not need to do
    a full media decode.

Full documentation of the liboggz API, customization and installation,
and mux and demux examples can be read online at:


The Oggz source tarball also contains the following command-line tools,
which are useful for debugging and testing Ogg bitstreams:

111 112
    * oggz-chop: Extract the part of an Ogg file between given start
    and/or end times.
conrad's avatar
conrad committed

    * oggz-comment: List or edit comments in an Ogg file.
conrad's avatar
conrad committed

    * oggz-diff: Hexdump the packets of two Ogg files and output
conrad's avatar
conrad committed
117 118

119 120
    * oggz-dump: Hexdump packets of an Ogg file, or revert an Ogg file
    from such a hexdump.
conrad's avatar
conrad committed

122 123
    * oggz-info: Display information about one or more Ogg files and
    their bitstreams.
conrad's avatar
conrad committed

125 126 127 128
    * oggz-merge: Merge Ogg files together, interleaving pages in order
    of presentation time.

    * oggz-rip: Extract one or more logical bitstreams from an Ogg file.
conrad's avatar
conrad committed
129 130 131

    * oggz-scan: Scan an Ogg file and output characteristic landmarks.

132 133
    * oggz-sort: Sort the pages of an Ogg file in order of presentation time.

conrad's avatar
conrad committed
134 135
    * oggz-validate: Validate the Ogg framing of one or more files.

136 137 138 139
The script bash-completion/oggz enables completion of tool options and codec
names when using the bash shell. Source it from your .profile, or install it
in /etc/bash_completion.d to enable it system-wide.

140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161

oggz-chop: General usage and CGI installation

oggz-chop extracts the part of an Ogg file between given start and/or end
times. The output file contains copies of the headers of the input file, and
all the codec data required to correctly decode the content between the start
and end times specified on the commandline. For codecs with data dependencies
like video keyframes, the keyframe prior to the starting time will be included
in the output.

An Apache server can be configured to use oggz-chop to handle all Ogg files
(or, all Ogg files in a particular directory). An example Apache configuration
is in the liboggz source tree, along with a script for installing it on a
Debian server.

The oggz-chop binary checks if it is being run as a CGI script (by checking
some environment variables), and if so acts based on the CGI query parameter
t=, much like mod_annodex. It accepts all the time specifications that
mod_annodex accepts (npt and various smpte framerates), and start and end
times separated by a /.

conrad's avatar
conrad committed
162 163 164 165 166 167 168 169

Oggz is Free Software, available under a BSD style license.

More information is available online at the Oggz homepage:

conrad's avatar
conrad committed
enjoy :)

conrad's avatar
conrad committed
173 174 175 176
Conrad Parker
Senior Software Engineer, Continuous Media Web, CSIRO Australia