This module provides the transport layer interface: encoded packets, Muxer, Demuxers and their support code.
wrapper for the (wannabe)enum in libavformat/avformat.h
Demuxer object. Use a file-like for real I/O. The file-like must be already open, and must support read() returning bytes (not strings). If the file format is_seekable but the file-like doesn’t support seek, expect weird things.
close the underlying demuxer.
python 2.x iterator hook.
open the underlying demuxer.
create and returns a full-blown decoder Instance capable to decode the selected stream. Like doing things manually, just easily.
reads and returns a new complete encoded frame (enclosed in a Packet) from the demuxer. if the optional `stream_id’ argument is !ANY, returns a frame belonging to the specified streams.
raises EndOfStreamError if - a stream id is specified, and such streams doesn’t exists. - the streams ends.
seek to the given frame number in the stream.
seek to the given timestamp (msecs) in the stream.
generator that returns all packets that belong to a specified stream id.
streams: read-only attribute list of StreamInfo objects describing the streams found by the demuxer (as in old pyrana, no changes)
wrapper for the (wannabe)enum of AVFormatFlags in libavformat/avformat.h
Muxer object. Use a file-like for real I/O. The file-like must be already open, and must support write() returning bytes (not strings). If the file format is_seekable but the file-like doesn’t support seek, expect weird things.
register a new stream into the Muxer for the given Encoder. XXX add more docs
create and returns a full-blown enccoder Instance capable, given the encoder parameters, already bound and registered as stream in the Muxer.
writes a data frame, enclosed into an encoded Packet, in the stream.
Writes the header into the output stream.
Writes the trailer (if any) into the output stream. Requires the header to be written (and, likely, some data) Must be the last operation before to release the Muxer.
wrapper for the (wannabe)enum of AVSeekFlags in libavformat/avformat.h
find the nth stream of the specified media a streams info (as in Demuxer().streams). Return the corresponding stream_id. Raise NotFoundError otherwise.