@Namespace(value="dai::node") @NoOffset @Properties(inherit=depthai.class) public class VideoEncoder extends Node
Node.Connection, Node.DatatypeHierarchy, Node.Input, Node.OutputPointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
VideoEncoder(PipelineImpl par,
long nodeId) |
VideoEncoder(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Node.Output |
bitstream()
Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data.
|
int |
getBitrate()
Get bitrate in bps
|
int |
getBitrateKbps()
Get bitrate in kbps
|
float |
getFrameRate()
Get frame rate
|
int |
getHeight()
Get input height
|
int |
getKeyframeFrequency()
Get keyframe frequency
|
boolean |
getLossless()
Get lossless mode.
|
BytePointer |
getName()
Retrieves nodes name
|
int |
getNumBFrames()
Get number of B frames
|
int |
getNumFramesPool()
Get number of frames in pool
|
VideoEncoderProperties.Profile |
getProfile()
Get profile
|
int |
getQuality()
Get quality
|
VideoEncoderProperties.RateControlMode |
getRateControlMode()
Get rate control mode
|
Pointer |
getSize()
Get input size
|
int |
getWidth()
Get input width
|
Node.Input |
input()
Input for NV12 ImgFrame to be encoded
Default queue is blocking with size set by 'setNumFramesPool' (4).
|
void |
setBitrate(int bitrate)
Set output bitrate in bps.
|
void |
setBitrateKbps(int bitrateKbps)
Set output bitrate in kbps.
|
void |
setDefaultProfilePreset(int width,
int height,
float fps,
VideoEncoderProperties.Profile profile)
Sets a default preset based on specified input size, frame rate and profile
|
void |
setDefaultProfilePreset(Pointer size,
float fps,
VideoEncoderProperties.Profile profile)
Sets a default preset based on specified input size, frame rate and profile
|
void |
setFrameRate(float frameRate)
Sets expected frame rate
|
void |
setKeyframeFrequency(int freq)
Set keyframe frequency.
|
void |
setLossless(boolean lossless)
Set lossless mode.
|
void |
setNumBFrames(int numBFrames)
Set number of B frames to be inserted
|
void |
setNumFramesPool(int frames)
Set number of frames in pool
|
void |
setProfile(int width,
int height,
VideoEncoderProperties.Profile profile)
Set encoding profile
|
void |
setProfile(Pointer size,
VideoEncoderProperties.Profile profile)
Set encoding profile
|
void |
setQuality(int quality)
Set quality
|
void |
setRateControlMode(VideoEncoderProperties.RateControlMode mode)
Set rate control mode
|
assetManager, clone, getAssets, getInputRefs, getInputs, getOutputRefs, getOutputs, getParentPipeline, getProperties, getRequiredOpenVINOVersion, id, inputs, outputsaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic VideoEncoder(Pointer p)
Pointer(Pointer).public VideoEncoder(@SharedPtr PipelineImpl par, @Cast(value="int64_t") long nodeId)
@StdString public BytePointer getName()
Node@MemberGetter @ByRef public Node.Input input()
@MemberGetter @ByRef public Node.Output bitstream()
public void setDefaultProfilePreset(int width,
int height,
float fps,
@ByVal
VideoEncoderProperties.Profile profile)
width - Input frame widthheight - Input frame heightfps - Frame rate in frames per secondprofile - Encoding profilepublic void setDefaultProfilePreset(@ByVal @Cast(value="std::tuple<int,int>*") Pointer size, float fps, @ByVal VideoEncoderProperties.Profile profile)
size - Input frame sizefps - Frame rate in frames per secondprofile - Encoding profilepublic void setNumFramesPool(int frames)
frames - Number of pool framespublic int getNumFramesPool()
public void setRateControlMode(@ByVal VideoEncoderProperties.RateControlMode mode)
public void setProfile(@ByVal @Cast(value="std::tuple<int,int>*") Pointer size, @ByVal VideoEncoderProperties.Profile profile)
public void setProfile(int width,
int height,
@ByVal
VideoEncoderProperties.Profile profile)
public void setBitrate(int bitrate)
public void setBitrateKbps(int bitrateKbps)
public void setKeyframeFrequency(int freq)
public void setNumBFrames(int numBFrames)
public void setQuality(int quality)
quality - Value between 0-100%. Approximates qualitypublic void setLossless(@Cast(value="bool") boolean lossless)
lossless - True to enable lossless jpeg encoding, false otherwisepublic void setFrameRate(float frameRate)
frameRate - Frame rate in frames per second@ByVal public VideoEncoderProperties.RateControlMode getRateControlMode()
@ByVal public VideoEncoderProperties.Profile getProfile()
public int getBitrate()
public int getBitrateKbps()
public int getKeyframeFrequency()
public int getNumBFrames()
public int getQuality()
public int getWidth()
public int getHeight()
public float getFrameRate()
Copyright © 2021. All rights reserved.