Fix Video Duration

Upload a clip whose duration is missing, Infinity, or wrong and rebuild its container locally with stream copy. The audio and video are copied unchanged — only the duration metadata is repaired.

Try:
Duration-fixed video

About this tool

Use this tool when a video plays fine but its duration is missing, shows as Infinity, jumps to 0:00, or is simply wrong. This is common with clips recorded by the browser MediaRecorder API, screen recorders, and interrupted downloads: the packets are intact but the container header never got a correct duration written to it.

The fix is a remux — ffmpeg reads every packet with stream copy (-c copy) and writes a brand-new container header with the real duration and index. Because nothing is decoded or re-encoded, the audio and video are copied bit-for-bit and there is no quality loss. Everything runs locally in your browser; the file is never uploaded.

Worked example

Upload a screen-recording capture.webm whose duration reads as Infinity, leave Output container on keep, tick Regenerate timestamps, and download capture-duration-fixed.webm. The rebuilt file reports its true length (for a two-second clip, ffprobe now shows duration=2.028000 instead of N/A), while the VP9/Opus streams are unchanged.

To make a web-ready file at the same time, choose Output container = mp4 and keep Web fast-start on: the moov atom (the index that holds the duration) is moved to the front of the file so players and websites read the correct length immediately and the clip streams progressively.

Options

Limits and edge cases

FAQ

Why does my recorded WebM say the duration is Infinity?

Recorders that use the browser MediaRecorder API write the file header before they know how long the recording will be, so the duration field is left empty and players report Infinity. Remuxing reads the actual packets and writes the real duration into a fresh header, which is exactly what this tool does — enable Regenerate timestamps for these files.

Does fixing the duration reduce quality?

No. The remux uses stream copy (-c copy), so the encoded audio and video packets are copied unchanged into a new container. Nothing is decoded or re-encoded, so the result is bit-for-bit identical apart from the corrected container metadata.

What is "web fast-start" and when should I use it?

MP4 and MOV files store an index called the moov atom. If it sits at the end of the file, a browser must download the whole file before it knows the duration or can seek. Fast-start (-movflags +faststart) rewrites the file with that index at the front, so websites can play and scrub it progressively. It only applies to MP4/MOV output.

Can I change the exact duration to a specific value?

No. This tool repairs the duration to match the real content by rebuilding the container; it does not let you set an arbitrary duration. Setting a made-up length without re-encoding would either truncate the stream or desynchronize audio and video, so it is intentionally out of scope.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool video-duration-fix-remux 'url=https://example.com/input' 'container=keep' 'faststart=true' 'regen_timestamps=true'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/video-duration-fix-remux/?url=https://example.com/input&container=keep&faststart=true&regen_timestamps=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.