Skip to content

Commit

Permalink
Include data for fps in clip created by ffmpeg 4+
Browse files Browse the repository at this point in the history
  • Loading branch information
eisneinechse committed Jun 2, 2020
1 parent 6476f93 commit 93d12e7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/FFmpegWriter.cpp
Expand Up @@ -1266,6 +1266,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 93d12e7

Please sign in to comment.