# MKV file has too many frames

I'm trying to do some video editing with blender (sequence editor). I have imported a .mkv file of 91 minutes and it shows in blender as 4.4 million frames (which is obviously not accurate). It was recorded at 30 frames per second.
I can not set the end frame to the end of the video, the highest blender will apparently go is 1048574. As such I can't even cut out a half hour video because there doesn't seem to be a way to cut past the end frame. Is there a setting that allows me to set the end frame higher than 1 Million ?

edit: ffprobe output:

Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 1k fps, 30 tbr, 1k tbn, 60 tbc (default)


edit2: output from ffmpeg command from dr Sybren's answer
input:

Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 1k fps, 30 tbr, 1k tbn, 60 tbc (default)


output:

Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080, q=2-31, 1k fps, 30 tbr, 1k tbn, 30 tbc (default)

• Since MKV can contain pretty much all the video codecs on the planet, it's not enough to know the container format. What does ffprobe yourfile.mkv say? – dr. Sybren Oct 14 '17 at 23:38
• Edited with ffprobe output. It's recorded by OBS, set to 30 fps. – xyious Oct 15 '17 at 5:06

ffmpeg -i yourfile.mkv -c:v copy -c:a copy -r 30 newfile.mkv

• maybe Blender can't handle yuv420p(progressive). Changing that will require re-encoding your file, though: ffmpeg -i yourfile.mkv -c:v libx264 -crf 23 -pix_fmt yuv420p -c:a copy -r 30 newfile.mkv (you can add -t 30 to it to test on the first 30 seconds only). – dr. Sybren Oct 16 '17 at 7:21