Skip to content

Commit

Permalink
fix gop size
Browse files Browse the repository at this point in the history
  • Loading branch information
leandromoreira committed Jan 2, 2020
1 parent 38c6c78 commit 6ad6a82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 3_transcoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6ad6a82

Please sign in to comment.