aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-05 07:05:39 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-05 07:05:39 +0200
commit6343c5a76bb0456c7c192c3815c02431bd7cba0f (patch)
tree6854fd85dad3e5815e4316a0446d3cfc7226bd2e /src
parentef3767d750e82539198554277c493a8675360f44 (diff)
Smoother?
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3a0635c..4594def 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -386,11 +386,13 @@ static AVStream *add_video_stream(AVFormatContext *av_format_context, AVCodec **
codec_context->time_base.den = fps;
// codec_context->framerate.num = 60;
// codec_context->framerate.den = 1;
- codec_context->sample_aspect_ratio.num = 1;
- codec_context->sample_aspect_ratio.den = 1;
- codec_context->gop_size = fps * 2;
+ codec_context->sample_aspect_ratio.num = 0;
+ codec_context->sample_aspect_ratio.den = 0;
+ codec_context->gop_size = 250;//fps * 2;
codec_context->max_b_frames = 2;
codec_context->pix_fmt = AV_PIX_FMT_CUDA;
+ stream->time_base = codec_context->time_base;
+ stream->avg_frame_rate = av_inv_q(codec_context->time_base);
if (codec_context->codec_id == AV_CODEC_ID_MPEG1VIDEO)
codec_context->mb_decision = 2;