Take the 2-minute tour ×

How can I remove all metadata from all formats via FFmpeg?

I can just set special metadata for each format per man ffmpeg. Any option or method to clear all metadata and strip media from all metadata available on ffmpeg?

   -metadata key=value
       Set a metadata key/value pair.

       For example, for setting the title in the output file:

share|improve this question
add comment

2 Answers

NOTE: I have since gotten an up-to-date ffmpeg (not the outdated version of avconv in the Ubuntu repositories), and now shlck's -map_metadata -1 works perfectly. If you can, use that solution instead (less typing). I'm leaving this here for anyone using an outdated version.

The easiest way to do this is to set -map_metadata to use one of the input streams, rather than using global metadata. 99% of the time this should work. NOTE: I'm using avconv, because that's in the Ubuntu 12.04 repositories; this will probably be drop-in compatible with ffmpeg, since their syntax always is in my experience.






share|improve this answer
add comment

Slightly modifying the command line by @izx, I got this:

ffmpeg -i in.mov -map_metadata -1 -c:v copy -c:a copy out.mov

The result is (again, checked with exiftool), a metadata record reduced from 81 to 52 lines. Note that you can't simply remove all metadata, some things will stay. However, I didn't get the creation date to change, which is strange because it seemed to work in the Ubuntu version.

I posted on the FFmpeg mailing list, asking whether there were any updates or comments on that. Let's see what they have to say.

share|improve this answer
In mov or mp4 files, creation date is an integer field in the movie header and track headers (expressed as seconds since 1904). Although you could set it to 0 or some other fixed value, there is no way to remove it and still have a valid mov or mp4 file. –  mark4o Dec 18 '12 at 7:34
I know I couldn't remove it entirely, but changing wasn't possible for some reason. –  slhck Dec 18 '12 at 7:39
Using the current ffmpeg, the creation time can be changed with -metadata creation_time=2012-12-17T21:30:00 (UTC). –  mark4o Dec 18 '12 at 7:46
How can i modify this to remove the title too? Currently it sets the title to something automatically generated. I want to see the full filename as title in the end. –  Rookie Jun 15 at 11:26
@Rookie Then you need to set -metadata title="Some Value". Or, for a file, something like this for an MP4 file: ffmpeg -i "$file" -map_metadata -1 -c copy -metadata title="$file" "${file%%*.mp4}-new.mp4 –  slhck Jun 15 at 13:25
add comment

Your Answer


