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

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Mon Mar 8 04:32:25 EET 2021


Ze Yuan:
> From ea96e70874c87b003af1fb3fcd5c792b3292bf29 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 18:35:51 +0800
> Subject: [PATCH] Added MKV tag for AVS2 video 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..2ce60c6277 100644
> --- a/libavformat/matroska.c
> +++ b/libavformat/matroska.c
> @@ -78,6 +78,7 @@ const CodecTags ff_mkv_codec_tags[]={
>      {"S_HDMV/TEXTST"    , AV_CODEC_ID_HDMV_TEXT_SUBTITLE},
> 
>      {"V_AV1"            , AV_CODEC_ID_AV1},
> +    {"V_AVS2"           , AV_CODEC_ID_AVS2},
>      {"V_DIRAC"          , AV_CODEC_ID_DIRAC},
>      {"V_FFV1"           , AV_CODEC_ID_FFV1},
>      {"V_MJPEG"          , AV_CODEC_ID_MJPEG},
> 
I just noticed that an official codec mapping for AVS2 has been added
months ago; this solves my main objection to your earlier patch [1].
Will this a bit and apply it if nothing turns up.
Sorry for not noticing this earlier.

- Andreas Rheinhardt

[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-August/268135.html


More information about the ffmpeg-devel mailing list