plugins
滤镜 Filter
滤镜:gpstext
  • 目录

插件信息

title: GPS 文本
media types: Video
description: 将 GPS 相关文本叠加到视频上
version: 8
creator: Daniel F
copyright: Meltytech, LLC
license: LGPLv2.1

说明

GPS 文本滤镜会在待叠加的文本中查找关键字,并逐帧替换这些关键字。它基于 dynamictext 滤镜实现。

参数

argument

title: GPS 文本
description:

要叠加的文本。可以包含用 "#" 包围的关键字。
关键字包括:
  * #gps_lat#           - GPS 纬度值
  * #gps_lon#           - GPS 经度值
  * #gps_elev#          - GPS 海拔值
  * #gps_speed#         - GPS 速度
  * #gps_dist#          - 到目前为止的总距离
  * #gps_datetime_now#  - 当前显示的 gps 点的日期和时间
  * #file_datetime_now# - 视频文件中当前帧的日期和时间
  * #gps_hr#            - 心率(如果 gps 文件中存在)
  * #gps_bearing#       - 当前 GPS 方位角(度数 0-360)
  * #gps_compass#       - 当前 GPS 方向(8 个方位:N、NE、E 等)
  * #gps_vdist_up#      - 到目前为止的 GPS 累计爬升高度
  * #gps_vdist_down#    - 到目前为止的 GPS 累计下降高度
  * #gps_dist_uphill#   - 到目前为止的上坡行驶距离
  * #gps_dist_downhill# - 到目前为止的下坡行驶距离
  * #gps_dist_flat#     - 到目前为止的平路行驶距离
  * #gps_cadence#       - (骑行)踏频,单位为每分钟转数
  * #gps_temperature#   - 环境温度(.gpx 中的 <atemp>)
  * #gps_power#         - 功率,单位为瓦
  * #gps_grade_percentage# - GPS 轨迹坡度(由 GPS 与海拔计算得出)
  * #gps_grade_degrees# - 同上,但换算为度数
可以在关键字中添加额外单词 "RAW"(必须大写!)来显示
文件中未经修改的原始值。如果某个关键字无法产生有效数据,
将打印 "--"。
返回数值的关键字可以使用额外单词 "decimals" 来强制
指定位数的小数(0-9)。示例:#gps_speed decimals 3#。
基于时间的关键字可以包含一个 strftime 格式字符串来自定义
输出,还可以包含一个以 '+' 或 '-' 开头的数字(表示秒数)来
对实际时间做偏移。例如,"#gps_datetime_now %I:%M:%S %p +3600#" 以 12 小时制
只显示时间,并偏移 1 小时。
速度关键字可以带额外的 "vertical" 或 "3D" 单词作为格式,用于显示
垂直速度和 3D 速度(考虑海拔)。
速度和距离关键字可以包含额外的格式关键字,把值转换为公制/英制单位。
默认分别为米和 km/h。
支持的格式,距离:m|meter、km|kilometer*、mi|mile*、ft|feet、nm|nautical*;
速度:ms|m/s|meter、km|km/h|kilo、mi|mi/h|mile、ft|ft/s|feet、kn|nm/h|knots、
mmin|m/min、ftmin|ft/min。
计算值是从 GPS 文件开头、或从 "gps_processing_start_time" 属性
(若已设置)开始计算的。
温度可以附加大写字母 "F" 或 "K",把摄氏度(默认)分别转换为华氏度或开尔文。
# 可以用 "\" 转义。

type: string
readonly: no
required: yes
default: Speed: #gps_speed#km/h Distance: #gps_dist#m Altitude: #gps_elev#m

GPS time: #gps_datetime_now# GPS location: #gps_lat#, #gps_lon#
widget: text

resource

title: GPS 文件/URL
description: "包含位置(GPS)数据的文件的完整路径。支持的扩展名:.gpx、.tcx。"
type: string
readonly: no
required: yes
widget: fileopen

time_offset

title: 时间偏移
description: 需要加到视频文件上的偏移量(以秒为单位),用于使其与 GPS 轨迹对齐。大多数情况下,该值至少需要设置为两个文件之间的时区差,另外如果视频录制设备的时间没有精确校准,还需再加上若干秒。GPS 时间始终是精确的且为 UTC。如果 GPS 领先于视频则使用正值,否则使用负值。
type: integer
readonly: no
required: no
default: 0
widget: text

smoothing_value

title: 平滑程度
description: 为消除 GPS 误差而进行平滑处理的 GPS 点数量。值为 0 时仅暴露文件中的原始值。值为 1 时不平滑位置,只计算额外字段(速度、距离等),同时会对缺失的心率和海拔值进行插值。
type: integer
readonly: no
required: no
minimum: 0
default: 5
widget: text

gps_processing_start_time

title: GPS 处理起始时间
description: 从此 UTC 日期和时间(格式为 "yyyy-MM-dd hh:mm:ss")开始处理 gps 文件。如果 GPS 文件在视频之前有多余的点且希望忽略它们,可使用此项(可用于统计某段起点开始的距离)。如果提供的字符串与格式不完全匹配,将被忽略。
type: string
readonly: no
required: no
default: yyyy-MM-dd hh:mm:ss
widget: text

speed_multiplier

title: 速度倍率
description: 如果视频文件是延时摄影(或慢动作),用此值设置加速/减速比例。示例取值:30 表示 30 倍延时,0.25 表示 4 倍慢动作素材。
type: float
readonly: no
required: no
default: 1
widget: text

updates_per_second

title: 每秒更新次数
description: 控制 GPS 文本在视频中每秒更新(插值)多少次。值为 0 时只在记录到真实 gps 点时才更新文本。可与 speed_multiplier 组合使用。
type: float
readonly: no
required: no
default: 1
widget: text

gps_start_text

title: GPS 起始时间
description: 第一个有效 GPS 点的日期和时间。
type:
readonly: yes
required: no

video_start_text

title: 视频起始时间
description: 视频文件的日期和时间。
type:
readonly: yes
required: no

auto_gps_offset_start

title: 自动起始偏移
description: 提供一个辅助偏移量,以保证视频文件开头与 gps 文件开头同步。如果视频文件和 gps 记录是同时开始的,该值能正确设置偏移。
type:
readonly: yes
required: no

auto_gps_offset_now

title: 自动当前偏移
description: 提供一个辅助偏移量,把第一个 gps 点同步到当前视频时间(每秒更新一次)。如果你在 gps 启动的瞬间开始录制视频,该值能正确设置偏移。
type:
readonly: yes
required: no

auto_gps_processing_start_now

title: 自动 GPS 处理起始(当前)
description: 提供一个辅助偏移量,把 gps_processing_start_time 属性同步到当前视频时间(每秒更新一次)。日期时间字符串。
type:
readonly: yes
required: no

geometry

title: 几何位置
description: 一组 X/Y 坐标,用于调整文本位置。
type: rect
readonly: no
required: no
default: 10%/10%:80%x80%:100%

family

title: 字体族
description: 字体类型。
type: string
readonly: no
required: no
default: Sans
widget: combo

size

title: 字号
description: 字体大小,以像素计。
type: integer
readonly: no
required: no
default: 26
widget: spinner

style

title: 字体样式
description: 字体的样式。
type: string
readonly: no
required: no
default: normal
widget: combo
values:

  • normal
  • italic

weight

title: 字体粗细
description: 字体的粗细(weight)。
type: integer
readonly: no
required: no
minimum: 100
maximum: 1000
default: 400
widget: spinner

fgcolour

title: 前景色
description: 颜色值是 RGB 加 alpha 通道的十六进制表示,形式为 0xrrggbbaa。颜色也可以是这些单词:white、black、red、green 或 blue。还可以使用 HTML 风格的颜色值 #rrggbb 或 #aarrggbb。
type: string
readonly: no
required: no
default: 4294967295
widget: color

bgcolour

title: 背景色
description: 颜色值是 RGB 加 alpha 通道的十六进制表示,形式为 0xrrggbbaa。颜色也可以是这些单词:white、black、red、green 或 blue。还可以使用 HTML 风格的颜色值 #rrggbb 或 #aarrggbb。
type: string
readonly: no
required: no
default: 0
widget: color

olcolour

title: 描边颜色
description: 颜色值是 RGB 加 alpha 通道的十六进制表示,形式为 0xrrggbbaa。颜色也可以是这些单词:white、black、red、green 或 blue。还可以使用 HTML 风格的颜色值 #rrggbb 或 #aarrggbb。
type: string
readonly: no
required: no
widget: color

outline

title: 描边宽度
description: 描边的宽度,以像素计。
type: string
readonly: no
required: no
minimum: 0
maximum: 3
default: 0
widget: spinner

underline

title: 下划线
description: 为文本应用下划线装饰。
type: boolean
readonly: no
required: no
default: 0
widget: checkbox

strikethrough

title: 删除线
description: 为文本应用删除线装饰。
type: boolean
readonly: no
required: no
default: 0
widget: checkbox

pad

title: 内边距
description: 背景矩形在文本边缘之外扩展的像素数。
type: integer
readonly: no
required: no
default: 0
widget: spinner

halign

title: 水平对齐
description: 设置在几何矩形内的水平对齐方式。
type: string
readonly: no
required: no
default: left
widget: combo
values:

  • left
  • centre
  • right

valign

title: 垂直对齐
description: 设置在几何矩形内的垂直对齐方式。
type: string
readonly: no
required: no
default: bottom
widget: combo
values:

  • top
  • middle
  • bottom

opacity

title: 不透明度
description: 所有元素的不透明度 - 文本、描边和背景
type: float
readonly: no
required: no
minimum: 0
maximum: 1.0
default: 1.0
widget: slider