From 7a4be4315fd6c5e80cd24697d1a5b67c9a3cfcaf Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 2 Dec 2014 23:35:40 +0100 Subject: [PATCH] Support muxing 4k AVC Intra in mov. Reported and tested by Rens Dijkshoorn, rens onlinemedia nl --- libavformat/isom.h | 1 + libavformat/movenc.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libavformat/isom.h b/libavformat/isom.h index 074837f028..e3160d00f8 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -246,6 +246,7 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id); (tag) == MKTAG('a', 'i', '1', '3') || \ (tag) == MKTAG('a', 'i', '1', '5') || \ (tag) == MKTAG('a', 'i', '1', '6') || \ + (tag) == MKTAG('a', 'i', 'v', 'x') || \ (tag) == MKTAG('A', 'V', 'i', 'n')) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 6e5142423b..10e883c923 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1278,6 +1278,9 @@ static int mov_get_h264_codec_tag(AVFormatContext *s, MOVTrack *track) else if (rate == 50) tag = MKTAG('a','i','1','5'); else if (rate == 60) tag = MKTAG('a','i','1','6'); } + } else if ( track->enc->width == 4096 && track->enc->height == 2160 + || track->enc->width == 3840 && track->enc->height == 2160) { + tag = MKTAG('a','i','v','x'); } }