Tag Parser 12.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
mp4ids.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_MP4IDS_H
2#define TAG_PARSER_MP4IDS_H
3
4#include "../global.h"
5
6#include <cstdint>
7#include <string_view>
8
9namespace TagParser {
10
11class MediaFormat;
12
13namespace Mp4AtomIds {
14enum KnownValue : std::uint32_t {
15 Av1Configuration = 0x61763143,
16 AvcConfiguration = 0x61766343,
17 BitrateBox = 0x62747274,
18 CleanAperature = 0x636c6170,
19 ChunkOffset64 = 0x636f3634,
21 Data = 0x64617461,
22 DataInformation = 0x64696e66,
23 DataReference = 0x64726566,
24 Drms = 0x64726D73,
25 Edit = 0x65647473,
26 EditList = 0x656C7374,
27 Free = 0x66726565,
28 FileType = 0x66747970,
29 HandlerReference = 0x68646c72,
30 HintMediaHeader = 0x686D6864,
31 ItunesList = 0x696c7374,
32 MediaData = 0x6d646174,
33 MediaHeader = 0x6d646864,
34 Media = 0x6d646961,
35 Mean = 0x6D65616E,
36 MovieExtendsHeader = 0x6D656864,
37 Meta = 0x6d657461,
38 MovieFragmentHeader = 0x6D666864,
40 MediaInformation = 0x6d696e66,
42 MediaInformationBase = 0x676D696E,
43 MediaInformationText = 0x74657874,
44 MovieFragment = 0x6d6f6f66,
45 Movie = 0x6d6f6f76,
46 MovieExtends = 0x6D766578,
47 MovieHeader = 0x6D766864,
48 Name = 0x6E616D65,
49 NullMediaHeaderBox = 0x6E6D6864,
50 PaddingBits = 0x70616462,
51 PixalAspectRatio = 0x70617370,
53 SampleToGroup = 0x73626770,
56 Skip = 0x736b6970,
57 SoundMediaHeader = 0x736D6864,
58 SampleTable = 0x7374626c,
59 ChunkOffset = 0x7374636f,
60 DegradationPriority = 0x73746470,
61 SampleToChunk = 0x73747363,
62 SampleDescription = 0x73747364,
63 ShadowSyncSample = 0x73747368,
64 SyncSample = 0x73747373,
65 SampleSize = 0x7374737A,
66 DecodingTimeToSample = 0x73747473,
67 CompactSampleSize = 0x73747a32,
68 SubSampleInformation = 0x73756273,
69 TrackFragmentHeader = 0x74666864,
70 TrackHeader = 0x746b6864,
71 TrackFragment = 0x74726166,
72 Track = 0x7472616b,
73 TrackReference = 0x74726566,
74 TrackExtends = 0x74726578,
75 TrackFragmentRun = 0x7472756E,
76 UserData = 0x75647461,
77 DataEntryUrl = 0x75726C20,
78 DataEntryUrn = 0x75726E20,
79 VideoMediaHeader = 0x766D6864,
80 Wide = 0x77696465,
81};
82}
83
84namespace Mp4TagAtomIds {
85enum KnownValue : std::uint32_t {
86 Album = 0xA9616c62,
87 AlbumArtist = 0x61415254,
88 Artist = 0xA9415254,
89 Bpm = 0x746d706f,
90 Category = 0x63617467,
91 Comment = 0xA9636d74,
92 Composer = 0xA9777274,
93 Copyright = 0x63707274,
94 Cover = 0x636f7672,
95 Description = 0x64657363,
96 DiskPosition = 0x6469736b,
97 Encoder = 0xA9746f6f,
98 EpisodeGlobalUniqueId = 0x65676964,
99 Extended = 0x2d2d2d2d,
100 GaplessPlayback = 0x70676170,
101 Genre = 0xA967656e,
102 Grouping = 0xA9677270,
103 Keywords = 0x6b657977,
104 Lyricist = 0xA9737766,
105 Lyrics = 0xA96c7972,
106 MediaType = 0x7374696B,
107 Performers = 0xA9707266,
108 Podcast = 0x70637374,
109 PodcastUrl = 0x7075726c,
110 PreDefinedGenre = 0x676e7265,
111 Producer = 0xA9707264,
112 PurchaseDate = 0x70757264,
113 Rating = 0x72746e67,
114 RecordLabel = 0xA96c6162,
115 Title = 0xA96e616d,
116 TrackPosition = 0x74726b6e,
117 TvEpisode = 0x74766573,
118 TvEpisodeName = 0x7476656e,
119 TvNetworkName = 0x74766e6e,
120 TvSeason = 0x7476736e,
121 TvShowName = 0x74767368,
122 Year = 0xA9646179,
123 Conductor = 0x40636F6E,
124 Director = 0x40646972,
125 Narrator = 0xA96E7274,
126 Publisher = 0xA9707562,
127 SortWith = 0x736F6E6D,
128 Compilation = 0x6370696C,
129 SoundEngineer = 0xA9736E65,
130 ExecutiveProducer = 0xA9787064,
131 ArtDirector = 0xA9617264,
132 Arranger = 0xA9617267,
133 Author = 0xA9617574,
134 OriginalArtist = 0xA96F7065,
135 Year2 = 0x79727263,
136};
137}
138
139namespace Mp4TagExtendedMeanIds {
140extern std::string_view iTunes;
141}
142
143namespace Mp4TagExtendedNameIds {
144extern std::string_view cdec;
145extern std::string_view label;
146} // namespace Mp4TagExtendedNameIds
147
148namespace Mp4MediaTypeIds {
149enum KnownValue : std::uint32_t {
150 Sound = 0x736f756e,
151 Video = 0x76696465,
152 Hint = 0x68696e74,
153 Meta = 0x6d657461,
154};
155}
156
157namespace FourccIds {
158enum KnownValue : std::uint32_t {
159 Ac3 = 0x61632d33,
160 Ac4 = 0x61632d34,
161 AdpcmAcm = 0x6D730002,
162 Agsm = 0x6167736D,
163 Alac = 0x616C6163,
164 Alaw = 0x616C6177,
165 Alaw21 = 0x616C6177,
166 AlphaCompositor = 0x626C6E64,
167 AlphaGain = 0x6761696E,
168 Amr = 0x73617762,
169 AmrNarrowband = 0x73616D72,
170 Animation = 0x726C6520,
171 Appl1 = 0x6476690,
172 Appl2 = 0x6C70630,
173 Apple16BitGray = 0x62313667,
175 Apple48BitRgb = 0x62343872,
176 Apple64BitArgb1 = 0x62363461,
177 Apple64BitArgb2 = 0x62617365,
178 Apple64BitArgb3 = 0x626C6974,
179 AppleAnimation = 0x726C6520,
180 AppleAvrJpeg = 0x61767220,
181 AppleBmp = 0x57524C45,
182 AppleCinepak = 0x63766964,
183 AppleCmyk = 0x636D796B,
185 AppleCurve = 0x70617468,
186 AppleDvc = 0x64766320,
187 AppleDvcpro = 0x64767070,
188 AppleDvcpro501 = 0x6476356E,
189 AppleDvcpro502 = 0x64763570,
190 AppleDvcpro50Ntsc = 0x6476356E,
191 AppleDvcpro50Pal = 0x64763570,
192 AppleDvcproPal = 0x64767070,
193 AppleDvDvcproNtsc = 0x6476630,
194 AppleDvp = 0x64766370,
195 AppleDvPal = 0x64766370,
196 AppleFlc = 0x666C6963,
197 AppleGif = 0x67696620,
198 AppleGraphics = 0x736D630,
199 AppleGsm101 = 0x6167736D,
200 AppleH261 = 0x68323631,
202 AppleLossless = 0x616C6163,
203 AppleMacpaint = 0x504E5447,
204 AppleMicrosoftVideo1 = 0x6D737663,
205 AppleMotionJpegA = 0x6D6A7061,
206 AppleMotionJpegB = 0x6D6A7062,
207 AppleMpeg4Compressor = 0x6D703476,
209 AppleOpendmlJpeg = 0x646D6231,
210 ApplePhotoCd = 0x6B706364,
211 ApplePhotoJpeg = 0x6A706567,
212 ApplePixletVideo = 0x70786C74,
213 ApplePlanarRgb = 0x38425053,
214 ApplePng = 0x706E670,
215 AppleQuickdraw = 0x71647277,
216 AppleR408 = 0x72343038,
217 AppleScalingCodec = 0x7363616C,
218 AppleSgi = 0x2E534749,
220 AppleTextAtsuiCodec = 0x74657874,
221 AppleTga = 0x7467610,
222 AppleTiff = 0x74696666,
223 AppleV408 = 0x76343038,
224 AppleVcH263 = 0x68323633,
225 AppleVideo = 0x72707A61,
226 AppleYuv420Codec1 = 0x6A343230,
227 AppleYuv420Codec2 = 0x6D797576,
228 AppleYuv420Codec3 = 0x79343230,
229 AppleYuv422Codec2Vuy = 0x32767579,
230 AppleYuv422Codec4 = 0x79757678,
231 AppleYuv422CodecYuvs = 0x79757673,
232 AppleYuv422CodecYuvu = 0x79757675,
233 Avc0Media = 0x64726D69,
234 Avc1 = 0x61766331,
235 Avc2 = 0x61766332,
236 Avc3 = 0x61766333,
237 Avc4 = 0x61766334,
238 Av1_IVF = 0x41563031,
239 Av1_ISOBMFF = 0x61763031,
240 Blur = 0x626C7572,
241 Bps8 = 0x38627073,
243 ChannelCompositor = 0x6368616E,
244 ChromaKey = 0x636B6579,
245 Cinepak = 0x63766964,
246 Cloud = 0x636C6F75,
247 ColorStyle = 0x736F6C72,
248 Colorsync = 0x73796E63,
249 ColorTint = 0x74696E74,
250 CrossFade = 0x64736C76,
251 Cvid = 0x63766964,
252 Divx3Decoder1 = 0x41503431,
253 Divx3Decoder2 = 0x434F4C30,
254 Divx3Decoder3 = 0x434F4C31,
255 Divx3Decoder4 = 0x44495633,
256 Divx3Decoder5 = 0x44495634,
257 Divx3Decoder6 = 0x44495635,
258 Divx3Decoder7 = 0x44495636,
259 Divx3Decoder8 = 0x4D504733,
260 Divx3Decoder9 = 0x6D706733,
261 Divx3Decoder10 = 0x636F6C30,
262 Divx3Decoder11 = 0x636F6C31,
263 Divx3Decoder12 = 0x64697633,
264 Divx3Decoder13 = 0x64697634,
265 Divx3Decoder14 = 0x64697635,
266 Divx3Decoder15 = 0x64697636,
267 Divx4Decoder1 = 0x44495658,
268 Divx4Decoder2 = 0x64697678,
269 Divx5Decoder = 0x44583530,
270 Drms = 0x64726D73,
271 Drmi = 0x64726D69,
272 Dts = 0x6474736C,
273 DtsH = 0x64747368,
274 DtsE = 0x64747365,
275 Dvca = 0x64766361,
276 DvcPro501 = 0x64763570,
277 DvcPro502 = 0x6476356E,
278 DvcProPal = 0x64767070,
279 EAc3 = 0x65632D33,
280 EdgeDetection = 0x65646765,
281 Emboss = 0x656D6273,
282 Explode = 0x78706C6F,
283 FilmNoise = 0x666D6E73,
284 Fire = 0x66697265,
285 Flac = 0x664C6143,
286 FlashPixImage = 0x66706978,
288 FloatingPoint32Bit = 0x666C3332,
289 FloatingPoint64Bit = 0x666C3634,
290 GeneralConvolution = 0x67656E6B,
291 Gif = 0x67696620,
292 Glass = 0x676C6173,
293 GradientWipe = 0x6D617474,
294 Graphics = 0x736D6320,
295 H263Quicktime = 0x68323633,
296 H2633GPP = 0x73323633,
297 H264Decoder1 = 0x44415643,
298 H264Decoder2 = 0x48323634,
299 H264Decoder3 = 0x56535348,
300 H264Decoder4 = 0x58323634,
301 H264Decoder5 = 0x68323634,
302 H264Decoder6 = 0x78323634,
303 Hdv3 = 0x68647633,
304 Hevc1 = 0x68766331,
305 Hevc2 = 0x68657631,
306 HslBalance = 0x68736C62,
307 Ima4 = 0x696D6134,
308 Ima41 = 0x696D6134,
309 ImaadpcmAcm = 0x6D730011,
310 Implode = 0x6D706C6F,
311 Int16Be = 0x74776F73,
312 Int16Le = 0x736F7774,
313 Int24 = 0x696E3234,
314 Int32 = 0x696E3332,
315 Iris = 0x736D7032,
316 IvxDecoder1 = 0x33495632,
317 IvxDecoder2 = 0x33495644,
318 IvxDecoder3 = 0x33697632,
319 IvxDecoder4 = 0x33697664,
320 Jpeg = 0x6a706567,
321 Jpeg2000Decoder = 0x6D6A7032,
322 Law21 = 0x756C6177,
323 LensFlare = 0x6C656E73,
324 Lle = 0x726C6520,
325 Mac3 = 0x6D616333,
326 Mac6 = 0x6D616336,
327 Mace31 = 0x4D414333,
328 Mace61 = 0x4D414336,
329 MatrixWipe = 0x736D7034,
330 DolbyMpl = 0x6D6C7061,
331 MotionJpegA = 0x6D6A7061,
332 MotionJpegB = 0x6D6A7062,
333 Mp3 = 0x2e6d7033,
334 Mp3CbrOnly = 0x6D730055,
335 Mpeg = 0x4D504547,
336 Mpeg2Imx30 = 0x6D78336E,
337 Mpeg2Imx50 = 0x6D783570,
338 Mpeg4Audio = 0x6d703461,
339 Mpeg4Decoder1 = 0x464D5034,
340 Mpeg4Decoder2 = 0x53454447,
341 Mpeg4Decoder3 = 0x57563146,
342 Mpeg4Sample = 0x6d703473,
343 Mpeg4TimedText = 0x74783367,
344 Mpeg4Video = 0x6d703476,
345 MsMpeg4V1Decoder1 = 0x44495631,
346 MsMpeg4V1Decoder2 = 0x64697631,
347 MsMpeg4V1Decoder3 = 0x4D504734,
348 MsMpeg4V1Decoder4 = 0x6D706734,
349 MsMpeg4V1Decoder5 = 0x4D504731,
350 MsMpeg4V1Decoder6 = 0x6D706731,
351 MsMpeg4V2Decoder1 = 0x44495632,
352 MsMpeg4V2Decoder2 = 0x64697632,
353 MsMpeg4V2Decoder3 = 0x4D503432,
354 MsMpeg4V2Decoder4 = 0x6D703432,
355 MsMpeg4V3Decoder1 = 0x4D503433,
356 MsMpeg4V3Decoder2 = 0x6D703433,
357 NtscDv25Video = 0x64766320,
358 Oggs = 0x4F676753,
359 Opus = 0x4F707573,
360 PalDv25Video = 0x64766370,
361 PdfImage = 0x70646620,
362 Png = 0x706E6720,
363 Push = 0x70757368,
364 Qclp = 0x51636C70,
365 QdesignMusic1Decoder = 0x51444D43,
366 QdesignMusic2 = 0x51444D32,
367 Qdmc = 0x51444D43,
368 Qdrw = 0x71647277,
369 QtvrCubicCodec = 0x63757061,
370 QtvrCylindricalCodec = 0x6C747061,
371 QualcommPurevoice = 0x51636C70,
372 QualcommQcelp = 0x51636C71,
373 Radial = 0x736D7033,
374 Raw = 0x72617720,
375 RgbBalance = 0x72676262,
376 Ripple = 0x7269706C,
377 Rpza = 0x72707A61,
378 Rv20 = 0x52563230,
379 Rv30 = 0x52563330,
380 Rv40 = 0x52563430,
381 Sharpen = 0x73687270,
382 Slide = 0x736C6964,
383 Smc = 0x736D6320,
384 SorensonH263Decoder = 0x464C5631,
387 Sowt = 0x736F7774,
389 Svq1 = 0x73767131,
390 Svq3 = 0x73767133,
391 Tiff = 0x74696666,
392 TravelingMatte = 0x74726176,
395 Twos = 0x74776F73,
396 Ulaw = 0x756C6177,
397 Ulaw21 = 0x756C6177,
398 VcmImageCodec = 0x4D6A7067,
399 Vdva = 0x76647661,
400 Vp8 = 0x56503830,
401 Vp9 = 0x56503930,
402 Vp9_2 = 0x76703039,
403 WavPack = 0x5756504B,
404 WindowsMediaAudio = 0x6F776D61,
405 WindowsMediaAudio7 = 0x574D4131,
408 WindowsMediaVideoV17 = 0x574D5637,
409 WindowsMediaVideoV2 = 0x574D5632,
410 WindowsMediaVideoV8 = 0x574D5638,
411 Wipe = 0x736D7074,
412 WmvImageCodec1 = 0x4D347332,
413 WmvImageCodec2 = 0x4D703432,
414 WmvImageCodec3 = 0x4D703433,
415 WmvImageCodec4 = 0x4D703453,
416 WmvImageCodec5 = 0x574D5631,
417 WmvImageCodec6 = 0x574D5632,
418 WmvImageCodec7 = 0x574D5633,
419 XvidDecoder1 = 0x424C5A30,
420 XvidDecoder2 = 0x58564944,
421 XvidDecoder3 = 0x58564958,
422 XvidDecoder4 = 0x58766944,
423 XvidDecoder5 = 0x78766964,
429 Zoom = 0x7A6F6F6D,
430};
431
433
434} // namespace FourccIds
435
436namespace Mp4FormatExtensionIds {
437enum KnownValue : std::uint32_t {
439 = 0x67616D61,
440 FieldHandling = 0x6669656C,
442 DefaultHuffmanTable = 0x6D6A6874,
444 = 0x65736473,
447 = 0x61766343,
448 PixelAspectRatio = 0x70617370,
449 ColorParameters = 0x636F6C72,
450 CleanAperature = 0x636C6170,
451};
452}
453
506
507namespace Mpeg4ElementaryStreamTypeIds {
523
524TAG_PARSER_EXPORT std::string_view streamTypeName(std::uint8_t streamTypeId);
525
526} // namespace Mpeg4ElementaryStreamTypeIds
527
574
624
625extern std::uint32_t mpeg4SamplingFrequencyTable[13];
626
643
667
668namespace Mpeg2VideoCodes {
669enum KnownValue : std::uint8_t { Pic = 0x00, Seq = 0xB3, Ext = 0xB5, Gop = 0xB8 };
670}
671
675enum class Mp4TagMediaType : std::uint8_t {
676 Movie = 0,
677 Music = 1,
678 Audiobook = 2,
679 MusicVideo = 6,
680 Movie2 = 9,
681 TvShow = 10,
682 Booklet = 11,
683 Ringtone = 14
684};
685
689enum class Mp4TagContentRating : std::uint8_t {
690 None = 0,
691 Clean = 2,
692 Explicit = 4
693};
694
698enum class AccountType : std::uint8_t { Itunes = 0, Aol = 1, Undefined = 255 };
699
703enum class CountryCode {
704 Usa = 143441,
705 Fra = 143442,
706 Deu = 143443,
707 Gbr = 143444,
708 Aut = 143445,
709 Bel = 143446,
710 Fin = 143447,
711 Grc = 143448,
712 Irl = 143449,
713 Ita = 143450,
714 Lux = 143451,
715 Nld = 143452,
716 Prt = 143453,
717 Esp = 143454,
718 Can = 143455,
719 Swe = 143456,
720 Nor = 143457,
721 Dnk = 143458,
722 Che = 143459,
723 Aus = 143460,
724 Nzl = 143461,
725 Jpn = 143462,
726 Undefined = 0
727};
728
729} // namespace TagParser
730
731#endif // TAG_PARSER_MP4IDS_H
The MediaFormat class specifies the format of media data.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:13
@ Yuv422HardwareAccelerationCodecYuvs5
Definition mp4ids.h:428
@ WindowsMediaAudio9Professional
Definition mp4ids.h:406
@ Yuv422HardwareAccelerationCodecYuvs1
Definition mp4ids.h:424
@ Yuv422HardwareAccelerationCodecYuvs3
Definition mp4ids.h:426
@ Yuv422HardwareAccelerationCodecYuvs4
Definition mp4ids.h:427
@ Yuv422HardwareAccelerationCodecYuvs2
Definition mp4ids.h:425
TAG_PARSER_EXPORT MediaFormat fourccToMediaFormat(std::uint32_t fourccId)
Definition mp4ids.cpp:48
@ ProgressiveDownloadInformation
Definition mp4ids.h:52
@ IndependentAndDisposableSamples
Definition mp4ids.h:54
TAG_PARSER_EXPORT MediaFormat idToMediaFormat(std::uint8_t mpeg4AudioObjectId, bool sbrPresent=false, bool psPresent=false)
Definition mp4ids.cpp:368
TAG_PARSER_EXPORT std::string_view channelConfigString(std::uint8_t config)
Returns the string representation for the specified MPEG-4 channel config.
Definition mp4ids.cpp:434
@ FrontCenterFrontLeftFrontRightBackLeftBackRightLFEChannel
Definition mp4ids.h:635
@ FrontCenterFrontLeftFrontRightSideLeftSideRightBackLeftBackRightLFEChannel
Definition mp4ids.h:636
TAG_PARSER_EXPORT std::uint8_t channelCount(std::uint8_t config)
Returns the channel count for the specified MPEG-4 channel config.
Definition mp4ids.cpp:461
TAG_PARSER_EXPORT MediaFormat streamObjectTypeFormat(std::uint8_t streamObjectTypeId)
Returns the TagParser::MediaFormat denoted by the specified MPEG-4 stream ID.
Definition mp4ids.cpp:216
TAG_PARSER_EXPORT std::string_view streamTypeName(std::uint8_t streamTypeId)
Returns the name of the stream type denoted by the specified MPEG-4 stream type ID.
Definition mp4ids.cpp:326
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
AccountType
Specifies the account type.
Definition mp4ids.h:698
Mp4TagContentRating
Specifies the tag content rating.
Definition mp4ids.h:689
CountryCode
Specifies the country.
Definition mp4ids.h:703
Mp4TagMediaType
Specifies the tag type.
Definition mp4ids.h:675
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
Definition mediaformat.h:14
std::uint32_t mpeg4SamplingFrequencyTable[13]
Definition mp4ids.cpp:424
The Av1Configuration struct provides a parser for AV1 configuration found in ISOBMFF files.
The AvcConfiguration struct provides a parser for AVC configuration.