PR #25578 opened by Zhao Zhili (quink)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25578
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25578.patch

# Summary of changes

DJI cameras write flight and gimbal data into djmd and dbgi tracks
whose sample entries use a private fourcc under the meta handler.
Map them to bin_data, as is already done for the GoPro gpmd track.

Signed-off-by: Zhao Zhili <[email protected]>


>From 6d69eafd2208fb08b3825a93dd710b812d5d142f Mon Sep 17 00:00:00 2001
From: Zhao Zhili <[email protected]>
Date: Thu, 29 Oct 2026 13:20:13 +0800
Subject: [PATCH] avformat/mov: demux DJI djmd and dbgi tracks as bin_data

DJI cameras write flight and gimbal data into djmd and dbgi tracks
whose sample entries use a private fourcc under the meta handler.
Map them to bin_data, as is already done for the GoPro gpmd track.

Signed-off-by: Zhao Zhili <[email protected]>
---
 libavformat/isom.c | 2 ++
 libavformat/isom.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index 0a2f93d762f..09be63aa193 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -81,6 +81,8 @@ const AVCodecTag ff_codec_movsubtitle_tags[] = {
 
 const AVCodecTag ff_codec_movdata_tags[] = {
     { AV_CODEC_ID_BIN_DATA, MKTAG('g', 'p', 'm', 'd') },
+    { AV_CODEC_ID_BIN_DATA, MOV_MP4_DJMD_TAG },
+    { AV_CODEC_ID_BIN_DATA, MOV_MP4_DBGI_TAG },
     { AV_CODEC_ID_ITUT_T35, MKTAG('i', 't', '3', '5') },
     { AV_CODEC_ID_NONE, 0 },
 };
diff --git a/libavformat/isom.h b/libavformat/isom.h
index 18c2fe41b9a..6230218e37f 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -507,6 +507,9 @@ static inline enum AVCodecID ff_mov_get_lpcm_codec_id(int 
bps, int flags)
 #define MOV_MP4_FPCM_TAG  MKTAG('f', 'p', 'c', 'm')
 #define MOV_MP4_IPCM_TAG  MKTAG('i', 'p', 'c', 'm')
 
+#define MOV_MP4_DJMD_TAG  MKTAG('d', 'j', 'm', 'd')
+#define MOV_MP4_DBGI_TAG  MKTAG('d', 'b', 'g', 'i')
+
 struct MP4TrackKindValueMapping {
     int         disposition;
     const char *value;
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to