Skip to content

Commit

Permalink
fix: set frame_rate for rtmp streams #1462
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 25, 2025
1 parent d7b6e90 commit a1d2fe2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/ffmpeg/consumer/ffmpeg_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ struct Stream
if (codec->type == AVMEDIA_TYPE_VIDEO) {
st->time_base = av_inv_q(av_buffersink_get_frame_rate(sink));

// Ensure the frame_rate is set in a way that rtmp will find it
st->avg_frame_rate = av_buffersink_get_frame_rate(sink);

enc->width = av_buffersink_get_w(sink);
enc->height = av_buffersink_get_h(sink);
enc->framerate = av_buffersink_get_frame_rate(sink);
Expand Down

0 comments on commit a1d2fe2

Please sign in to comment.