Skip to main content

Cross-platform CLI tool to burn timestamp and location watermarks into traffic report videos.

Project description

Traffic Video Watermark CLI

跨平台命令行工具,用于给交通举报视频烧录动态时间和位置水印,并导出可播放 MP4。

水印格式:

时间: 2026-04-27 09:11:50
位置: 某市某路段附近

工具会优先读取视频容器里的 creation_time,按上海时区换算为画面时间;如果视频没有该元数据,会尝试从常见行车记录仪文件名里的时间读取。

安装

本地目录安装:

pip install .

从 wheel 安装:

pip install dist/traffic_video_watermark_cli-0.1.1-py3-none-any.whl

使用

只查看视频信息:

traffic-watermark --input 2026-04-27_09-11-50-front.mp4 --info

生成水印视频:

traffic-watermark \
  --input 2026-04-27_09-11-50-front.mp4 \
  --output report-watermarked.mp4 \
  --location "某市某路段附近"

如果不传 --output,默认输出到输入视频同目录,文件名后追加 -watermarked.mp4

发布到 PyPI

构建发布包:

python -m pip install -e ".[build]"
python -m build
python -m twine check dist/*

上传到 PyPI 需要 PyPI API token:

python -m twine upload dist/*

也可以使用环境变量:

set TWINE_USERNAME=__token__
set TWINE_PASSWORD=pypi-你的token
python -m twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traffic_video_watermark_cli-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traffic_video_watermark_cli-0.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file traffic_video_watermark_cli-0.1.1.tar.gz.

File metadata

File hashes

Hashes for traffic_video_watermark_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6767bc89217ea9ae3335d51a9cbbfd3f92bb0ac97ab3204e1506669ff6ab7ba5
MD5 1befab08089243e06538dcc0012c2545
BLAKE2b-256 36f7737302f65a27ad9dbfefd112b86ff91008efbbe5596ff6411898ac829950

See more details on using hashes here.

File details

Details for the file traffic_video_watermark_cli-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for traffic_video_watermark_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fc0ea99d513e7cc73e6839c96694aa17cd7161b4da95a857914ab8a21f415f3
MD5 af19c715eb7457fad53ca8bc2733882c
BLAKE2b-256 95ed1d130ee7c2605fc9cb4585a8a821693b3a3eb6c89340168bf0200f01548d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page