Ogg Theora

Read and write Ogg Theora comments.

This module handles Theora files wrapped in an Ogg bitstream. The first Theora stream found is used.

Based on the specification at http://theora.org/doc/Theora_I_spec.pdf.

class mutagen.oggtheora.OggTheora(filething)

Bases: OggFileType

An Ogg Theora file.

Parameters:

filething (filething) –

info
Type:

OggTheoraInfo

tags
Type:

mutagen._vorbis.VCommentDict

static score(filename, fileobj, header)

Returns a score for how likely the file can be parsed by this type.

Parameters:
  • filename (fspath) – a file path

  • fileobj (fileobj) – a file object open in rb mode. Position is undefined

  • header (bytes) – data of undefined length, starts with the start of the file.

Returns:

negative if definitely not a matching type, otherwise a score,

the bigger the more certain that the file can be loaded.

Return type:

int

class mutagen.oggtheora.OggTheoraInfo

Bases: StreamInfo

Ogg Theora stream information.

length

File length in seconds, as a float

Type:

float

fps

Video frames per second, as a float

Type:

float

bitrate

Bitrate in bps (int)

Type:

int

pprint()
Returns:

Print stream information

Return type:

text