Skip to content

Commit 91873b8

Browse files
committed
enc: allow arbitrary fps for mpeg2
1 parent c74a6dc commit 91873b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/codec/video/VideoEncoderFFmpeg.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ bool VideoEncoderFFmpegPrivate::open()
239239
av_dict_set(&dict, "preset", "ultrafast", 0);
240240
av_dict_set(&dict, "tune", "zero-latency", 0);
241241
}
242+
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
243+
av_dict_set(&dict, "strict", "-2", 0); // mpeg2 arbitrary fps
244+
}
242245
applyOptionsForContext();
243246
AV_ENSURE_OK(avcodec_open2(avctx, codec, &dict), false);
244247
// from mpv ao_lavc

0 commit comments

Comments
 (0)