PyNvCodec.PyFFmpegDemuxer

class PyNvCodec.PyFFmpegDemuxer
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer, input: str, opts: Dict[str, str]) -> None

    Constructor method.

    param input:

    path to input file

    param opts:

    AVDictionary options that will be passed to AVFormat context.

  2. __init__(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer, input: str) -> None

    Constructor method.

    param input:

    path to input file

Methods

AvgFramerate(self)

Return encoded video stream average framerate.

Codec(self)

Return video codec used in encoded video stream.

ColorRange(self)

Get color range information stored in video stream.

ColorSpace(self)

Get color space information stored in video stream.

DemuxSinglePacket(*args, **kwargs)

Overloaded function.

Format(self)

Return encoded video stream pixel format.

Framerate(self)

Return encoded video stream framerate.

Height(self)

Return encoded video stream height in pixels.

IsVFR(self)

Tell if video stream has variable frame rate.

LastPacketData(self, pkt_data)

Get last demuxed packet data.

Numframes(self)

Return number of video frames in encoded video stream.

Seek(self, seek_ctx, pkt)

Perform seek operation.

Timebase(self)

Return encoded video stream time base.

Width(self)

Return encoded video stream width in pixels.

__init__(*args, **kwargs)

Overloaded function.

AvgFramerate(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) float

Return encoded video stream average framerate.

Codec(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) PyNvCodec._PyNvCodec.CudaVideoCodec

Return video codec used in encoded video stream.

ColorRange(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) PyNvCodec._PyNvCodec.ColorRange

Get color range information stored in video stream. Please not that some video containers may not store this information.

Returns:

color range information

ColorSpace(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) PyNvCodec._PyNvCodec.ColorSpace

Get color space information stored in video stream. Please not that some video containers may not store this information.

Returns:

color space information

DemuxSinglePacket(*args, **kwargs)

Overloaded function.

  1. DemuxSinglePacket(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer, packet: numpy.ndarray[numpy.uint8]) -> bool

    Extract single compressed video packet from input file.

    param packet:

    encoded packet

    return:

    True in case of success, False otherwise

  2. DemuxSinglePacket(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer, packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8]) -> bool

    Extract single compressed video packet and SEI data from input file.

    param packet:

    encoded packet

    param packet:

    SEI data

    return:

    True in case of success, False otherwise

Format(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) PyNvCodec._PyNvCodec.PixelFormat

Return encoded video stream pixel format.

Framerate(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) float

Return encoded video stream framerate.

Height(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) int

Return encoded video stream height in pixels.

IsVFR(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) bool

Tell if video stream has variable frame rate. :return: True in case video stream has variable frame rate, False otherwise

LastPacketData(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer, pkt_data: PyNvCodec._PyNvCodec.PacketData) None

Get last demuxed packet data. :param pkt_data: packet data structure.

Numframes(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) int

Return number of video frames in encoded video stream. Please note that some video containers doesn’t store this infomation.

Seek(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer, seek_ctx: PyNvCodec._PyNvCodec.SeekContext, pkt: numpy.ndarray[numpy.uint8]) bool

Perform seek operation. :param seek_ctx: seek context structure. :param pkt: compressed video packet. :return: True in case of success, False otherwise.

Timebase(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) float

Return encoded video stream time base.

Width(self: PyNvCodec._PyNvCodec.PyFFmpegDemuxer) int

Return encoded video stream width in pixels.