eu-ai-label

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

EU AI content labels

欧盟AI内容标签

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).
将欧盟委员会官方的AI生成内容标注图标嵌入到图片和视频中。来源:https://digital-strategy.ec.europa.eu/en/policies/eu-icons-labelling-ai-generated-content (图标打包在
assets/
目录中,包含PNG和SVG格式,四种颜色变体)。

Quick start

快速开始

bash
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
.
bash
python3 scripts/ai-label.py <file...>          # 基础"AI"图标,右下角,自动配色
会在输入文件旁生成
<name>-ai-label.<ext>
文件,并打印推荐的替代文本。 从其他目录调用时请始终使用绝对路径,例如
python3 ~/.pi/agent/skills/eu-ai-label/scripts/ai-label.py clip.mp4

Pick the right variant

选择合适的变体

--variant
IconWhen 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
.
--variant
图标适用场景
ai
(默认)
"AI"标识AI参与创建深度伪造内容或发布文本,或你添加了自定义文本标签/第二层内容(例如“语音由……生成”+图标)
generated
"AI GENERATED"内容完全由AI生成,除提示词外无人类创作元素或编辑控制
modified
"AI MODIFIED"已有的人类创作内容经AI部分修改(换脸、AI布置房间等)
若场景不明确,请询问用户;不确定时默认使用
ai
变体。

Common usage

常见用法

bash
undefined
bash
undefined

fully AI-generated video, white icon, bottom-left, slightly bigger

完全AI生成的视频,白色图标,左下角,尺寸稍大

python3 scripts/ai-label.py clip.mp4 -v generated -c white -p bottom-left --height 10
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
python3 scripts/ai-label.py photo.jpg -v modified

batch into a folder (note: use --suffix=-xyz for values starting with a dash)

批量处理文件夹中的文件(注意:对于以连字符开头的后缀,使用--suffix=-xyz)

python3 scripts/ai-label.py shots/*.png --outdir labelled/ -v generated
python3 scripts/ai-label.py shots/*.png --outdir labelled/ -v generated

label only the first 5 seconds (still must be visible at first exposure)

仅标注前5秒(必须在首次展示时可见)

python3 scripts/ai-label.py clip.mp4 --enable 'between(t,0,5)'
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 'white@0.85'
python3 scripts/ai-label.py clip.mp4 --padding 10 --padding-color 'white@0.85'

just get the raw asset path / alt text for use elsewhere (web, editor, Figma)

仅获取原始资源路径/替代文本用于其他场景(网页、编辑器、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
undefined
python3 scripts/ai-label.py --print-asset generated --color black python3 scripts/ai-label.py --print-alt modified python3 scripts/ai-label.py --list
undefined

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).
  • -c/--color auto|black|white
    auto
    会采样目标角落的颜色,选择对比鲜明的图标。
  • --half
    — 50%透明度的图标变体(仅当完全不透明的图标过于醒目时使用)。
  • -p/--position
    bottom-right
    (默认)、
    bottom-left
    top-right
    top-left
    bottom-center
    top-center
    ;缩写
    br/bl/tr/tl/bc/tc
    同样有效。
  • 尺寸:
    --height
    (占帧高度的百分比,默认8)或
    --width
    (占帧宽度的百分比),或绝对像素值
    --height-px
    /
    --width-px
    。限制:
    --min-px
    (24)、
    --max-width
    (40%)。
  • --margin
    占较短边的百分比(默认2.5)或
    --margin-px
    (像素值)。
  • 视频编码:
    --crf 18
    --preset medium
    --vcodec libx264
    ;音频采用流复制。可通过
    --ffmpeg-arg
    添加其他参数。
  • -n/--dry-run
    打印ffmpeg命令,
    -f/--force
    覆盖已有文件,
    --no-metadata
    跳过披露注释标签。
行为说明:图片保留原有格式(JPEG质量为2,PNG默认扁平化,除非使用
--keep-alpha
), GIF会重新编码并生成调色板,纯音频输入会被跳过并给出提示(欧盟图标是视觉标识——需在播放器界面、描述或附带标签中披露音频相关信息)。

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.
除非用户明确覆盖,否则请遵循以下规则:
  1. 首次展示时可见 — 第一帧/首屏可见,不能仅在结尾出现。
  2. 放置在无UI覆盖的位置(避开平台特定的热区,如TikTok/Reels右侧栏或YouTube进度条区域——此时优先选择
    top-left
    bottom-left
    )。
  3. 嵌入像素中 确保在转发和下载后仍能保留;仅添加元数据是不够的。
  4. 尺寸清晰可见——不要缩小到帧高度的5%以下;默认的8%是合适的下限。
  5. 为发布该文件的任何平台提供推荐的替代文本/ARIA标签(脚本会打印该内容;也可通过
    --print-alt
    获取)。
  6. 若披露有时间限制,需在屏幕上保留足够长的时间以便阅读。
完整规则和范围: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.
  • 使用该图标本身并不代表符合法律要求。部署者仍需遵守《人工智能法案》第50条的责任;《行为准则》签署方必须遵循其放置规范。
  • 并非所有内容都需要标注:标注义务涵盖深度伪造内容(模仿真实人物/地点/事件的图像/音频/视频)以及未经人类编辑审核发布的、涉及公共利益的AI生成文本。艺术/讽刺/虚构作品的披露要求有限,且不得影响作品的观赏体验;执法机构授权的使用场景可豁免。
  • 该图标是一种视觉披露方式,而非来源证明。如需机器可读的来源信息,可额外使用C2PA / Content Credentials(内容凭证)。