Let’s start a thread with scripts that remove metadata from files.
I will start by sharing some that use ffmpeg
for mp4
files
Bash
for file in /path/to/folder/*.mp4; do ffmpeg -i "$file" -map_metadata -1 -c:v copy -c:a copy "/path/to/folder/$(basename "$file")"; done
Replace /path/to/folder
with the actual path to the folder containing the input files. This command will iterate over all mp4
files in the folder and execute the ffmpeg command with the same input and output filenames.
Emacs Lisp
(defun batch-process-mp4-files (folder)
(interactive "DSelect folder: ")
(async-shell-command
(format "for file in %s/*.mp4; do ffmpeg -i \"$file\" -map_metadata -1 -c:v copy -c:a copy \"%s/$(basename \"$file\")\"; done"
folder folder)))
Same as the above bash command, but you can just put the folder path interactively, and since it’s async-shell-command you can run multiple of them with ease.
What do you use?
You must log in or register to comment.