Skip to content

Commit

Permalink
Add some default options for VAAPI AV1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Nov 2, 2023
1 parent 91a4705 commit 22e755f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions video/ffmpeg_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,16 @@ bool VideoEncoder::Impl::init_video_codec()

bool is_x264 = strcmp(options.encoder, "libx264") == 0;
bool is_nvenc = strstr(options.encoder, "nvenc") != nullptr;
bool is_av1_vaapi = strcmp(options.encoder, "av1_vaapi") == 0;

if (is_av1_vaapi)
{
av_dict_set(&opts, "profile", "main", 0);
av_dict_set(&opts, "level", "6.3", 0);
av_dict_set(&opts, "tier", "high", 0);
if (options.low_latency)
av_dict_set_int(&opts, "async_depth", 1, 0);
}

if (options.realtime || !is_x264)
{
Expand Down

0 comments on commit 22e755f

Please sign in to comment.