Tag Parser 12.3.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 EncodedBy = 0xA9656E63,
99 EpisodeGlobalUniqueId = 0x65676964,
100 Extended = 0x2d2d2d2d,
101 GaplessPlayback = 0x70676170,
102 Genre = 0xA967656e,
103 Grouping = 0xA9677270,
104 Keywords = 0x6b657977,
105 Lyricist = 0xA9737766,
106 Lyrics = 0xA96c7972,
107 MediaType = 0x7374696B,
108 Performers = 0xA9707266,
109 Podcast = 0x70637374,
110 PodcastUrl = 0x7075726c,
111 PreDefinedGenre = 0x676e7265,
112 Producer = 0xA9707264,
113 PurchaseDate = 0x70757264,
114 Rating = 0x72746e67,
115 RecordLabel = 0xA96c6162,
116 Title = 0xA96e616d,
117 TrackPosition = 0x74726b6e,
118 TvEpisode = 0x74766573,
119 TvEpisodeName = 0x7476656e,
120 TvNetworkName = 0x74766e6e,
121 TvSeason = 0x7476736e,
122 TvShowName = 0x74767368,
123 Year = 0xA9646179,
124 Conductor = 0x40636F6E,
125 Director = 0x40646972,
126 Narrator = 0xA96E7274,
127 Publisher = 0xA9707562,
128 SortWith = 0x736F6E6D,
129 Compilation = 0x6370696C,
130 SoundEngineer = 0xA9736E65,
131 ExecutiveProducer = 0xA9787064,
132 ArtDirector = 0xA9617264,
133 Arranger = 0xA9617267,
134 Author = 0xA9617574,
135 OriginalArtist = 0xA96F7065,
136 Year2 = 0x79727263,
137 StoreDescription = 0x73646573,
138};
139}
140
141namespace Mp4TagExtendedMeanIds {
142extern std::string_view iTunes;
143}
144
145namespace Mp4TagExtendedNameIds {
146extern std::string_view cdec;
147extern std::string_view label;
148} // namespace Mp4TagExtendedNameIds
149
150namespace Mp4MediaTypeIds {
151enum KnownValue : std::uint32_t {
152 Sound = 0x736f756e,
153 Video = 0x76696465,
154 Hint = 0x68696e74,
155 Meta = 0x6d657461,
156};
157}
158
159namespace FourccIds {
160enum KnownValue : std::uint32_t {
161 Ac3 = 0x61632d33,
162 Ac4 = 0x61632d34,
163 AdpcmAcm = 0x6D730002,
164 Agsm = 0x6167736D,
165 Alac = 0x616C6163,
166 Alaw = 0x616C6177,
167 Alaw21 = 0x616C6177,
168 AlphaCompositor = 0x626C6E64,
169 AlphaGain = 0x6761696E,
170 Amr = 0x73617762,
171 AmrNarrowband = 0x73616D72,
172 Animation = 0x726C6520,
173 Appl1 = 0x6476690,
174 Appl2 = 0x6C70630,
175 Apple16BitGray = 0x62313667,
177 Apple48BitRgb = 0x62343872,
178 Apple64BitArgb1 = 0x62363461,
179 Apple64BitArgb2 = 0x62617365,
180 Apple64BitArgb3 = 0x626C6974,
181 AppleAnimation = 0x726C6520,
182 AppleAvrJpeg = 0x61767220,
183 AppleBmp = 0x57524C45,
184 AppleCinepak = 0x63766964,
185 AppleCmyk = 0x636D796B,
187 AppleCurve = 0x70617468,
188 AppleDvc = 0x64766320,
189 AppleDvcpro = 0x64767070,
190 AppleDvcpro501 = 0x6476356E,
191 AppleDvcpro502 = 0x64763570,
192 AppleDvcpro50Ntsc = 0x6476356E,
193 AppleDvcpro50Pal = 0x64763570,
194 AppleDvcproPal = 0x64767070,
195 AppleDvDvcproNtsc = 0x6476630,
196 AppleDvp = 0x64766370,
197 AppleDvPal = 0x64766370,
198 AppleFlc = 0x666C6963,
199 AppleGif = 0x67696620,
200 AppleGraphics = 0x736D630,
201 AppleGsm101 = 0x6167736D,
202 AppleH261 = 0x68323631,
204 AppleLossless = 0x616C6163,
205 AppleMacpaint = 0x504E5447,
206 AppleMicrosoftVideo1 = 0x6D737663,
207 AppleMotionJpegA = 0x6D6A7061,
208 AppleMotionJpegB = 0x6D6A7062,
209 AppleMpeg4Compressor = 0x6D703476,
211 AppleOpendmlJpeg = 0x646D6231,
212 ApplePhotoCd = 0x6B706364,
213 ApplePhotoJpeg = 0x6A706567,
214 ApplePixletVideo = 0x70786C74,
215 ApplePlanarRgb = 0x38425053,
216 ApplePng = 0x706E670,
217 AppleQuickdraw = 0x71647277,
218 AppleR408 = 0x72343038,
219 AppleScalingCodec = 0x7363616C,
220 AppleSgi = 0x2E534749,
222 AppleTextAtsuiCodec = 0x74657874,
223 AppleTga = 0x7467610,
224 AppleTiff = 0x74696666,
225 AppleV408 = 0x76343038,
226 AppleVcH263 = 0x68323633,
227 AppleVideo = 0x72707A61,
228 AppleYuv420Codec1 = 0x6A343230,
229 AppleYuv420Codec2 = 0x6D797576,
230 AppleYuv420Codec3 = 0x79343230,
231 AppleYuv422Codec2Vuy = 0x32767579,
232 AppleYuv422Codec4 = 0x79757678,
233 AppleYuv422CodecYuvs = 0x79757673,
234 AppleYuv422CodecYuvu = 0x79757675,
235 Avc0Media = 0x64726D69,
236 Avc1 = 0x61766331,
237 Avc2 = 0x61766332,
238 Avc3 = 0x61766333,
239 Avc4 = 0x61766334,
240 Av1_IVF = 0x41563031,
241 Av1_ISOBMFF = 0x61763031,
242 Blur = 0x626C7572,
243 Bps8 = 0x38627073,
245 ChannelCompositor = 0x6368616E,
246 ChromaKey = 0x636B6579,
247 Cinepak = 0x63766964,
248 Cloud = 0x636C6F75,
249 ColorStyle = 0x736F6C72,
250 Colorsync = 0x73796E63,
251 ColorTint = 0x74696E74,
252 CrossFade = 0x64736C76,
253 Cvid = 0x63766964,
254 Divx3Decoder1 = 0x41503431,
255 Divx3Decoder2 = 0x434F4C30,
256 Divx3Decoder3 = 0x434F4C31,
257 Divx3Decoder4 = 0x44495633,
258 Divx3Decoder5 = 0x44495634,
259 Divx3Decoder6 = 0x44495635,
260 Divx3Decoder7 = 0x44495636,
261 Divx3Decoder8 = 0x4D504733,
262 Divx3Decoder9 = 0x6D706733,
263 Divx3Decoder10 = 0x636F6C30,
264 Divx3Decoder11 = 0x636F6C31,
265 Divx3Decoder12 = 0x64697633,
266 Divx3Decoder13 = 0x64697634,
267 Divx3Decoder14 = 0x64697635,
268 Divx3Decoder15 = 0x64697636,
269 Divx4Decoder1 = 0x44495658,
270 Divx4Decoder2 = 0x64697678,
271 Divx5Decoder = 0x44583530,
272 Drms = 0x64726D73,
273 Drmi = 0x64726D69,
274 Dts = 0x6474736C,
275 DtsH = 0x64747368,
276 DtsE = 0x64747365,
277 Dvca = 0x64766361,
278 DvcPro501 = 0x64763570,
279 DvcPro502 = 0x6476356E,
280 DvcProPal = 0x64767070,
281 EAc3 = 0x65632D33,
282 EdgeDetection = 0x65646765,
283 Emboss = 0x656D6273,
284 Explode = 0x78706C6F,
285 FilmNoise = 0x666D6E73,
286 Fire = 0x66697265,
287 Flac = 0x664C6143,
288 FlashPixImage = 0x66706978,
290 FloatingPoint32Bit = 0x666C3332,
291 FloatingPoint64Bit = 0x666C3634,
292 GeneralConvolution = 0x67656E6B,
293 Gif = 0x67696620,
294 Glass = 0x676C6173,
295 GradientWipe = 0x6D617474,
296 Graphics = 0x736D6320,
297 H263Quicktime = 0x68323633,
298 H2633GPP = 0x73323633,
299 H264Decoder1 = 0x44415643,
300 H264Decoder2 = 0x48323634,
301 H264Decoder3 = 0x56535348,
302 H264Decoder4 = 0x58323634,
303 H264Decoder5 = 0x68323634,
304 H264Decoder6 = 0x78323634,
305 Hdv3 = 0x68647633,
306 Hevc1 = 0x68766331,
307 Hevc2 = 0x68657631,
308 HslBalance = 0x68736C62,
309 Ima4 = 0x696D6134,
310 Ima41 = 0x696D6134,
311 ImaadpcmAcm = 0x6D730011,
312 Implode = 0x6D706C6F,
313 Int16Be = 0x74776F73,
314 Int16Le = 0x736F7774,
315 Int24 = 0x696E3234,
316 Int32 = 0x696E3332,
317 Iris = 0x736D7032,
318 IvxDecoder1 = 0x33495632,
319 IvxDecoder2 = 0x33495644,
320 IvxDecoder3 = 0x33697632,
321 IvxDecoder4 = 0x33697664,
322 Jpeg = 0x6a706567,
323 Jpeg2000Decoder = 0x6D6A7032,
324 Law21 = 0x756C6177,
325 LensFlare = 0x6C656E73,
326 Lle = 0x726C6520,
327 Mac3 = 0x6D616333,
328 Mac6 = 0x6D616336,
329 Mace31 = 0x4D414333,
330 Mace61 = 0x4D414336,
331 MatrixWipe = 0x736D7034,
332 DolbyMpl = 0x6D6C7061,
333 MotionJpegA = 0x6D6A7061,
334 MotionJpegB = 0x6D6A7062,
335 Mp3 = 0x2e6d7033,
336 Mp3CbrOnly = 0x6D730055,
337 Mpeg = 0x4D504547,
338 Mpeg2Imx30 = 0x6D78336E,
339 Mpeg2Imx50 = 0x6D783570,
340 Mpeg4Audio = 0x6d703461,
341 Mpeg4Decoder1 = 0x464D5034,
342 Mpeg4Decoder2 = 0x53454447,
343 Mpeg4Decoder3 = 0x57563146,
344 Mpeg4Sample = 0x6d703473,
345 Mpeg4TimedText = 0x74783367,
346 Mpeg4Video = 0x6d703476,
347 MsMpeg4V1Decoder1 = 0x44495631,
348 MsMpeg4V1Decoder2 = 0x64697631,
349 MsMpeg4V1Decoder3 = 0x4D504734,
350 MsMpeg4V1Decoder4 = 0x6D706734,
351 MsMpeg4V1Decoder5 = 0x4D504731,
352 MsMpeg4V1Decoder6 = 0x6D706731,
353 MsMpeg4V2Decoder1 = 0x44495632,
354 MsMpeg4V2Decoder2 = 0x64697632,
355 MsMpeg4V2Decoder3 = 0x4D503432,
356 MsMpeg4V2Decoder4 = 0x6D703432,
357 MsMpeg4V3Decoder1 = 0x4D503433,
358 MsMpeg4V3Decoder2 = 0x6D703433,
359 NtscDv25Video = 0x64766320,
360 Oggs = 0x4F676753,
361 Opus = 0x4F707573,
362 PalDv25Video = 0x64766370,
363 PdfImage = 0x70646620,
364 Png = 0x706E6720,
365 Push = 0x70757368,
366 Qclp = 0x51636C70,
367 QdesignMusic1Decoder = 0x51444D43,
368 QdesignMusic2 = 0x51444D32,
369 Qdmc = 0x51444D43,
370 Qdrw = 0x71647277,
371 QtvrCubicCodec = 0x63757061,
372 QtvrCylindricalCodec = 0x6C747061,
373 QualcommPurevoice = 0x51636C70,
374 QualcommQcelp = 0x51636C71,
375 Radial = 0x736D7033,
376 Raw = 0x72617720,
377 RgbBalance = 0x72676262,
378 Ripple = 0x7269706C,
379 Rpza = 0x72707A61,
380 Rv20 = 0x52563230,
381 Rv30 = 0x52563330,
382 Rv40 = 0x52563430,
383 Sharpen = 0x73687270,
384 Slide = 0x736C6964,
385 Smc = 0x736D6320,
386 SorensonH263Decoder = 0x464C5631,
389 Sowt = 0x736F7774,
391 Svq1 = 0x73767131,
392 Svq3 = 0x73767133,
393 Tiff = 0x74696666,
394 TravelingMatte = 0x74726176,
397 Twos = 0x74776F73,
398 Ulaw = 0x756C6177,
399 Ulaw21 = 0x756C6177,
400 VcmImageCodec = 0x4D6A7067,
401 Vdva = 0x76647661,
402 Vp8 = 0x56503830,
403 Vp9 = 0x56503930,
404 Vp9_2 = 0x76703039,
405 WavPack = 0x5756504B,
406 WindowsMediaAudio = 0x6F776D61,
407 WindowsMediaAudio7 = 0x574D4131,
410 WindowsMediaVideoV17 = 0x574D5637,
411 WindowsMediaVideoV2 = 0x574D5632,
412 WindowsMediaVideoV8 = 0x574D5638,
413 Wipe = 0x736D7074,
414 WmvImageCodec1 = 0x4D347332,
415 WmvImageCodec2 = 0x4D703432,
416 WmvImageCodec3 = 0x4D703433,
417 WmvImageCodec4 = 0x4D703453,
418 WmvImageCodec5 = 0x574D5631,
419 WmvImageCodec6 = 0x574D5632,
420 WmvImageCodec7 = 0x574D5633,
421 XvidDecoder1 = 0x424C5A30,
422 XvidDecoder2 = 0x58564944,
423 XvidDecoder3 = 0x58564958,
424 XvidDecoder4 = 0x58766944,
425 XvidDecoder5 = 0x78766964,
431 Zoom = 0x7A6F6F6D,
432};
433
435
436} // namespace FourccIds
437
438namespace Mp4FormatExtensionIds {
439enum KnownValue : std::uint32_t {
441 = 0x67616D61,
442 FieldHandling = 0x6669656C,
444 DefaultHuffmanTable = 0x6D6A6874,
446 = 0x65736473,
449 = 0x61766343,
450 PixelAspectRatio = 0x70617370,
451 ColorParameters = 0x636F6C72,
452 CleanAperature = 0x636C6170,
453};
454}
455
508
509namespace Mpeg4ElementaryStreamTypeIds {
525
526TAG_PARSER_EXPORT std::string_view streamTypeName(std::uint8_t streamTypeId);
527
528} // namespace Mpeg4ElementaryStreamTypeIds
529
576
626
627extern std::uint32_t mpeg4SamplingFrequencyTable[13];
628
645
669
670namespace Mpeg2VideoCodes {
671enum KnownValue : std::uint8_t { Pic = 0x00, Seq = 0xB3, Ext = 0xB5, Gop = 0xB8 };
672}
673
677enum class Mp4TagMediaType : std::uint8_t {
678 Movie = 0,
679 Music = 1,
680 Audiobook = 2,
681 MusicVideo = 6,
682 Movie2 = 9,
683 TvShow = 10,
684 Booklet = 11,
685 Ringtone = 14
686};
687
691enum class Mp4TagContentRating : std::uint8_t {
692 None = 0,
693 Clean = 2,
694 Explicit = 4
695};
696
700enum class AccountType : std::uint8_t { Itunes = 0, Aol = 1, Undefined = 255 };
701
705enum class CountryCode {
706 Usa = 143441,
707 Fra = 143442,
708 Deu = 143443,
709 Gbr = 143444,
710 Aut = 143445,
711 Bel = 143446,
712 Fin = 143447,
713 Grc = 143448,
714 Irl = 143449,
715 Ita = 143450,
716 Lux = 143451,
717 Nld = 143452,
718 Prt = 143453,
719 Esp = 143454,
720 Can = 143455,
721 Swe = 143456,
722 Nor = 143457,
723 Dnk = 143458,
724 Che = 143459,
725 Aus = 143460,
726 Nzl = 143461,
727 Jpn = 143462,
728 Undefined = 0
729};
730
731} // namespace TagParser
732
733#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:14
@ Yuv422HardwareAccelerationCodecYuvs5
Definition mp4ids.h:430
@ WindowsMediaAudio9Professional
Definition mp4ids.h:408
@ Yuv422HardwareAccelerationCodecYuvs1
Definition mp4ids.h:426
@ Yuv422HardwareAccelerationCodecYuvs3
Definition mp4ids.h:428
@ Yuv422HardwareAccelerationCodecYuvs4
Definition mp4ids.h:429
@ Yuv422HardwareAccelerationCodecYuvs2
Definition mp4ids.h:427
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:637
@ FrontCenterFrontLeftFrontRightSideLeftSideRightBackLeftBackRightLFEChannel
Definition mp4ids.h:638
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:700
Mp4TagContentRating
Specifies the tag content rating.
Definition mp4ids.h:691
CountryCode
Specifies the country.
Definition mp4ids.h:705
Mp4TagMediaType
Specifies the tag type.
Definition mp4ids.h:677
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.