FFmpeg
matroska.c
Go to the documentation of this file.
1 /*
2  * Matroska common data
3  * Copyright (c) 2003-2004 The FFmpeg project
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include "matroska.h"
23 
24 /* If you add a tag here that is not in ff_codec_bmp_tags[]
25  or ff_codec_wav_tags[], add it also to additional_audio_tags[]
26  or additional_video_tags[] in matroskaenc.c */
28  {"A_AAC" , AV_CODEC_ID_AAC},
29  {"A_AC3" , AV_CODEC_ID_AC3},
30  {"A_ALAC" , AV_CODEC_ID_ALAC},
31  {"A_DTS" , AV_CODEC_ID_DTS},
32  {"A_EAC3" , AV_CODEC_ID_EAC3},
33  {"A_FLAC" , AV_CODEC_ID_FLAC},
34  {"A_MLP" , AV_CODEC_ID_MLP},
35  {"A_MPEG/L2" , AV_CODEC_ID_MP2},
36  {"A_MPEG/L1" , AV_CODEC_ID_MP1},
37  {"A_MPEG/L3" , AV_CODEC_ID_MP3},
38  {"A_OPUS" , AV_CODEC_ID_OPUS},
39  {"A_OPUS/EXPERIMENTAL",AV_CODEC_ID_OPUS},
40  {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F32LE},
41  {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F64LE},
42  {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S16BE},
43  {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S24BE},
44  {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S32BE},
45  {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S16LE},
46  {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S24LE},
47  {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S32LE},
48  {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_U8},
49  {"A_QUICKTIME/QDMC" , AV_CODEC_ID_QDMC},
50  {"A_QUICKTIME/QDM2" , AV_CODEC_ID_QDM2},
51  {"A_REAL/14_4" , AV_CODEC_ID_RA_144},
52  {"A_REAL/28_8" , AV_CODEC_ID_RA_288},
53  {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
54  {"A_REAL/COOK" , AV_CODEC_ID_COOK},
55  {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
56  {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
57  {"A_TTA1" , AV_CODEC_ID_TTA},
58  {"A_VORBIS" , AV_CODEC_ID_VORBIS},
59  {"A_WAVPACK4" , AV_CODEC_ID_WAVPACK},
60 
61  {"D_WEBVTT/SUBTITLES" , AV_CODEC_ID_WEBVTT},
62  {"D_WEBVTT/CAPTIONS" , AV_CODEC_ID_WEBVTT},
63  {"D_WEBVTT/DESCRIPTIONS", AV_CODEC_ID_WEBVTT},
64  {"D_WEBVTT/METADATA" , AV_CODEC_ID_WEBVTT},
65 
66  {"S_TEXT/UTF8" , AV_CODEC_ID_SUBRIP},
67  {"S_TEXT/UTF8" , AV_CODEC_ID_TEXT},
68  {"S_TEXT/ASCII" , AV_CODEC_ID_TEXT},
69  {"S_TEXT/ASS" , AV_CODEC_ID_ASS},
70  {"S_TEXT/SSA" , AV_CODEC_ID_ASS},
71  {"S_ASS" , AV_CODEC_ID_ASS},
72  {"S_SSA" , AV_CODEC_ID_ASS},
73  {"S_VOBSUB" , AV_CODEC_ID_DVD_SUBTITLE},
74  {"S_DVBSUB" , AV_CODEC_ID_DVB_SUBTITLE},
75  {"S_HDMV/PGS" , AV_CODEC_ID_HDMV_PGS_SUBTITLE},
76  {"S_HDMV/TEXTST" , AV_CODEC_ID_HDMV_TEXT_SUBTITLE},
77  {"S_ARIBSUB" , AV_CODEC_ID_ARIB_CAPTION},
78 
79  {"V_AV1" , AV_CODEC_ID_AV1},
80  {"V_AVS2" , AV_CODEC_ID_AVS2},
81  {"V_AVS3" , AV_CODEC_ID_AVS3},
82  {"V_DIRAC" , AV_CODEC_ID_DIRAC},
83  {"V_FFV1" , AV_CODEC_ID_FFV1},
84  {"V_MJPEG" , AV_CODEC_ID_MJPEG},
85  {"V_MPEG1" , AV_CODEC_ID_MPEG1VIDEO},
86  {"V_MPEG2" , AV_CODEC_ID_MPEG2VIDEO},
87  {"V_MPEG4/ISO/ASP" , AV_CODEC_ID_MPEG4},
88  {"V_MPEG4/ISO/AP" , AV_CODEC_ID_MPEG4},
89  {"V_MPEG4/ISO/SP" , AV_CODEC_ID_MPEG4},
90  {"V_MPEG4/ISO/AVC" , AV_CODEC_ID_H264},
91  {"V_MPEGH/ISO/HEVC" , AV_CODEC_ID_HEVC},
92  {"V_MPEG4/MS/V3" , AV_CODEC_ID_MSMPEG4V3},
93  {"V_PRORES" , AV_CODEC_ID_PRORES},
94  {"V_REAL/RV10" , AV_CODEC_ID_RV10},
95  {"V_REAL/RV20" , AV_CODEC_ID_RV20},
96  {"V_REAL/RV30" , AV_CODEC_ID_RV30},
97  {"V_REAL/RV40" , AV_CODEC_ID_RV40},
98  {"V_SNOW" , AV_CODEC_ID_SNOW},
99  {"V_THEORA" , AV_CODEC_ID_THEORA},
100  {"V_UNCOMPRESSED" , AV_CODEC_ID_RAWVIDEO},
101  {"V_VP8" , AV_CODEC_ID_VP8},
102  {"V_VP9" , AV_CODEC_ID_VP9},
103 
104  {"" , AV_CODEC_ID_NONE}
105 };
106 
108  {"V_VP8" , AV_CODEC_ID_VP8},
109  {"V_VP9" , AV_CODEC_ID_VP9},
110  {"V_AV1" , AV_CODEC_ID_AV1},
111 
112  {"A_VORBIS" , AV_CODEC_ID_VORBIS},
113  {"A_OPUS" , AV_CODEC_ID_OPUS},
114 
115  {"D_WEBVTT/SUBTITLES" , AV_CODEC_ID_WEBVTT},
116  {"D_WEBVTT/CAPTIONS" , AV_CODEC_ID_WEBVTT},
117  {"D_WEBVTT/DESCRIPTIONS", AV_CODEC_ID_WEBVTT},
118  {"D_WEBVTT/METADATA" , AV_CODEC_ID_WEBVTT},
119 
120  {"" , AV_CODEC_ID_NONE}
121 };
122 
124  { "LEAD_PERFORMER", "performer" },
125  { "PART_NUMBER" , "track" },
126  { 0 }
127 };
128 
130  "mono",
131  "left_right",
132  "bottom_top",
133  "top_bottom",
134  "checkerboard_rl",
135  "checkerboard_lr",
136  "row_interleaved_rl",
137  "row_interleaved_lr",
138  "col_interleaved_rl",
139  "col_interleaved_lr",
140  "anaglyph_cyan_red",
141  "right_left",
142  "anaglyph_green_magenta",
143  "block_lr",
144  "block_rl",
145 };
AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:330
AV_CODEC_ID_AC3
@ AV_CODEC_ID_AC3
Definition: codec_id.h:445
AV_CODEC_ID_DIRAC
@ AV_CODEC_ID_DIRAC
Definition: codec_id.h:168
AV_CODEC_ID_RAWVIDEO
@ AV_CODEC_ID_RAWVIDEO
Definition: codec_id.h:65
AV_CODEC_ID_MPEG4
@ AV_CODEC_ID_MPEG4
Definition: codec_id.h:64
AV_CODEC_ID_RA_144
@ AV_CODEC_ID_RA_144
Definition: codec_id.h:427
AV_CODEC_ID_AVS2
@ AV_CODEC_ID_AVS2
Definition: codec_id.h:246
AV_CODEC_ID_ALAC
@ AV_CODEC_ID_ALAC
Definition: codec_id.h:458
matroska.h
AVMetadataConv
Definition: metadata.h:34
AV_CODEC_ID_FLAC
@ AV_CODEC_ID_FLAC
Definition: codec_id.h:454
AV_CODEC_ID_HDMV_PGS_SUBTITLE
@ AV_CODEC_ID_HDMV_PGS_SUBTITLE
Definition: codec_id.h:556
AV_CODEC_ID_TRUEHD
@ AV_CODEC_ID_TRUEHD
Definition: codec_id.h:486
AV_CODEC_ID_ASS
@ AV_CODEC_ID_ASS
Definition: codec_id.h:572
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:331
ff_matroska_video_stereo_mode
const char *const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREOMODE_TYPE_NB]
Definition: matroska.c:129
AV_CODEC_ID_MP3
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: codec_id.h:443
AV_CODEC_ID_ATRAC3
@ AV_CODEC_ID_ATRAC3
Definition: codec_id.h:473
AV_CODEC_ID_DVB_SUBTITLE
@ AV_CODEC_ID_DVB_SUBTITLE
Definition: codec_id.h:551
AV_CODEC_ID_SIPR
@ AV_CODEC_ID_SIPR
Definition: codec_id.h:483
AV_CODEC_ID_TTA
@ AV_CODEC_ID_TTA
Definition: codec_id.h:464
AV_CODEC_ID_VP9
@ AV_CODEC_ID_VP9
Definition: codec_id.h:220
AV_CODEC_ID_MP2
@ AV_CODEC_ID_MP2
Definition: codec_id.h:442
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: codec_id.h:79
ff_webm_codec_tags
const CodecTags ff_webm_codec_tags[]
Definition: matroska.c:107
AV_CODEC_ID_ARIB_CAPTION
@ AV_CODEC_ID_ARIB_CAPTION
Definition: codec_id.h:575
AV_CODEC_ID_WEBVTT
@ AV_CODEC_ID_WEBVTT
Definition: codec_id.h:568
AV_CODEC_ID_AVS3
@ AV_CODEC_ID_AVS3
Definition: codec_id.h:248
AV_CODEC_ID_AV1
@ AV_CODEC_ID_AV1
Definition: codec_id.h:283
AV_CODEC_ID_DVD_SUBTITLE
@ AV_CODEC_ID_DVD_SUBTITLE
Definition: codec_id.h:550
AV_CODEC_ID_QDM2
@ AV_CODEC_ID_QDM2
Definition: codec_id.h:461
AV_CODEC_ID_MPEG1VIDEO
@ AV_CODEC_ID_MPEG1VIDEO
Definition: codec_id.h:53
AV_CODEC_ID_EAC3
@ AV_CODEC_ID_EAC3
Definition: codec_id.h:482
AV_CODEC_ID_AAC
@ AV_CODEC_ID_AAC
Definition: codec_id.h:444
AV_CODEC_ID_FFV1
@ AV_CODEC_ID_FFV1
Definition: codec_id.h:85
AV_CODEC_ID_PCM_S24LE
@ AV_CODEC_ID_PCM_S24LE
Definition: codec_id.h:342
AV_CODEC_ID_DTS
@ AV_CODEC_ID_DTS
Definition: codec_id.h:446
AV_CODEC_ID_QDMC
@ AV_CODEC_ID_QDMC
Definition: codec_id.h:492
AV_CODEC_ID_OPUS
@ AV_CODEC_ID_OPUS
Definition: codec_id.h:502
AV_CODEC_ID_RV30
@ AV_CODEC_ID_RV30
Definition: codec_id.h:120
AV_CODEC_ID_MJPEG
@ AV_CODEC_ID_MJPEG
Definition: codec_id.h:59
AV_CODEC_ID_RA_288
@ AV_CODEC_ID_RA_288
Definition: codec_id.h:428
AV_CODEC_ID_RV40
@ AV_CODEC_ID_RV40
Definition: codec_id.h:121
AV_CODEC_ID_RV10
@ AV_CODEC_ID_RV10
Definition: codec_id.h:57
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
CodecTags
Definition: matroska.h:375
AV_CODEC_ID_THEORA
@ AV_CODEC_ID_THEORA
Definition: codec_id.h:82
AV_CODEC_ID_SUBRIP
@ AV_CODEC_ID_SUBRIP
Definition: codec_id.h:567
AV_CODEC_ID_RV20
@ AV_CODEC_ID_RV20
Definition: codec_id.h:58
AV_CODEC_ID_HEVC
@ AV_CODEC_ID_HEVC
Definition: codec_id.h:226
AV_CODEC_ID_PCM_S32BE
@ AV_CODEC_ID_PCM_S32BE
Definition: codec_id.h:339
ff_mkv_metadata_conv
const AVMetadataConv ff_mkv_metadata_conv[]
Definition: matroska.c:123
AV_CODEC_ID_TEXT
@ AV_CODEC_ID_TEXT
raw UTF-8 text
Definition: codec_id.h:552
AV_CODEC_ID_SNOW
@ AV_CODEC_ID_SNOW
Definition: codec_id.h:266
AV_CODEC_ID_PCM_S32LE
@ AV_CODEC_ID_PCM_S32LE
Definition: codec_id.h:338
AV_CODEC_ID_PCM_U8
@ AV_CODEC_ID_PCM_U8
Definition: codec_id.h:335
ff_mkv_codec_tags
const CodecTags ff_mkv_codec_tags[]
Definition: matroska.c:27
AV_CODEC_ID_PCM_F64LE
@ AV_CODEC_ID_PCM_F64LE
Definition: codec_id.h:353
MATROSKA_VIDEO_STEREOMODE_TYPE_NB
@ MATROSKA_VIDEO_STEREOMODE_TYPE_NB
Definition: matroska.h:328
AV_CODEC_ID_VP8
@ AV_CODEC_ID_VP8
Definition: codec_id.h:192
AV_CODEC_ID_PCM_F32LE
@ AV_CODEC_ID_PCM_F32LE
Definition: codec_id.h:351
AV_CODEC_ID_WAVPACK
@ AV_CODEC_ID_WAVPACK
Definition: codec_id.h:467
AV_CODEC_ID_COOK
@ AV_CODEC_ID_COOK
Definition: codec_id.h:462
AV_CODEC_ID_MSMPEG4V3
@ AV_CODEC_ID_MSMPEG4V3
Definition: codec_id.h:68
AV_CODEC_ID_HDMV_TEXT_SUBTITLE
@ AV_CODEC_ID_HDMV_TEXT_SUBTITLE
Definition: codec_id.h:573
AV_CODEC_ID_VORBIS
@ AV_CODEC_ID_VORBIS
Definition: codec_id.h:447
AV_CODEC_ID_MPEG2VIDEO
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:54
AV_CODEC_ID_MP1
@ AV_CODEC_ID_MP1
Definition: codec_id.h:484
AV_CODEC_ID_PCM_S24BE
@ AV_CODEC_ID_PCM_S24BE
Definition: codec_id.h:343
AV_CODEC_ID_MLP
@ AV_CODEC_ID_MLP
Definition: codec_id.h:471
AV_CODEC_ID_PRORES
@ AV_CODEC_ID_PRORES
Definition: codec_id.h:200