[FFmpeg-devel] [PATCH v2] lavf/movenc: write track title metadata for mov files

Courtland Idstrom cidstrom at telltalegames.com
Mon Mar 19 23:11:37 EET 2018


Track title (atom 'name') is a well defined user data atom for mov files. Existing code (for mp4) only writes title metadata if present.

Relevant reference docs:

  https://developer.apple.com/library/content/documentation/QuickTime/Reference/QTRef_AtomsResources/Content/QTRef_AtomsResources4.html#//apple_ref/doc/uid/TP40004285-DontLinkChapterID_1--udta-
  https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-63839
---
 libavformat/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5b1e66c897..ca15a00265 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3027,7 +3027,7 @@ static int mov_write_track_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
     if (ret < 0)
         return ret;
 
-    if (mov->mode & MODE_MP4)
+    if (mov->mode & (MODE_MP4|MODE_MOV))
         mov_write_track_metadata(pb_buf, st, "name", "title");
 
     if ((size = avio_close_dyn_buf(pb_buf, &buf)) > 0) {
-- 
2.14.3 (Apple Git-98)



More information about the ffmpeg-devel mailing list