Skip to content

Commit

Permalink
fix incorrect variable_frame_rate on 59.94 in Matroska
Browse files Browse the repository at this point in the history
After transcoding or remuxing a 60000/1001 frame rate video with ffmpeg
into a matroska file, ffprobe reports r_frame_rate=19001/317
avg_frame_rate=19001/317. Strange, but close and falsely idenitied as
VFR. Add to the heuristic that AVStream avg_frame_rate must not equal
r_frame_rate.
  • Loading branch information
ddennedy committed Jul 8, 2024
1 parent 18114dd commit f17e28c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/avformat/producer_avformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,8 @@ static void find_first_pts(producer_avformat self, int video_index)
AVStream *stream = self->video_format ? self->video_format->streams[video_index] : NULL;
if (stream) {
int d = stream->avg_frame_rate.den;
vfr = d != 0 && d != 1 && d != 2 && d != 125 && d != 1001;
vfr = d != 0 && d != 1 && d != 2 && d != 125 && d != 1001
&& av_cmp_q(stream->avg_frame_rate, stream->r_frame_rate);
}
}
if (vfr) {
Expand Down

0 comments on commit f17e28c

Please sign in to comment.