[FFmpeg-devel] [PATCH] Added MKV tag for AVS2 codec

Ze Yuan naturalwalker at hotmail.com
Sun Sep 6 11:48:13 EEST 2020


>From de8c6cdb3325bed66185bfd80ce4e39c5dd62cf6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=83=91=E5=A4=A9=E6=B3=A2?= <naturalwalker at hotmail.com>
Date: Sun, 6 Sep 2020 16:34:33 +0800
Subject: [PATCH] Added MKV tag for AVS2 codec

avs2 (IEEE 1857.4) video codec

MKV spec: V_AVS2 Codec ID: V_AVS2 Codec Name: AVS2-P2/IEEE.1857.4
(https://github.com/xatabhk/matroska-specification/blob/master/codec_specs.md)

Standard document:
1857.4-2018 - IEEE Standard for Second-Generation IEEE 1857 Video Coding (https://ieeexplore.ieee.org/document/8821610)

Encoding tool:
Ffmpeg with avs2 enabled: https://github.com/xatabhk/FFmpeg-avs2-avs3/releases
Command line:

             ffmpeg -i xxxx.mp4 -vcodec avs2 -acodec copy xxxx_avs2.mkv
             ffmpeg -i xxxx.mp4 -vcodec avs2 -speed_level 4 -acodec copy xxxx_avs2.mkv`

Players:
(1) Ffmpeg with avs2 enabled: (https://github.com/xatabhk/FFmpeg-avs2-avs3/releases):
Command line:

             ffplay xxxx_avs2.mkv`
(2) VLC 3.0.x with avs2 enabled: https://github.com/xatabhk/vlc-3.0-avs2-avs3/releases
(3) Mpc-hc 1.9.x with avs2 enabled: https://gitee.com/zhengtianbo/cavs-avs2-avs3_decoder_added_to_mpc_hc/releases

Avs2-MKV samples:
https://github.com/xatabhk/avs2-avs3-video-samples

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

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 7c56aba403..9c9748b770 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -99,6 +99,7 @@ const CodecTags ff_mkv_codec_tags[]={
     {"V_UNCOMPRESSED"   , AV_CODEC_ID_RAWVIDEO},
     {"V_VP8"            , AV_CODEC_ID_VP8},
     {"V_VP9"            , AV_CODEC_ID_VP9},
+    {"V_AVS2"           , AV_CODEC_ID_AVS2},

     {""                 , AV_CODEC_ID_NONE}
};
-- 
2.25.1


More information about the ffmpeg-devel mailing list