#!/bin/sh [ -z "$1" ] && { echo "usage: $0 FILENAME" exit 1 } set -e file="$1" ffmpeg -i "$file" \ -map_metadata -1 \ -map_chapters -1\ -fflags +bitexact \ -metadata:s handler_name='' \ -metadata:s DURATION='' \ -metadata:s VENDOR_ID='' \ -empty_hdlr_name 1 \ -acodec copy -vcodec copy \ "nometa_$file" rm "$file" mv "nometa_$file" "$file"