How to extract and modify data rate and time scale from OpenDML (AVI) file
ffprobe can supply the frame rate as a rational value

ffprobe in.avi -show_entries stream=r_frame_rate,avg_frame_rate -select_streams v -v 0 -of compact=p=0:nk=1


The first rational value is from the stream header; the 2nd is the computed value which will differ for a variable frame rate stream