ffmpeg_utils/strip-video-metadata.sh
2023-08-12 23:21:37 +03:00

24 lines
355 B
Bash
Executable File

#!/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"