From 6ad6a82fb37f7b8d187f88e3e3ee3aeeb240e832 Mon Sep 17 00:00:00 2001 From: Leandro Moreira Date: Thu, 2 Jan 2020 11:47:22 -0300 Subject: [PATCH] fix gop size --- 3_transcoding.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3_transcoding.c b/3_transcoding.c index 10671dc..6d78725 100644 --- a/3_transcoding.c +++ b/3_transcoding.c @@ -105,7 +105,10 @@ int prepare_encoder(StreamingContext *sc, AVCodecContext *decoder_ctx, AVRationa if (!sc->video_avcc) {logging("could not allocated memory for codec context"); return -1;} av_opt_set(sc->video_avcc->priv_data, "preset", "slow", 0); - //av_opt_set(sc->video_avcc->priv_data, "x264opts", "keyint=60:min-keyint=60:scenecut=-1", 0); + av_opt_set(sc->video_avcc->priv_data, "x264opts", "keyint=60:min-keyint=60:scenecut=-1", 0); + // + //sc->video_avcc->keyint_min = 60; + //sc->video_avcc->gop_size = 60; sc->video_avcc->height = decoder_ctx->height; sc->video_avcc->width = decoder_ctx->width;