← 返回
未分类

val

Add logo watermark to mp4 videos in D:\workspace using moviepy. Handles discovering new videos, batch processing with configurable position/size, and auto-archiving to 完成 directory. Triggered by requests like "增加logo", "添加水印", "处理视频", "执行任务".
Add logo watermark to mp4 videos in D:\workspace using moviepy. Handles discovering new videos, batch processing with configurable position/size, and auto-archiving to 完成 directory. Triggered by requests like "增加logo", "添加水印", "处理视频", "执行任务".
user_aa378cba
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 49
下载
💾 0
安装
1
版本
#latest

概述

Video Logo Watermark

Overview

Add a logo watermark (from D:\logo\logo_black_text.png) to mp4 videos placed in

D:\workspace\. After processing, source videos are moved to

D:\workspace\完成\源文件\ and watermarked videos to D:\workspace\完成\增加logo\.

Workflow

Step 1: Discover new videos

List mp4 files in D:\workspace\ root that do NOT already have _with_logo in

their name:

Get-ChildItem -Path D:\workspace -Filter *.mp4 -File |
  Where-Object { $_.BaseName -notmatch "_with_logo$" } |
  Select-Object Name, @{N="SizeMB";E={[math]::Round($_.Length/1MB,1)}}

Step 2: Update the script

The processing script is scripts/add_logo.py. Copy it to D:\workspace\add_logo.py

before running. Modify the tasks list at the top of the script with the discovered

filenames:

tasks = [
    ("filename1.mp4", 0.25, "bottom-center"),
    ("filename2.mp4", 0.25, "bottom-center"),
]

Each task tuple: (filename, logo_width_ratio, position).

Position options:

  • "bottom-center" — centered at bottom, 20px margin from edge
  • "bottom-right" — bottom-right corner, 20px margin
  • (x, y) — custom pixel coordinates

Step 3: Run the script

& "C:\Users\Administrator\.workbuddy\binaries\python\envs\default\Scripts\python.exe" D:\workspace\add_logo.py

The script:

  1. Reads each video, overlays the logo
  2. Writes output as {name}_with_logo.mp4
  3. Auto-archives: source → 完成\源文件\, output → 完成\增加logo\
  4. Skips files that already have a _with_logo output

Step 4: Deliver results

After processing, deliver the watermarked video(s) from

D:\workspace\完成\增加logo\ using deliver_attachments.

Environment

  • Python: C:\Users\Administrator\.workbuddy\binaries\python\envs\default\
  • Dependencies: moviepy, Pillow (already installed)
  • Logo file: D:\logo\logo_black_text.png
  • Script: scripts/add_logo.py (copy to D:\workspace\add_logo.py before running)

Default Parameters

| Parameter | Default | Notes |

|-----------|---------|-------|

| Position | bottom-center | Also supports bottom-right, custom (x,y) |

| Logo width | 25% of video width | Range typically 15%-50% |

| Margin | 20px | From edge of video |

| Archive source | D:\workspace\完成\源文件\ | Auto-created if missing |

| Archive output | D:\workspace\完成\增加logo\ | Auto-created if missing |

Notes

  • The script uses moviepy with libx264/aac codecs for broad compatibility
  • Warning about last-frame bytes missing is benign — moviepy fills with last valid frame
  • If a video already has a _with_logo counterpart, it is skipped
  • Update working memory (YYYY-MM-DD.md and MEMORY.md) after each batch

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-05-23 23:44 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 216 📥 47,253
design-media

Video Frames

steipete
使用 ffmpeg 从视频中提取帧或短片。
★ 134 📥 52,813
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 429 📥 116,719