Ogg files of Opus or Vorbis audio: the pages of RFC 3533, the headers of RFC 7845 and of the Vorbis I specification, and the comments after them.
The duration is the granule position of the last page of the audio, which lies in the last 64 KB of the file, less the granule position where the audio starts. For Opus, the start is exact. For Vorbis, whose packets give their lengths only through the setup header, it's exact for audio that starts at zero, and right to within one block otherwise, e.g. for a recording of a live stream.
The chapters come from the CHAPTERxxx comments of Xiph's chapter extension, and the artwork from a METADATA_BLOCK_PICTURE comment.
The reading is strict: a page whose CRC doesn't match is no page. The quirk :ogg/image-type takes the type of a picture from its bytes when the type that it declares is loose. The :except option leaves out the quirks that it names.
Ogg files of Opus or Vorbis audio: the pages of RFC 3533, the headers of RFC 7845 and of the Vorbis I specification, and the comments after them. The duration is the granule position of the last page of the audio, which lies in the last 64 KB of the file, less the granule position where the audio starts. For Opus, the start is exact. For Vorbis, whose packets give their lengths only through the setup header, it's exact for audio that starts at zero, and right to within one block otherwise, e.g. for a recording of a live stream. The chapters come from the CHAPTERxxx comments of Xiph's chapter extension, and the artwork from a METADATA_BLOCK_PICTURE comment. The reading is strict: a page whose CRC doesn't match is no page. The quirk :ogg/image-type takes the type of a picture from its bytes when the type that it declares is loose. The :except option leaves out the quirks that it names.
(named comments)The tags of the comments of a stream as one map of :title, :artist,
:album, :date, :genre and :description, each absent when the comments
don't have it. The description is the comment when it has none.
The tags of the `comments` of a stream as one map of :title, :artist, :album, :date, :genre and :description, each absent when the comments don't have it. The description is the comment when it has none.
(page view p)The Ogg page at p in view, or nil when no page begins there or its
CRC doesn't match.
The page is a map of its :start and :end, where its :body begins, its :lacing values, its :flags, its :granule position, nil for -1, and the :serial number of its stream.
The Ogg page at `p` in `view`, or nil when no page begins there or its CRC doesn't match. The page is a map of its :start and :end, where its :body begins, its :lacing values, its :flags, its :granule position, nil for -1, and the :serial number of its stream.
(read view)(read view opts)The Ogg file in view, read with opts, as a map of the keys below,
each absent when the file doesn't have it, as mp4/read gives them.
The file is read as its first Opus or Vorbis stream. The :except of
opts is the ids of the quirks to leave out. When the view lacks bytes,
the reading throws an exception that holds their ranges.
The duration, the chapters and the artwork are parts that the rest can do without. A part that doesn't read is left out, and the report names it.
The Ogg file in `view`, read with `opts`, as a map of the keys below, each absent when the file doesn't have it, as mp4/read gives them. - :comments are the comments of the stream, as pairs of a name in upper case and a value, and :tags what they say, as named gives it - :codecs is "opus" or "vorbis" - :sample-rate and :channels, where Opus plays at 48 kHz - :media-start is where the first page of audio starts - :duration is in seconds - :chapters, each with :start-time, and with :title and :url when the comments give them - :artwork, a map of :type, :data and :description The file is read as its first Opus or Vorbis stream. The :except of `opts` is the ids of the quirks to leave out. When the view lacks bytes, the reading throws an exception that holds their ranges. The duration, the chapters and the artwork are parts that the rest can do without. A part that doesn't read is left out, and the report names it.
(report file)The diagnostics of the read file. Each diagnostic has its message.
The diagnostics of the read `file`. Each diagnostic has its message.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |