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
位置: 深圳市宝安区南光高速洲石路出口前约2公里路段

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

安装

本地目录安装:

pip install .

从 wheel 安装:

pip install dist/traffic_video_watermark_cli-0.1.0-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 "深圳市宝安区南光高速洲石路出口前约2公里路段"

如果不传 --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.0.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.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for traffic_video_watermark_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2bc1c8e906a5d9e65a74a92d101deb7a51c07e4d6b991fccfe84d15e55b24a34
MD5 2d15953704f15a163bb583e18a5620e4
BLAKE2b-256 fcf65340b181212786fd99dc0af3b205d929d6b709fa587711e441d71bb2d348

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for traffic_video_watermark_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4269bd6384017e4788e6ae48ea214e4b0f3f59b891c59682c540788d7bc6c837
MD5 dd36a861c5eb9890941b7e78b8a398f9
BLAKE2b-256 c14b6b4f89d2c7d230fa0a594255c6bff8fea322b82843497a246c812ed70cef

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