Hi,

A user mentioned in ffmpeg-user (
http://ffmpeg.org/pipermail/ffmpeg-user/2017-July/036571.html)  that they
couldn't write the 'keywords' metadata tag. I tested this patch and it
appears to add the metadata value when using MOV and MP4 as output. I'm
sure I've messed something up so please let me know if I can improve this.

Patch is attached and posted here too:

>From c474a7f5095fc1a84c4bd2d811546a821f6420f6 Mon Sep 17 00:00:00 2001
From: Kieran O'Leary <kieran.o.le...@gmail.com>
Date: Mon, 10 Jul 2017 22:54:56 +0100
Subject: [PATCH] movenc:adds keywords metadata

---
 libavformat/movenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 88f2f2c..3989ac1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3321,6 +3321,7 @@ static int mov_write_ilst_tag(AVIOContext *pb,
MOVMuxContext *mov,
     mov_write_string_metadata(s, pb, "tvsh",    "show"     , 1);
     mov_write_string_metadata(s, pb, "tven",    "episode_id",1);
     mov_write_string_metadata(s, pb, "tvnn",    "network"  , 1);
+    mov_write_string_metadata(s, pb, "keyw",    "keywords"  , 1);
     mov_write_int8_metadata  (s, pb, "tves",    "episode_sort",4);
     mov_write_int8_metadata  (s, pb, "tvsn",    "season_number",4);
     mov_write_int8_metadata  (s, pb, "stik",    "media_type",1);
@@ -3543,6 +3544,7 @@ static int mov_write_udta_tag(AVIOContext *pb,
MOVMuxContext *mov,
         mov_write_string_metadata(s, pb_buf, "\251mak", "make",        0);
         mov_write_string_metadata(s, pb_buf, "\251mod", "model",       0);
         mov_write_string_metadata(s, pb_buf, "\251xyz", "location",    0);
+        mov_write_string_metadata(s, pb_buf, "\251key", "keywords",    0);
         mov_write_raw_metadata_tag(s, pb_buf, "XMP_", "xmp");
     } else {
         /* iTunes meta data */
-- 
2.7.4


Best,

Kieran O'Leary
IFI Irish Film Archive
From c474a7f5095fc1a84c4bd2d811546a821f6420f6 Mon Sep 17 00:00:00 2001
From: Kieran O'Leary <kieran.o.le...@gmail.com>
Date: Mon, 10 Jul 2017 22:54:56 +0100
Subject: [PATCH] movenc:adds keywords metadata

---
 libavformat/movenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 88f2f2c..3989ac1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3321,6 +3321,7 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov,
     mov_write_string_metadata(s, pb, "tvsh",    "show"     , 1);
     mov_write_string_metadata(s, pb, "tven",    "episode_id",1);
     mov_write_string_metadata(s, pb, "tvnn",    "network"  , 1);
+    mov_write_string_metadata(s, pb, "keyw",    "keywords"  , 1);
     mov_write_int8_metadata  (s, pb, "tves",    "episode_sort",4);
     mov_write_int8_metadata  (s, pb, "tvsn",    "season_number",4);
     mov_write_int8_metadata  (s, pb, "stik",    "media_type",1);
@@ -3543,6 +3544,7 @@ static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
         mov_write_string_metadata(s, pb_buf, "\251mak", "make",        0);
         mov_write_string_metadata(s, pb_buf, "\251mod", "model",       0);
         mov_write_string_metadata(s, pb_buf, "\251xyz", "location",    0);
+        mov_write_string_metadata(s, pb_buf, "\251key", "keywords",    0);
         mov_write_raw_metadata_tag(s, pb_buf, "XMP_", "xmp");
     } else {
         /* iTunes meta data */
-- 
2.7.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to