Remove All Metadata From Video Using FFmpeg
This article provides a quick, straightforward guide on how to strip all metadata from a video file using FFmpeg on a Linux system. You will learn the exact command needed to clean your files for privacy or optimization, understand how the command works, and see a practical example of it in action.
The FFmpeg Command to Strip Metadata
To remove all metadata—such as camera details, location data, creation time, and software tags—without re-encoding your video, use the following command structure in your Linux terminal:
ffmpeg -i input.mp4 -map_metadata -1 -c:v copy -c:a copy output.mp4How the Command Works
-i input.mp4: Specifies the path to your original video file.-map_metadata -1: This is the core flag. Telling FFmpeg to map metadata to the index-1instructs it to ignore and completely strip all global, stream, chapter, and program metadata.-c:v copy -c:a copy: Stream copies the video (-c:v) and audio (-c:a) codecs. This ensures the process is nearly instantaneous because it does not re-encode the actual video and audio data, preserving 100% of the original quality.output.mp4: The name of your new, metadata-free video file.
Verifying the Results
To ensure that the metadata has been successfully removed, you can
use the ffprobe tool, which comes bundled with FFmpeg.
Run this command on your new file:
ffprobe -show_entries format_tags output.mp4If the process was successful, the terminal output under the format tags section will be empty, confirming that your video file is clean.