mcpField
E
eu-ai-label

eu-ai-label

github.com/run-labs-comCreative & media2169 installsUpdated 5w ago
Repository

About eu-ai-label

eu-ai-label is a Python skill for adding European Commission AI disclosure icons to images and videos. It serves people preparing labelled media, with controls for label type, placement, size, and video encoding.

Key features

  1. 01Burns AI disclosure icons into images and videos
  2. 02Offers AI, AI GENERATED, and AI MODIFIED variants
  3. 03Configures color, placement, and dimensions
  4. 04Supports batch processing and dry runs
  5. 05Prints recommended alt text

Use cases

  1. 01Marking fully AI-generated videos
  2. 02Labelling photos partially modified with AI
  3. 03Processing multiple images with a shared label

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/run-labs-com/agent-skills --skill eu-ai-label

After installing, type/eu-ai-labelin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
SOURCE.md
assets/svg/
ai-black-50.svg
ai-black.svg
ai-generated-black-50.svg
ai-generated-black.svg
ai-generated-white-50.svg
ai-generated-white.svg
ai-modified-black-50.svg
ai-modified-black.svg
ai-modified-white-50.svg
ai-modified-white.svg
ai-white-50.svg
ai-white.svg
references/
eu-rules.md
scripts/
ai-label.py

Details

From the project README

EU AI content labels

Burns the official European Commission icons for labelling AI-generated content into images and videos. Source: https://digital-strategy.ec.europa.eu/en/policies/eu-icons-labelling-ai-generated-content (icons bundled in assets/, PNG + SVG, all four colour variations).

Quick start

python3 scripts/ai-label.py <file...>          # basic "AI" icon, bottom-right, auto colour

Writes <name>-ai-label.<ext> next to the input and prints the recommended alt text. Always use the absolute skill path when calling from another directory, e.g. python3 ~/.pi/agent/skills/eu-ai-label/scripts/ai-label.py clip.mp4.

Pick the right variant

--variantIconWhen to use
ai (default)"AI" badgeAI was involved in creating a deep fake or published text, or you add your own text label / second layer (e.g. "voices generated with" + icon)
generated"AI GENERATED"The whole thing is AI-generated, no human-created elements or editorial control beyond prompting
modified"AI MODIFIED"Pre-existing human-made content partially altered with AI (face swap, AI-furnished room, …)

Ask the user which case applies if it is not obvious; when unsure default to ai.

Common usage

# fully AI-generated video, white icon, bottom-left, slightly bigger
python3 scripts/ai-label.py clip.mp4 -v generated -c white -p bottom-left --height 10

# partially modified photo
python3 scripts/ai-label.py photo.jpg -v modified

# batch into a folder (note: use --suffix=-xyz for values starting with a dash)
python3 scripts/ai-label.py shots/*.png --outdir labelled/ -v generated

# label only the first 5 seconds (still must be visible at first exposure)
python3 scripts/ai-label.py clip.mp4 --enable 'between(t,0,5)'

# busy background: add a backing plate
python3 scripts/ai-label.py clip.mp4 --padding 10 --padding-color '[email protected]'

# just get the raw asset path / alt text for use elsewhere (web, editor, Figma)
python3 scripts/ai-label.py --print-asset generated --color black
python3 scripts/ai-label.py --print-alt modified
python3 scripts/ai-label.py --list

Options that matter

  • -c/--color auto|black|white — auto samples the target corner and picks the contrasting icon.
  • --half — the 50 %-transparency icon variants (only when the full-opacity one is too dominant).
  • -p/--position — bottom-right (default), bottom-left, top-right, top-left, bottom-center, top-center; br/bl/tr/tl/bc/tc aliases work.
  • Size: --height (% of frame height, default 8) or --width (% of frame width), or absolute --height-px / --width-px. Guards: --min-px (24), --max-width (40 %).
  • --margin % of the shorter side (default 2.5) or --margin-px.
  • Video encode: --crf 18, --preset medium, --vcodec libx264; audio is stream-copied. Add anything else with --ffmpeg-arg.
  • -n/--dry-run prints the ffmpeg command, -f/--force overwrites, --no-metadata skips the disclosure comment tag.

Behaviour notes: images keep their format (JPEG q2, PNG flattened unless --keep-alpha), GIFs are re-encoded with a generated palette, audio-only inputs are skipped with a hint (the EU icons are visual — disclose audio in the player UI, description or an accompanying label).

Metadata is video-only. The disclosure comment tag is written for video containers (MP4/MOV/…), but ffmpeg's still-image muxers discard it, so PNG/JPEG/WebP/TIFF/GIF outputs carry no tag — the script says so instead of pretending otherwise. This is cosmetic for compliance: Art. 50 wants a visible mark, and the label is burned into the pixels either way. To add a tag anyway: exiftool -Comment='…' out.png.

Placement rules to respect

Follow these unless the user explicitly overrides them:

  1. Visible at first exposure — first frame / above the fold, not only at the end.
  2. Put it where no UI overlay covers it (avoid platform-specific hot corners such as the TikTok/Reels right rail or a YouTube progress bar area — prefer top-left or bottom-left there).
  3. Burn it into the pixels so it survives resharing and downloading; metadata alone is not enough.
  4. Clearly visible size — don't shrink below ~5 % of frame height; the default 8 % is a good floor.
  5. Give the recommended alt text / ARIA label to any surface that publishes the file (the script prints it; also available via --print-alt).
  6. If the disclosure is time-limited, keep it on screen long enough to read.

Full rules and scope: references/eu-rules.md.

Important caveats

  • Using the icon does not by itself establish legal compliance. Deployers stay responsible under Article 50 AI Act; signatories of the Code of Practice must follow its placement specs.
  • Not everything needs a label: the duty covers deep fakes (image/audio/video resembling real persons/places/events) and AI-generated text on matters of public interest published without human editorial review. Artistic/satirical/fictional works get limited disclosure that must not hamper enjoyment of the work; law-enforcement-authorised uses are exempt.
  • The icon is a visual disclosure, not provenance. For machine-readable provenance use C2PA / Content Credentials in addition.

Comments

Markdown supported