bmegli / hardware-video-encoder

HVE - Hardware Video Encoder C library
Mozilla Public License 2.0
16 stars 11 forks source link

add more control over encoder #6

Closed bmegli closed 4 years ago

bmegli commented 5 years ago

Things like:

This needs extending hve_config or adding some other means but library needs to remain deadly simple.

bmegli commented 5 years ago

Internally the profile can be selected with e.g:

avctx->profile=FF_PROFILE_H264_CONSTRAINED_BASELINE;

What is causing most lag are B frames (by default encoder is lagging by 2 frames).

To disable B frames:

avctx->max_b_frames=0;
bmegli commented 5 years ago

Added some basic control in 274662e9769ea13d6160453d6882af2af2abb7b0

There are more possibilities but this is enough for my needs now.

bmegli commented 4 years ago

More control is possible:

The high level information may be found in:

Definite information is in implementation:

The support varies with hardware, VAAPI driver version/libva and FFmpeg.

For FFmpeg releases code may be inspected in the links above.

bmegli commented 4 years ago

This is enough for my needs, closing for now.

It is worth noting that:

Some of those only with newer hardware/software stack.