[FFmpeg-devel] [PATCH 2/3] movenc: Add support for writing language codes into ISML manifests

Jan Ekström jeebjp at gmail.com
Sat Mar 19 18:39:06 CET 2016


Streaming servers appear to ignore all other language metadata.
---
 libavformat/movenc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 16b044a..11c8275 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3351,6 +3351,9 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov)
          * here yet */
         int track_id = i + 1;
 
+        AVStream *st = track->st;
+        AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0);
+
         if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
             type = "video";
         } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
@@ -3364,6 +3367,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov)
                     (int64_t)manifest_bit_rate);
         param_write_int(pb, "systemBitrate", manifest_bit_rate);
         param_write_int(pb, "trackID", track_id);
+        param_write_string(pb, "systemLanguage", lang ? lang->value : "und");
         if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
             if (track->enc->codec_id == AV_CODEC_ID_H264) {
                 uint8_t *ptr;
-- 
2.5.0



More information about the ffmpeg-devel mailing list