sig
  type t
  val create : Theora.info -> (string * string) list -> Theora.Encoder.t
  val encode_header : Theora.Encoder.t -> Ogg.Stream.t -> unit
  val encode_page :
    Theora.Encoder.t ->
    Ogg.Stream.t -> (unit -> Theora.yuv_buffer) -> Ogg.Page.t
  val encode_buffer :
    Theora.Encoder.t -> Ogg.Stream.t -> Theora.yuv_buffer -> unit
  val time_of_granulepos : Theora.Encoder.t -> Int64.t -> Nativeint.t
  val frames_of_granulepos : Theora.Encoder.t -> Int64.t -> Int64.t
  val eos : Theora.Encoder.t -> Ogg.Stream.t -> unit
end