| |
- exceptions.Exception
-
- Error
- __builtin__.object
-
- Demuxer
- Muxer
class Demuxer(__builtin__.object) |
|
Demuxer( ext ) -> demuxer
Returns demuxer object based on extension passed.
It can demux stream into separate streams based on a stream type. Once demuxer is created the following methods are available:
hasHeader() -> { 1 | 0 }
Returns whether header presented or not in a stream.
You should not rely on 'streams' call if this function returns 0.
Some values may be used still, such as 'id' and 'type'
You should call parse() at least once before you can call this method.
parse( fragment ) -> streams
Parses stream and returns sub stream data in order it appear in the fragment reset() ->
Reset demultiplexer buffers |
|
Methods defined here:
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- hasHeader(...)
- hasHeader() -> { 1 | 0 }
Returns whether header presented or not in a stream.
You should not rely on 'streams' call if this function returns 0.
Some values may be used still, such as 'id' and 'type'
You should call parse() at least once before you can call this method.
- parse(...)
- parse( fragment ) -> streams
Parses stream and returns sub stream data in order it appear in the fragment
- reset(...)
- reset() ->
Reset demultiplexer buffers
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x0100C0C0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- streams = <attribute 'streams' of 'pymedia.video.muxer.Demuxer' objects>
- streams -> streams
Returns list of streams within after the header is read in order they listed in a master stream.
It may contain the following attributes:
id - internal stream identifier compatible with vcodec
fourcc - fourcc stream identifier if any
type - stream type{ video= 0 | audio= 1 | text= ?? }
bitrate - stream bitrate
width - picture width if any
height - picture height if any
|
class Muxer(__builtin__.object) |
|
Muxer( ext ) -> Muxer
Returns muxer object based on extension passed.
Muxer can multiplex stream from separate streams based on a stream type. Once Muxer is created the following methods are available:
start() -> encoded string or None if no data
File header generation.
end() -> encoded string or None if no data
Footer generation
addStream(codec_id, [codec_params]) -> stream index
Adds stream to muxer. codec_params is an optional codec parameters dictionary.
write (stream_index, str) ->encoded string or None if no data
Write frame into on of the streams in muxer.
getStreamPTS(stream_index) -> tuple of pts_val, pts_num, pts_den for stream |
|
Methods defined here:
- addStream(...)
- addStream(codec_id, [codec_params]) -> stream index
Adds stream to muxer. codec_params is an optional codec parameters dictionary.
- end(...)
- end() -> encoded string or None if no data
Footer generation
- getStreamPTS(...)
- getStreamPTS(stream_index) -> tuple of pts_val, pts_num, pts_den for stream
- start(...)
- start() -> encoded string or None if no data
File header generation.
- write(...)
- write (stream_index, str) ->encoded string or None if no data
Write frame into on of the streams in muxer.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x0100CBB0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
|