By Lucas, founder of FixMyVideos · Updated

Video Plays Too Fast or Too Slow: Where the Frame Rate Went Wrong

A clip that runs in fast forward or crawls in slow motion usually still holds every picture; the timing written next to them is off. Correct that timing and the file plays normally, often without re-encoding a frame.

Where a video file keeps its speed

An MP4 or MOV file does not hold "this is 30 fps" as one number the player obeys. Each track has a timescale (ticks per second, in the mdhd box) and a sample table, stts, that says how many ticks each picture lasts. The player shows picture N at the time those durations add up to. Write 1,001 ticks per picture at a timescale of 60,000 and you get 59.94 fps. Write 2,002 and the same pictures play at half speed.

The codec stream can carry its own timing too (an optional VUI section in the H.264 or H.265 SPS), but players follow the container. A file can decode perfectly and still play at the wrong speed.

The sample table lives in the index (the moov box), which recorders usually write last. When a recording stops abruptly, the pictures survive and the index does not, so their clock has to be worked out again from whatever else the file holds.

First, find out whether the file is wrong

Run this on the clip (ffprobe ships with ffmpeg):

ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate,avg_frame_rate,nb_frames,duration -of default=nw=1 clip.mp4

Then compare with what you set on the camera.

  • r_frame_rate is ffprobe's best guess at the base frame rate from the timestamps, not a count of how far apart most pictures sit. On interlaced footage it can read 59.94 for a perfectly good 29.97 clip, and on a variable-rate file it can name a rate no picture runs at. So before rescaling anything, watch the clip, or divide nb_frames by duration. If that gives 59.94 for a clip you shot at 29.97, the file plays twice as fast; 23.976 against a 29.97 shoot means 80 % speed and a clip 25 % longer.
  • avg_frame_rate is frames divided by duration. It can be far off on a perfectly good file. We measured 3.397 on a 3 minute 55 second iPhone 17 Pro Max clip recorded at 60 fps, because two of its pictures were held on screen for 24 and 195 seconds. The file was fine; its sample table recorded exactly that. A tool that took 3.397 as the frame rate would have broken it.
  • If the numbers look right but one program plays it wrong, try VLC or mpv. Right speed there means the file's timing is fine.

Fixing it yourself

In an editor. If the file is fine everywhere else but the editor reads its rate wrong, conform the clip. (When the clip is right and only the sequence is set to another rate, change the sequence settings instead.) In Premiere Pro, right-click the clip, then Modify, Interpret Footage, and "Assume this frame rate". In DaVinci Resolve, Clip Attributes lets you set the video frame rate per clip. The file is untouched.

In the file, without re-encoding. When the frame count is right but the timestamps are scaled wrong, stretch the video timestamps on input:

ffmpeg -itsscale:v 2 -i too_fast.mp4 -map 0 -c copy fixed.mp4

The factor is the rate the file claims divided by the rate you shot: 2 turns a 59.94 claim back into 29.97, 1.25 turns 29.97 into 23.976, and 0.5 speeds a half-speed file back up. Only the video is rescaled, so this lines the two up again when the audio already plays at its natural length.

Phone footage drifting in an editor. Phones can record at a variable frame rate, which some editors handle badly. Converting to a constant rate first is a common workaround:

ffmpeg -i phone.mov -fps_mode cfr -r 30 -c:v libx264 -crf 16 -c:a copy phone_cfr.mp4

That one does re-encode the picture, so keep the original.

None of this helps when ffprobe reports moov atom not found. Then the timestamps do not exist yet and have to be rebuilt.

How a lost frame rate gets rebuilt, and how it goes wrong

When our engine carves pictures out of a file whose index is gone, it looks for timing evidence in the file itself: timing written in the stream (the SPS), or per-frame timestamps some cameras store between pictures, or the rate stored with decoder settings learned from other files. Without any of those, it falls back on the audio used as a clock, and failing that, on a default. Each speed bug below came from one of those sources giving a confident wrong answer, and each passed every decode check.

No evidence, so the default won

A DJI Osmo Pocket 3 recording of 2.73 GB, H.265 at 3840x2160 and 29.97 fps, arrived with no index. The stream carried no timing, and at first the audio could not be lifted, so the preview fell back to the 23.976 default and played at 80 % speed. The pictures were not the only thing in the file, though. Between them, DJI writes a small record on every frame with a frame counter and a microsecond timestamp. Reading those gave a median spacing of 29.9697 fps, with almost no variation from frame to frame. Reading those records first is what the Osmo Pocket path does today.

The audio clock that lies

Sound is often the only clock a carved file has. Each AAC frame lasts exactly 1,024 samples, so counting frames measures time, and we have still watched that count mislead the engine more than once.

  • A carve that ends mid-period. Android's standard recorder (MPEG4Writer) writes about one second of audio, then about one second of pictures. A 31 MB phone clip had data only in its first 8 MiB, the rest erased flash. Its last audio chunk was a full second of sound in front of only 20 surviving pictures, so frames divided by audio read 27.14 fps for a 30 fps phone, about 10 % slow. Counting only up to the last complete period gives 29.50 fps, and all 110 pictures come back.
  • Audio that stops before the picture. A 3.35 GB recording made on a Windows 11 PC ran 81 minutes, but the recorder lost its audio device after 178 seconds. Frames over audio duration read 820 fps and got thrown out, which would have left the 23.976 default and a delivery 25 % too long. Worse, the timing that hangs every picture on the audio stopped advancing when the audio did, and the 81 minutes came out as about 3 minutes at 48,000 fps. Measuring the rate only over the stretch the audio covers, and letting the picture carry on at that rate after the sound ends, fixed both. Delivered at 30 fps, 146,306 of 146,306 frames.
  • Audio that measures length but not spacing. On a 720p30 Android .mov, the overall rate came out right, but the spacing between pictures swung between 16 and 46 fps, 49 frames were dropped by the muxer, and the video ended 4.47 s before its sound. H.264's frame_num counts reference pictures one by one, so spacing pictures on that count, inside the time the audio measures, puts them back where they belong. All 10,869 frames were placed on the timeline (the last one is cut short in the source), 365.212 s of video against 365.157 s of audio.

A clean decode does not prove the rate

When a carved stream has no decoder settings of its own, the engine tries settings learned from other files of the same codec and resolution. A Sony a7S III 4K 50p file decoded cleanly with settings stored under 100 fps, and came out twice as fast. Same-brand profiles at the same resolution decode each other's streams, so a clean decode says nothing about the rate. The engine now keeps every match and settles the rate with evidence, first the upload's own audio, then the stored settings' own timing. If nothing settles it, it ships the lowest candidate rate and flags it. A clip twice as slow is obvious in the preview, and you can correct it there. A clip twice too fast is easy to miss, and before this change one was delivered that way.

Evidence overwritten by a weaker guess

An Insta360 recording kept its index, which states 29.97 fps, yet the preview played at 60.2. The audio clock, holding 2.47 s of sound for a 4.97 s window, had re-timed a rate the container already gave. Audio no longer overrides a rate from the file's own index or stream, and the delivery runs at exactly 29.97.

A source that changes rate

A one-hour live-stream recording with no index ran gameplay at 60 fps but an ad-break slate at about 35. The stream's frame counter has no gap, because the encoder never saw the missing time, so one uniform rate drifted up to 24 seconds from the sound. Splitting the timeline where the audio says the rate changed, then snapping the stamps onto the 60 fps grid of the gameplay, closed that drift. Picture cuts into and out of the silent slate land within about 0.3 s of the audio edges.

What you see before you pay

The free 5-second preview plays at the rate the engine settled on, and the technical details show where that rate came from. If motion looks wrong, pick the standard rate you shot at in the preview settings and regenerate it. The rate you were looking at when you pay is the one the full recovery uses. Pricing is €6 under 2 GB, €18 from 2 to 20 GB, €35 from 20 to 50 GB and €59 above that, VAT included, paid only after the preview shows it is your video.

Upload the file and check the preview

When the speed is not the real problem

If the file plays smoothly at a constant wrong speed, its pictures are usually there and what remains is settling their timing. Some timing cannot be settled exactly (a phone that skipped pictures in its first second leaves no trace of when they were due), but the clip plays. The files we cannot help are the ones with no recording inside: a copy that is all zeros, an upload that is only a container header (we have received a 24-byte file holding nothing but ftyp), or a file that is the same few sectors repeated end to end (one 20 MB upload held 12 KB of distinct data). There is no speed to correct in those, and the analysis reports it before asking you for anything. The fix there is a new copy from the card, through a different reader if you can.

FAQ

Why did my recovered video come out in slow motion? A file rebuilt without its index has its frame rate inferred, and an inference can miss. When we rebuild one and several stored camera profiles fit at different rates, and nothing in the upload settles it, the engine picks the lower one, because a slow clip is easy to spot. With no evidence at all it uses 23.976. Either way, check the camera setting and pick that rate in the preview settings before paying.

Can I fix the speed without re-encoding? Yes, if the frame count is right. Rescale the video timestamps with ffmpeg's -itsscale:v and -c copy as shown above, or conform the clip in your editor. Both leave the pictures untouched.

Why does the sound slowly drift away from the picture? If the gap grows steadily from the first second, one stream has the wrong rate, and rescaling it fixes that. A phone clip that only drifts in an editor may be variable rate, and converting it to a constant rate helps. The audio out of sync page covers the other causes.

What happens to my file after I upload it? Files are deleted automatically after 48 hours. Nobody opens a file unless you ask us to or the automatic repair fails, and then only to recover it and to fix our repair software so the next file like it repairs on its own. Footage is never shared or used to train AI models. The privacy policy has the details.

Related

Free preview · No commitment

Ready to recover your video?

Upload your file and get a free 5-second preview in about a minute. Pay only if the preview looks right.

Upload your file →