Documentation
¶
Overview ¶
Package webm encodes a capture.Result as a VP8 WebM video of the same frames. It is a separate package so that a user of capture who only wants SVG or HTML does not compile the encoder or the rasteriser.
Index ¶
Constants ¶
const ( // FPS is the nominal frame rate. Timestamps come from the scenario's own // holds; this only sizes the last frame's duration. FPS = 25 // CPUUsed is the encoder speed preset. CPUUsed = 4 // DefaultQuality is the VP8 quantizer index held: 1 (best) to 63 (worst). DefaultQuality = 10 // MinQuality and MaxQuality bound the quality: avkit's vp8enc takes // 1 to 63 (the bitstream's own quantizer index is 7 bits, RFC 6386 section 9.6). MinQuality, MaxQuality = 1, 63 )
The WebM encoder settings. CPUUsed 4 is avkit's slow, sharp preset (the default 5 costs about 5 dB), right for UI text; the frames are few and the encode is bounded by Quality, a constant quantizer, so the file size follows the content.
Variables ¶
This section is empty.
Functions ¶
func CheckQuality ¶
CheckQuality refuses a quality outside 1 to 63 (0 is the default). Any size is taken: avkit's vp8enc pads the planes to whole macroblocks itself (v0.20.2).
Types ¶
type Rasterizer ¶
type Rasterizer struct{}
Rasterizer paints a still frame with go-gfx/gfx/svg, at one pixel per user unit: the frames are the SVG's own, there is no second drawing path.