mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-06-05 02:28:00 +02:00
f9cf14c372
remove_ai_metadata now handles non-ISOBMFF audio/video (which the box walker can't reach) by shelling out to ffmpeg with a lossless stream copy (`-map_metadata -1 -map_chapters -1 -c copy`): codec data is untouched, only container tags/chapters (ID3 / RIFF / Vorbis comments / EBML tags) are dropped. Requires ffmpeg on PATH; raises a clear RuntimeError if absent or if ffmpeg can't parse the input (instead of crashing in the image path). Verified end-to-end: a real ffmpeg-made WAV/MP3 with a "Suno AI" title tag -> tag gone, audio bytes preserved. NOT built (evaluated, deliberate): Resemble PerTh audio *detection* -- `get_watermark()` returns a raw bit array with no presence/confidence flag, so reliably telling watermarked from clean needs Resemble's fixed payload or a confidence API (neither public; no real sample to calibrate). Same wall as the SynthID pixel detector. AVIF/HEIF meta-box EXIF/XMP stripping also stays a gap (needs exiftool, a non-installed binary). Both documented in CLAUDE.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>