FVideoEncoder

Windows
MacOS
Linux

References

Module

AVEncoder

Header

/Engine/Source/Runtime/AVEncoder/Public/AVEncoder.h

Include

#include "AVEncoder.h"

Syntax

class FVideoEncoder

Constructors

Name Description

Public function

FVideoEncoder()

Destructors

Name Description

Public function Virtual

~FVideoEncoder()

Functions

Name Description

Public function

bool

 

CopyTexture

(
    FTexture2DRHIRef Texture,
    FTimespan CaptureTs,
    FTimespan Duration,
    FBufferId & OutBufferId,
    FIntPoint Resolution
)

To account for how webrtc works (for PixelStreaming), encoding a frame is a two step process.

Public function

void

 

Drop

(
    FBufferId BufferId
)

Public function

void

 

Encode

(
    FBufferId BufferId,
    bool bForceKeyFrame,
    uint32 Bitrate,
    TUniquePtr < AVEncoder::FEncoderVide ...
)

Public function Const

FVideoEncode ...

 

GetConfig()

We return a copy instead of a reference, to simplify multithread access.

Public function Const

const TCHAR ...

 

GetName()

Public function Const

const TCHAR ...

 

GetType()

Public function

bool

 

Initialize

(
    const FVideoEncoderConfig & Config
)

Protected function

void

 

OnEncodedVideoFrame

(
    const FAVPacket & Packet,
    TUniquePtr < FEncoderVideoFrameCooki ...
)

Public function Virtual

void

 

RegisterListener

(
    IVideoEncoderListener & Listener
)

Public function

bool

 

SetBitrate

(
    uint32 Bitrate
)

Allows setting bitrate and framerate at runtime.

Public function

bool

 

SetFramerate

(
    uint32 Framerate
)

Public function

bool

 

SetParameter

(
    const FString & Parameter,
    const FString & Value
)

Public function

void

 

Shutdown()

Public function Virtual

void

 

UnregisterListener

(
    IVideoEncoderListener & Listener
)

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback