LinuxCommandLibrary

qt-faststart

Move QuickTime/MP4 metadata to start of file

SYNOPSIS

qt-faststart <input_file> <output_file>

PARAMETERS

input_file
    The path to the source MP4 or MOV file that needs to be optimized.

output_file
    The path where the optimized output file will be saved. A new file is created.

DESCRIPTION

qt-faststart is a command-line utility designed to optimize MP4 and MOV video files for progressive downloading and streaming.

By default, many video encoding tools place the 'moov' atom (metadata containing essential information like duration, tracks, and timestamps) at the end of the file. This means a player must download the entire file before it can begin playback. qt-faststart re-writes the file, relocating this 'moov' atom from the end to the beginning.

This allows web browsers and media players to start playback almost immediately, as soon as the initial metadata and a small portion of the video data are downloaded, significantly improving the user experience for web-hosted video content. It does not re-encode the video or audio streams, only rearranges the file structure.

CAVEATS

qt-faststart requires sufficient disk space to create the output file, as it will be roughly the same size as the input file.

It only works for MP4 and MOV file formats and does not perform video or audio re-encoding, focusing solely on metadata rearrangement.

HOW <I>QT-FASTSTART</I> WORKS

qt-faststart scans the input file to locate the 'moov' atom. If found at the end of the file, it reads all media data, then writes the 'moov' atom to the beginning of the new output file, followed by the media data. This ensures the media player has all necessary structural information upfront to begin progressive playback.

HISTORY

qt-faststart emerged as a crucial utility to address the common problem of non-progressive MP4/MOV files served over HTTP. Before popular video tools like ffmpeg integrated direct 'faststart' options, this standalone program provided a simple solution, becoming a widely used method for optimizing web videos. While ffmpeg's own -movflags faststart option is now more commonly used for this purpose, qt-faststart remains a simple, effective, and often included utility in FFmpeg distributions.

SEE ALSO

ffmpeg(1), mp4box(1)

Copied to clipboard