How to convert frames to seconds (and back) at any fps

Seconds = frames ÷ fps, and frames = seconds × fps. How to convert frames and timecode at 24, 23.976, or 29.97 fps, and why Sume takes seconds.

5 min readSume
All posts

To convert frames to seconds, divide the frame count by the frame rate: seconds = frames ÷ fps. To go the other way, multiply: frames = seconds × fps, so 5 seconds is 120 frames at 24 fps, 150 at 30 fps, and 300 at 60 fps. For 23.976 and 29.97 fps footage, use the exact rates, 24000/1001 and 30000/1001.

The exact rates and FFmpeg's time syntax come from FFmpeg's utilities, ffmpeg, and filters documentation, and Sume's fields from the Video trim, Timeline 1.0, and Video frames docs and the Sume API reference, read on 2026-09-28. Anything described as current behavior is read from Sume's code.

How many frames is 5 seconds?

It depends on the frame rate. At 23.976 and 29.97 fps, 5 seconds isn't a whole number of frames, so the 5-second mark falls between two frames; round to the nearest frame when you need one.

Exact rates from FFmpeg's video rate syntax, read 2026-09-28. The other columns are computed from them.
Frame rateOne frame lastsFrames in 5 secondsFrames in 1 minute
23.976 fps41.708 ms119.881,438.56
24 fps41.667 ms1201,440
25 fps40.000 ms1251,500
29.97 fps33.367 ms149.851,798.2
30 fps33.333 ms1501,800
60 fps16.667 ms3003,600

How do I convert timecode to seconds?

Timecode labels each frame as hours:minutes:seconds:frames (HH:MM:SS:FF). At a whole frame rate, seconds = hours × 3600 + minutes × 60 + seconds + frames ÷ fps, so 00:01:10:12 at 24 fps is 70.5 seconds.

  • At 23.976 or 29.97 fps, non-drop-frame timecode still counts 24 or 30 frames per timecode second. Count frames first, (hours × 3600 + minutes × 60 + seconds) × 24 (or 30) + frames, then divide by the real rate, 24000/1001 or 30000/1001. One timecode hour at 23.976 fps is 3,603.6 real seconds.
  • Drop-frame timecode, a 29.97 fps variant, skips frame numbers (not frames) to stay close to real time, so it needs its own conversion. Check which kind your editor shows before you convert.

Does FFmpeg take frames or timecode?

Not in its time options. -ss, -t, and -to take a time duration, written [-][HH:]MM:SS[.m...] or as a number of seconds with an optional s, ms, or us suffix, and that syntax has no field for frames. Convert the frame part to a decimal first: for 00:01:10:12 at 24 fps, pass 70.5 or 00:01:10.5.

To cut by frame number instead, use FFmpeg's trim filter: its start_frame is the number of the first frame passed to the output, and end_frame the number of the first frame dropped. Those options count the frames that pass through the filter rather than reading timestamps.

What units do Sume's editing tools use?

Seconds. Their time fields take seconds, not frames or timecode, so convert before you call. The tools read only your workspace's media.sume.com files, such as an earlier Sume job's output. Get a video's duration, resolution, and fps shows how the free probe reports a clip's fps, the average frame rate rounded to three decimals in current code.

  • Video trim: start, end, and duration are seconds, and end is exclusive, since trim cuts [start, end). In current code, trim passes the start and the length to FFmpeg rounded to three decimals, a millisecond, which is finer than one frame at any of these rates.
  • Timeline 1.0: each video[] slot's start and duration are seconds. A transition must last at least one output frame, and in current code a transition that falls between frames is snapped to the nearest whole frame, moving by at most half a frame, with the warning transition_snapped_to_frame. Video transitions API covers the snap.
  • Video frames: every at[] value is seconds, at least 0 and less than the clip's duration, or the job fails with frame_time_out_of_range.
# Frames 240 up to 480 of a 24 fps clip: 240 ÷ 24 and 480 ÷ 24
curl -X POST https://api.sume.com/v1/video-trim \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: trim-frames-240-480" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/clip.mp4",
    "start": 10,
    "end": 20
  }'

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume