Hello ffmpeg-devel:

Attached is a patch to allow the MXF parser to identify the Canon XF-HEVC codec for video essence.

This codec/containerization is found in the Canon XF-705 camera that Canon released in 2018.  The camera can encode video using HEVC at either a 110 or 160 Mbps bitrate, and the video is 3840x2160, YCC 4:2:2 at 10-bit depth (at a variety of choosable framerates).

At the moment there is little information published about the containerization of the video, and I am not aware of it being a SMPTE standard or otherwise.  However, by identifying the video as AV_CODEC_ID_HEVC by way of its universal label (UL), ffmpeg can make use of the video.  Bitrate, resolution, color space, framerate, and bit depth all seem to be correctly identified.

Sample MXF files, as well as their successful conversion thru a patched ffmpeg, are available at http://www.matthewmckenna.com/contrib/ffmpeg/xf-hevc

Thanks.
-Matthew McKenna

From 9f594113473f80c997e8d00855bf62015136cfa6 Mon Sep 17 00:00:00 2001
From: Matthew McKenna <mmcke...@idsys.net>
Date: Sat, 2 Mar 2019 12:09:25 -0500
Subject: [PATCH]lavf/mxfdec: Add the Canon XF-HEVC UL to the picture essence 
container UL list
 list

---
 libavformat/mxfdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 0553adcb06..0367e4e41e 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1328,6 +1328,7 @@ static const MXFCodecUL 
mxf_picture_essence_container_uls[] = {
     { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x05,0x00,0x00 
}, 14,   AV_CODEC_ID_RAWVIDEO, NULL, 15, RawVWrap }, /* uncompressed picture */
     { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0a,0x0e,0x0f,0x03,0x01,0x02,0x20,0x01,0x01 
}, 15,     AV_CODEC_ID_HQ_HQA },
     { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0a,0x0e,0x0f,0x03,0x01,0x02,0x20,0x02,0x01 
}, 15,        AV_CODEC_ID_HQX },
+    { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0a,0x0e,0x15,0x00,0x04,0x02,0x10,0x00,0x01 
}, 14,       AV_CODEC_ID_HEVC, NULL, 15 }, /* Canon XF-HEVC */
     { { 
0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4f 
}, 14,   AV_CODEC_ID_RAWVIDEO }, /* Legacy ?? Uncompressed Picture */
     { { 
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 
},  0,      AV_CODEC_ID_NONE },
 };
-- 
2.17.0

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

Reply via email to