Skip to content

Commit

Permalink
Merge pull request #520 from OpenShot/fix-fps-ffmpeg4
Browse files Browse the repository at this point in the history
Fix FPS setting on FFmpeg 4
  • Loading branch information
jonoomph committed Jun 2, 2020
2 parents 782d764 + 7ed26cf commit 1cdb49f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/FFmpegWriter.cpp
Expand Up @@ -1222,6 +1222,13 @@ AVStream *FFmpegWriter::add_video_stream() {
st->avg_frame_rate = av_inv_q(c->time_base);
st->time_base.num = info.video_timebase.num;
st->time_base.den = info.video_timebase.den;
#if (LIBAVFORMAT_VERSION_MAJOR >= 58)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
st->codec->time_base.num = info.video_timebase.num;
st->codec->time_base.den = info.video_timebase.den;
#pragma GCC diagnostic pop
#endif

c->gop_size = 12; /* TODO: add this to "info"... emit one intra frame every twelve frames at most */
c->max_b_frames = 10;
Expand Down

0 comments on commit 1cdb49f

Please sign in to comment.