MP4 and M4A files, whose boxes ISO/IEC 14496-12 defines.
A reading gives the duration from the movie header, the chapters, the artwork, the codecs and size of the tracks that play, and whether the movie comes first. The chapters are those of a QuickTime chapter track, or else those of a Nero chpl box. The titles of a chapter track can have a link each, and a track of images can name an image for each chapter, as in the enhanced podcasts of GarageBand. The artwork is the covr item of the iTunes metadata.
The movie box can come before the media data or after it, so the reading walks the boxes at the top level. A reader that has only the start of the file learns where to look next.
A file written in fragments gives the duration of all its fragments in its mehd box. Without that box, the reading takes the end of the last fragment that the mfra index at the end of the file lists.
The reading is strict. The quirk :mp4/zero-duration takes the duration of the longest track when the movie header gives none. The :except option leaves it out.
MP4 and M4A files, whose boxes ISO/IEC 14496-12 defines. A reading gives the duration from the movie header, the chapters, the artwork, the codecs and size of the tracks that play, and whether the movie comes first. The chapters are those of a QuickTime chapter track, or else those of a Nero chpl box. The titles of a chapter track can have a link each, and a track of images can name an image for each chapter, as in the enhanced podcasts of GarageBand. The artwork is the covr item of the iTunes metadata. The movie box can come before the media data or after it, so the reading walks the boxes at the top level. A reader that has only the start of the file learns where to look next. A file written in fragments gives the duration of all its fragments in its mehd box. Without that box, the reading takes the end of the last fragment that the mfra index at the end of the file lists. The reading is strict. The quirk :mp4/zero-duration takes the duration of the longest track when the movie header gives none. The :except option leaves it out.
(read view)(read view {:keys [chapter-images?] :or {chapter-images? true} :as opts})The MP4 file in view, read with opts, as a map of the keys below,
each absent when the file doesn't have it.
The opts are these:
When the view lacks bytes, the reading throws an exception that holds their ranges.
The chapters, their images, the artwork, the tags and the index of the fragments are parts that the rest can do without. A part that doesn't read is left out, and the report names it.
The MP4 file in `view`, read with `opts`, as a map of the keys below, each absent when the file doesn't have it. - :duration is in seconds, that of the tracks that play when a chapter track runs past them - :chapters, each with :start-time, :end-time and :title, and with :url and :artwork, a map of :type and :data, when the file has them - :artwork, a map of :type and :data - :codecs, the RFC 6381 codecs string of the tracks that play, e.g. "avc1.64001F,mp4a.40.2" - :width and :height of the video, in pixels - :channels and :sample-rate of the audio - :tags, the :title, :artist, :album, :date, :genre and :description of the iTunes metadata - :movie-first?, whether the movie comes before the media data, so that a player can start before it has the end of the file - :media-start, where the media data starts, and :bitrate, in bit/s, that of the media data over the duration, when the bytes at hand reach it, unless the file is in fragments The `opts` are these: - :except, the ids of the quirks to leave out - :chapter-images?, false to leave out the images of the chapters, which lie in the media data, so that the reading needs fewer bytes When the view lacks bytes, the reading throws an exception that holds their ranges. The chapters, their images, the artwork, the tags and the index of the fragments 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 |