# SMPTE Timecode Calculator MCP

> SMPTE Timecode Calculator. This tool handles complex base-60 math for video professionals. You add, subtract, and convert SMPTE timecodes using native drop-frame logic (like 29.97 or 59.94). It fixes the common problem where LLMs hallucinate when dealing with frame-accurate calculations.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** smpte, timecode, video-editing, frame-accurate, drop-frame, media-production

## Description

When you're working with video timing, general-purpose AI models fail. They choke on base-60 math; they can’t handle drop-frame logic accurately. This tool fixes that mess. It’s built for media pipelines that require frame-accurate arithmetic. You give it the start and end points—the server runs the complex math natively, guaranteeing your timecodes are mathematically sound.

`add_timecodes` calculates the exact offset when you add two SMPTE timecodes together, handling every necessary frame rollover. If you're dealing with drop-frame standards or specific framerates, this tool manages that complexity for you. You can figure out the absolute end point if you know the starting marker and the duration needed. It doesn't just sum numbers; it understands how video time actually moves.

Need to measure a segment? Use `subtract_timecodes` to calculate the precise difference between any two SMPTE timecodes. This function lets you determine exact segment lengths or figure out what the start point needs to be relative to an endpoint. You simply feed it the pair of markers, and it spits out the accurate duration without any math errors.

If your data exists as raw numbers—a total absolute frame count—you'll use `frames_to_timecode`. This tool takes that raw frame number and converts it into a proper SMPTE formatted timecode string. You specify the total frame count alongside the framerate, and you get an official, usable timecode. It’s your conversion utility for turning pure counts into industry-standard markers.

When you're calculating offsets, `add_timecodes` works with specific framerates to ensure the addition accounts for drop-frame logic at every step of the calculation. You're not just adding hours and minutes; you’re adding time in a way that video editors expect. For instance, if you know a segment is 30 frames long, using `subtract_timecodes` lets you pinpoint where it starts by subtracting that duration from your final timestamp.

The system handles the arithmetic for both addition and subtraction, so whether you're measuring elapsed time or finding a future marker point, the math holds up. If you only have raw data—say, '150,000 frames' at 30 fps—you don’t have to guess how that translates into SMPTE format; `frames_to_timecode` handles the structure conversion automatically. It turns a simple count into usable time for your NLE or archival system.

You can use these tools together in sequence. For example, you might first convert a raw frame count using `frames_to_timecode`, then take that resulting marker and add a calculated duration to it using `add_timecodes`. This chaining capability means the whole process stays within mathematically verifiable video time parameters. You're eliminating guesswork from your post-production math.

Remember, these tools don’t just perform arithmetic; they enforce industry standards for base-60 calculations that general AI models simply can’t replicate. It's reliable timing math built directly into the server.

## Tools

### add_timecodes
Adds two SMPTE timecodes together, supporting drop-frame logic and specific framerates.

### frames_to_timecode
Converts a total absolute frame count into an official SMPTE formatted timecode string.

### subtract_timecodes
Calculates the difference between two SMPTE timecodes, useful for measuring segment lengths.

## Prompt Examples

**Prompt:** 
```
Add the timecode `00:01:23:14` to `00:02:45:21` assuming a 29.97 drop-frame video format.
```

**Response:** 
```
✅ **SMPTE Calculation:** Base-60 addition resulted precisely in `00:04:09:05`.
```

**Prompt:** 
```
Subtract exactly 30 frames from the starting timecode `00:01:00:00` at a standard 30fps rate.
```

**Response:** 
```
✅ **Frames Subtracted:** The resulting timecode is mathematically accurate: `00:00:59:00`.
```

**Prompt:** 
```
Translate an absolute position of 1500 frames into a readable timecode string for a 25fps video.
```

**Response:** 
```
✅ **Timecode Formatted:** 1500 frames at 25fps maps perfectly to `00:01:00:00`.
```

## Capabilities

### undefined
undefined

### undefined
undefined

### undefined
undefined

## Use Cases

### Syncing Multi-Camera Footage
A post editor has two camera takes that need to line up perfectly at the 3:05 mark. Instead of manually calculating the offset, they ask their agent to run `add_timecodes`, providing both start marks and the framerate. The tool returns a single, precise timecode for perfect synchronization.

### Calculating Clip Duration from Logs
You receive a log file stating that a segment runs from frame 1500 to frame 3200 at 24fps. Instead of converting both numbers, you use `frames_to_timecode` and then run `subtract_timecodes` to get the exact duration in timecode format.

### Finding a Start Point from an End Marker
The client wants to know what timecode starts exactly 1 minute before the final marker at `00:05:00:00`. The agent runs `subtract_timecodes`, passing the end mark and a duration of one minute, getting the exact starting point instantly.

### Testing Drop-Frame Markers
You are testing if your broadcast system correctly calculates offsets at 29.97 drop-frame. You run `add_timecodes` with two known marks and let the tool handle the complex math, guaranteeing the result is compliant.

## Benefits

- Accurate Offset Calculation: Use `add_timecodes` to find the exact time difference between two marks. It correctly handles complex base-60 rollovers and day transitions, something general LLMs struggle with.
- Broadcast Compliance: The server supports NTSC drop-frame logic (like 29.97 fps). This means your timing calculations respect industry standards, preventing synchronization failures on air.
- Instant Conversion: Need to map a frame count from metadata? `frames_to_timecode` takes an absolute number and instantly turns it into the correct HH:MM:SS:FF timecode string.
- Precise Measurement: Use `subtract_timecodes` to measure segment lengths or find starting points relative to an endpoint. You get a mathematically verifiable duration, not just an approximation.
- Reliable Workflow: By offloading this math to the dedicated server, you keep your video pipeline accurate and fast. No more manual spreadsheet checks needed.

## How It Works

The bottom line is you get reliable, frame-accurate video timing calculations that standard LLMs can't touch.

1. Start by identifying the required mathematical operation: are you adding offsets, subtracting marks, or converting raw frames?
2. Pass the necessary inputs to one of the three tools—for example, providing two timecode strings and the target framerate (e.g., 29.97) if using `add_timecodes`.
3. The server executes the base-60 math natively and returns a single, mathematically verified SMPTE formatted string result.

## Frequently Asked Questions

**How does add_timecodes handle drop-frame video formats?**
The `add_timecodes` tool automatically accounts for NTSC 29.97 or 59.94 drop-frame logic when performing additions. You just provide the timecode strings and the framerate, and it handles the complex math.

**Should I use add_timecodes or subtract_timecodes for finding duration?**
You should use `subtract_timecodes`. This tool is designed to calculate the difference between two marks, giving you a precise measurement of time elapsed. While addition could work in some cases, subtraction is the intended function for measuring segments.

**How do I convert raw frames to an SMPTE timecode using this server?**
Use `frames_to_timecode`. You pass the total absolute frame count and the correct framerate (e.g., 24 or 30). It converts that number into a fully formatted, readable timecode string.

**Does SMPTE Timecode Calculator support different framerates?**
Yes. All three tools require the specific framerate (e.g., 24, 25, 30) as an input parameter to ensure the base-60 math is applied correctly for that video standard.

**What are the required inputs when I call the `add_timecodes` tool?**
The tool needs three specific parameters: two SMPTE timecode strings and the exact framerate. You must provide the framerate (e.g., 29.97 or 30) so it can correctly handle base-60 arithmetic.

**If I use `subtract_timecodes` with non-standard timecode formats, what happens?**
The server requires two valid SMPTE formatted strings and a framerate. If the inputs don't match the expected structure or rates, it will return a validation error telling you exactly which parameter failed.

**Can `frames_to_timecode` handle timecodes from international standards other than NTSC?**
Yes. The tool calculates based on the framerate you supply. As long as you specify the correct base-60 parameters for your video format (like 25fps/PAL), it manages the conversion accurately.

**Are there any rate limits when running multiple calculations with `add_timecodes`?**
Vinkius handles connection management, but high-volume batch processing may hit standard API rate limits. If you need to calculate hundreds of times, check our service documentation for bulk usage advice.

**Does it support drop-frame?**
Yes, pass the dropFrame boolean parameter for exact NTSC compliance.

**What framerates are supported?**
All standard rates: 23.976, 24, 25, 29.97, 30, 50, 59.94, 60.

**Can it convert frames to timecode?**
Yes, absolute frame counting to SMPTE string is supported.