Skip to content

Commit 325f58f

Browse files
committed
Changes to use AV1 if ffmpeg >= 4.0 is used with libaom support
1 parent 533c59a commit 325f58f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/FFmpegWriter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,12 @@ AVStream* FFmpegWriter::add_video_stream()
10671067
}
10681068
else {
10691069
switch (c->codec_id) {
1070+
#if (LIBAVCODEC_VERSION_MAJOR >= 58)
1071+
case AV_CODEC_ID_AV1 :
1072+
av_opt_set_int(c->priv_data, "crf", min(info.video_bit_rate,63), 0);
1073+
c->bit_rate = 0;
1074+
break;
1075+
#endif
10701076
case AV_CODEC_ID_VP8 :
10711077
av_opt_set_int(c->priv_data, "crf", min(info.video_bit_rate,63), 0);
10721078
break;

0 commit comments

Comments
 (0)