惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
C
Cisco Blogs
博客园 - 叶小钗
P
Privacy International News Feed
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
T
Threatpost
IT之家
IT之家
博客园 - 聂微东
Know Your Adversary
Know Your Adversary
Help Net Security
Help Net Security
罗磊的独立博客
I
Intezer
S
Schneier on Security
博客园_首页
C
CERT Recently Published Vulnerability Notes
雷峰网
雷峰网
Cisco Talos Blog
Cisco Talos Blog
宝玉的分享
宝玉的分享
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Webroot Blog
Webroot Blog
TaoSecurity Blog
TaoSecurity Blog
MyScale Blog
MyScale Blog
P
Privacy & Cybersecurity Law Blog
T
The Exploit Database - CXSecurity.com
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest
H
Heimdal Security Blog
S
Secure Thoughts
Hacker News: Ask HN
Hacker News: Ask HN
Y
Y Combinator Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
SecWiki News
SecWiki News
The GitHub Blog
The GitHub Blog
A
Arctic Wolf
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
T
Threat Research - Cisco Blogs
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

博客园 - xgqfrms

xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs Remotion Video Maker All In One git worktree All In One Tesla 的车机使用什么技术来渲染汽车模型的? 宜家 VEVELSTAD 维维斯托床架 All In One macOS sysmond bug All In One Three.js All In One The COF of LCD Monitor All In One Dell 显示器 S2419HM 灰屏 &花屏 All In One AI Harness Engineering All In One 电脑外接显示器天梯榜 All In One How to change the speed display unit of GSP from mph to km/h using GoPro Labs All In One WHCA 白宫记者协会 All In One Pascal Editor All In One 主流犬种图解指南 All In One 泡沫喷雾 & 辣椒喷雾 All In One 如何给身份证照片添加水印 All In One GoPro MISSION 1 PRO price All In One 杭州历史天气数据 All In One Pandoc All In One GoPro MISSION 1 SERIES All In One GoPro telemetry 中的 GPS5 与 GPS9 是什么 All In One xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs xgqfrms, cnblogs, blogs OpenCode All In One OpenClaw 设置 cron 定时任务 All In One free MongoDB Cloud API All In One 如何在 Raspberry Pi 安装 OpenClaw All In One free cloud LLM models API All In One Claude Code Free Video Tutorials All In One 如何解决 OpenClaw 升级后导致 feishu plugin 无法使用的问题 All In One Claude Code skills & plugins All In One LLM Benchmark All In One How to fix use the FileZilla FTP upload file error All In One
xgqfrms, cnblogs, blogs
xgqfrms · 2026-04-13 · via 博客园 - xgqfrms

如何使用 FFmpeg 提取 GoPro 视频中保存的原始 telemetry 数据

FFmpeg

# reinstall
$ brew reinstall ffmpeg

image

$ ffmpeg -version
ffmpeg version 8.1 Copyright (c) 2000-2026 the FFmpeg developers
built with Apple clang version 16.0.0 (clang-1600.0.26.6)
configuration: --prefix=/usr/local/Cellar/ffmpeg/8.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libsvtav1 --enable-libopus --enable-libx264 --enable-libmp3lame --enable-libdav1d --enable-libvmaf --enable-libvpx --enable-libx265 --enable-openssl --enable-videotoolbox --enable-audiotoolbox
libavutil      60. 26.100 / 60. 26.100
libavcodec     62. 28.100 / 62. 28.100
libavformat    62. 12.100 / 62. 12.100
libavdevice    62.  3.100 / 62.  3.100
libavfilter    11. 14.100 / 11. 14.100
libswscale      9.  5.100 /  9.  5.100
libswresample   6.  3.100 /  6.  3.100

Exiting with exit code 0

https://ffmpeg.org/

https://github.com/ffmpeg/ffmpeg

demos

如何使用 ffmpeg 提取 GoPro 视频中保存的原始 telemetry 数据,并且根据数据中的速度,生成一个展示实时速度的仪表盘 overlay

# 1. 查看 GoPro 原始视频中的 telemetry metadata 数据位置
$ ffmpeg -i /Users/xgqfrms-mm/Movies/goPro/GX010918_Trim_06.11.MP4
ffmpeg version 8.1 Copyright (c) 2000-2026 the FFmpeg developers
  built with Apple clang version 16.0.0 (clang-1600.0.26.6)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/8.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libsvtav1 --enable-libopus --enable-libx264 --enable-libmp3lame --enable-libdav1d --enable-libvmaf --enable-libvpx --enable-libx265 --enable-openssl --enable-videotoolbox --enable-audiotoolbox
  libavutil      60. 26.100 / 60. 26.100
  libavcodec     62. 28.100 / 62. 28.100
  libavformat    62. 12.100 / 62. 12.100
  libavdevice    62.  3.100 / 62.  3.100
  libavfilter    11. 14.100 / 11. 14.100
  libswscale      9.  5.100 /  9.  5.100
  libswresample   6.  3.100 /  6.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/xgqfrms-mm/Movies/goPro/GX010918_Trim_06.11.MP4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2026-04-12T14:59:23.000000Z
    firmware        : H24.01.02.10.70
    location        : +31.0419+121.2282/
    location-eng    : +31.0419+121.2282/
  Duration: 00:01:22.82, start: 0.000000, bitrate: 8193 kb/s
  Stream #0:0[0x1](eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 7912 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
    Metadata:
      creation_time   : 2026-04-12T14:59:23.000000Z
      handler_name    : GoPro H.265
      encoder         : GoPro H.265 encoder
      timecode        : 22:35:05:23
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2026-04-12T14:59:23.000000Z
      handler_name    : GoPro AAC
  Stream #0:2[0x3](eng): Data: bin_data (gpmd / 0x646D7067), 64 kb/s (default)
    Metadata:
      creation_time   : 2026-04-12T14:59:23.000000Z
      handler_name    : GoPro MET
  Stream #0:3[0x4](eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2026-04-12T14:59:23.000000Z
      timecode        : 22:35:05:23
At least one output file must be specified

image

General Purpose Metadata Format (GPMF)
GoPro Metadata (GPMD)

# 2. 提取 telemetry metadata,并保存到 telemetry.bin
$ cd /Users/xgqfrms-mm/Movies/goPro/
$ ffmpeg -y -i GX010918_Trim_06.11.MP4 -codec copy -map 0:2 -f rawvideo telemetry.bin

# 等价于
$ ffmpeg -y -i /Users/xgqfrms-mm/Movies/goPro/GX010918_Trim_06.11.MP4 -codec copy -map 0:2 -f rawvideo /Users/xgqfrms-mm/Movies/goPro/telemetry.bin

0:2 是 telemetry stream(可能不同,按实际调整)
0:2 就是 gpmd

image

# 3. 解析 GPS speed
$ npm install gopro-telemetry

$ node extract.js

// extract.js
const fs = require('fs');
const goproTelemetry = require('gopro-telemetry');

const rawData = fs.readFileSync('telemetry.bin');

goproTelemetry({ rawData }, (err, data) => {
  if (err) throw err;

  const gps = data['1'].streams.GPS5.samples;

  const result = gps.map(s => ({
    t: s.date,
    speed: (s.value[3] || 0) * 3.6 // m/s → km/h
  }));

  fs.writeFileSync('speed.json', JSON.stringify(result, null, 2));
});

生成 speed.json 速度数据

# 4. 生成仪表盘: 赛车 HUD(右上角)
$ python render.py

// render.py
import cv2
import json
import numpy as np

video = "GX010918_Trim_06.11.MP4"

with open("speed.json") as f:
    data = json.load(f)

cap = cv2.VideoCapture(video)

fps = cap.get(cv2.CAP_PROP_FPS)
w = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

out = cv2.VideoWriter(
    "overlay.mp4",
    cv2.VideoWriter_fourcc(*"mp4v"),
    fps,
    (w, h)
)

max_speed = 140

i = 0

while True:
    ret, frame = cap.read()
    if not ret:
        break

    speed = data[min(i, len(data)-1)]["speed"]

    # HUD区域(右上角)
    hud = np.zeros((200, 300, 3), dtype=np.uint8)

    center = (150, 140)
    radius = 90

    # 外圈
    cv2.circle(hud, center, radius, (0,255,255), 2)

    # 指针
    angle = int((speed / max_speed) * 270 - 135)

    x = int(center[0] + radius * np.cos(np.radians(angle)))
    y = int(center[1] + radius * np.sin(np.radians(angle)))

    cv2.line(hud, center, (x,y), (0,0,255), 3)

    # 数字速度
    cv2.putText(hud, f"{speed:.0f} km/h",
                (60, 180),
                cv2.FONT_HERSHEY_SIMPLEX,
                0.8,
                (255,255,255), 2)

    # 叠加到右上角
    frame[10:210, w-310:w-10] = hud

    out.write(frame)
    i += 1

cap.release()
out.release()

# 5. 叠加仪表盘
$ ffmpeg -i GX010918_Trim_06.11.MP4 -i overlay.mp4 \
-filter_complex "[1:v]format=rgba[ov];[0:v][ov]overlay=W-w-20:20" \
-c:a copy final.mp4

???

Parser for GPMF™ formatted telemetry data used within GoPro® cameras.

GPMF -- GoPro Metadata Format or General Purpose Metadata Format

https://github.com/gopro/gpmf-parser

Telemetry Overlay

free 3 days trial

image

image

https://www.cnblogs.com/xgqfrms/p/18525348#5407123

telemetry extractor

https://goprotelemetryextractor.com/blog/GoPro-Telemetry-GPS-overlays-Extracting-the-metadata-in-a-useful-format

refs

https://chatgpt.com/c/69dca899-2da4-832d-a929-3dc5145b564c

https://gopro.com/en/ps/news/gopro-video-metadata-open-source-explained?srsltid=AfmBOorTRnh-DqZmTv5HfTWkZJBCMwAXzp3UdOIyR8OFlkRrCuaRXC6Z



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!