23
Removing metadata scripts (lemmy.dbzer0.com)

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?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 28 Jun 2023
23 points (100.0% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

54746 readers
621 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder

📜 c/Piracy Wiki (Community Edition):


💰 Please help cover server costs.

Ko-Fi Liberapay
Ko-fi Liberapay

founded 1 year ago
MODERATORS