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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - xgqfrms

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 NHTSA FARS All In One Free Vercel Services All In One How to run for loop in Python REPL All In One 使用不同 AI 大模型生成一杯装满的红酒的高脚杯挑战赛 All In One CSS Custom Highlight API All In One 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
How to extract raw telemetry data from GoPro videos using FFmpeg All In One
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, 禁止转载 🈲️,侵权必究⚠️!