From 69559226d795d3a1981ea43b03b1128103c4480c Mon Sep 17 00:00:00 2001 From: Victor Kuznetsov Date: Sat, 30 May 2026 13:20:04 -0700 Subject: [PATCH] Clarify metadata command supports video/audio, drop misfiring format warning (#33) The `metadata` command handles more than images: `remove_ai_metadata` strips C2PA / AIGC provenance from MP4/MOV/M4V/M4A and from WebM/MP3/WAV/FLAC/OGG via ffmpeg. But the help said "from images" and the shared `_validate_image` call printed "Warning: .mp4 may not be supported" on exactly those supported containers. The argument's `exists=True` already enforces the file exists, so the validation call only added the wrong warning here. Update the docstring to list the real format coverage and drop the image-only validation from this command. The image commands keep it. Co-authored-by: Claude Opus 4.8 --- src/remove_ai_watermarks/cli.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/remove_ai_watermarks/cli.py b/src/remove_ai_watermarks/cli.py index 6b7d606..f270e24 100644 --- a/src/remove_ai_watermarks/cli.py +++ b/src/remove_ai_watermarks/cli.py @@ -483,14 +483,20 @@ def cmd_metadata( output: Path | None, keep_standard: bool, ) -> None: - """Check or remove AI-generation metadata from images. + """Check or remove AI-generation metadata (images, video, and audio). - Strips EXIF AI tags, PNG text chunks, and C2PA provenance manifests. + Strips EXIF AI tags, PNG text chunks, C2PA provenance manifests, and the + China TC260 AIGC label. Beyond images (PNG/JPEG/WebP/AVIF/HEIF/JXL) it also + strips provenance metadata from MP4/MOV/M4V/M4A containers and, via ffmpeg, + from WebM/MP3/WAV/FLAC/OGG. The coded image, audio, and video data are left + untouched. """ from remove_ai_watermarks.metadata import get_ai_metadata, has_ai_metadata, remove_ai_metadata + # No _validate_image() here: unlike the image-only commands, metadata also + # accepts video/audio containers, so the image-format warning would misfire. + # click's `exists=True` on the argument already enforces the file exists. _banner() - source = _validate_image(source) if check or (not remove): has_ai = has_ai_metadata(source)