Tag Parser 12.3.1
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 Vvc1 = 0x76766331,
309 HslBalance = 0x68736C62,
310 Ima4 = 0x696D6134,
311 Ima41 = 0x696D6134,
312 ImaadpcmAcm = 0x6D730011,
313 Implode = 0x6D706C6F,
314 Int16Be = 0x74776F73,
315 Int16Le = 0x736F7774,
316 Int24 = 0x696E3234,
317 Int32 = 0x696E3332,
318 Iris = 0x736D7032,
319 IvxDecoder1 = 0x33495632,
320 IvxDecoder2 = 0x33495644,
321 IvxDecoder3 = 0x33697632,
322 IvxDecoder4 = 0x33697664,
323 Jpeg = 0x6a706567,
324 Jpeg2000Decoder = 0x6D6A7032,
325 Law21 = 0x756C6177,
326 LensFlare = 0x6C656E73,
327 Lle = 0x726C6520,
328 Mac3 = 0x6D616333,
329 Mac6 = 0x6D616336,
330 Mace31 = 0x4D414333,
331 Mace61 = 0x4D414336,
332 MatrixWipe = 0x736D7034,
333 DolbyMpl = 0x6D6C7061,
334 MotionJpegA = 0x6D6A7061,
335 MotionJpegB = 0x6D6A7062,
336 Mp3 = 0x2e6d7033,
337 Mp3CbrOnly = 0x6D730055,
338 Mpeg = 0x4D504547,
339 Mpeg2Imx30 = 0x6D78336E,
340 Mpeg2Imx50 = 0x6D783570,
341 Mpeg4Audio = 0x6d703461,
342 Mpeg4Decoder1 = 0x464D5034,
343 Mpeg4Decoder2 = 0x53454447,
344 Mpeg4Decoder3 = 0x57563146,
345 Mpeg4Sample = 0x6d703473,
346 Mpeg4TimedText = 0x74783367,
347 Mpeg4Video = 0x6d703476,
348 MsMpeg4V1Decoder1 = 0x44495631,
349 MsMpeg4V1Decoder2 = 0x64697631,
350 MsMpeg4V1Decoder3 = 0x4D504734,
351 MsMpeg4V1Decoder4 = 0x6D706734,
352 MsMpeg4V1Decoder5 = 0x4D504731,
353 MsMpeg4V1Decoder6 = 0x6D706731,
354 MsMpeg4V2Decoder1 = 0x44495632,
355 MsMpeg4V2Decoder2 = 0x64697632,
356 MsMpeg4V2Decoder3 = 0x4D503432,
357 MsMpeg4V2Decoder4 = 0x6D703432,
358 MsMpeg4V3Decoder1 = 0x4D503433,
359 MsMpeg4V3Decoder2 = 0x6D703433,
360 NtscDv25Video = 0x64766320,
361 Oggs = 0x4F676753,
362 Opus = 0x4F707573,
363 PalDv25Video = 0x64766370,
364 PdfImage = 0x70646620,
365 Png = 0x706E6720,
366 Push = 0x70757368,
367 Qclp = 0x51636C70,
368 QdesignMusic1Decoder = 0x51444D43,
369 QdesignMusic2 = 0x51444D32,
370 Qdmc = 0x51444D43,
371 Qdrw = 0x71647277,
372 QtvrCubicCodec = 0x63757061,
373 QtvrCylindricalCodec = 0x6C747061,
374 QualcommPurevoice = 0x51636C70,
375 QualcommQcelp = 0x51636C71,
376 Radial = 0x736D7033,
377 Raw = 0x72617720,
378 RgbBalance = 0x72676262,
379 Ripple = 0x7269706C,
380 Rpza = 0x72707A61,
381 Rv20 = 0x52563230,
382 Rv30 = 0x52563330,
383 Rv40 = 0x52563430,
384 Sharpen = 0x73687270,
385 Slide = 0x736C6964,
386 Smc = 0x736D6320,
387 SorensonH263Decoder = 0x464C5631,
390 Sowt = 0x736F7774,
392 Svq1 = 0x73767131,
393 Svq3 = 0x73767133,
394 Tiff = 0x74696666,
395 TravelingMatte = 0x74726176,
398 Twos = 0x74776F73,
399 Ulaw = 0x756C6177,
400 Ulaw21 = 0x756C6177,
401 VcmImageCodec = 0x4D6A7067,
402 Vdva = 0x76647661,
403 Vp8 = 0x56503830,
404 Vp9 = 0x56503930,
405 Vp9_2 = 0x76703039,
406 WavPack = 0x5756504B,
407 WindowsMediaAudio = 0x6F776D61,
408 WindowsMediaAudio7 = 0x574D4131,
411 WindowsMediaVideoV17 = 0x574D5637,
412 WindowsMediaVideoV2 = 0x574D5632,
413 WindowsMediaVideoV8 = 0x574D5638,
414 Wipe = 0x736D7074,
415 WmvImageCodec1 = 0x4D347332,
416 WmvImageCodec2 = 0x4D703432,
417 WmvImageCodec3 = 0x4D703433,
418 WmvImageCodec4 = 0x4D703453,
419 WmvImageCodec5 = 0x574D5631,
420 WmvImageCodec6 = 0x574D5632,
421 WmvImageCodec7 = 0x574D5633,
422 XvidDecoder1 = 0x424C5A30,
423 XvidDecoder2 = 0x58564944,
424 XvidDecoder3 = 0x58564958,
425 XvidDecoder4 = 0x58766944,
426 XvidDecoder5 = 0x78766964,
432 Zoom = 0x7A6F6F6D,
433};
434
436
437} // namespace FourccIds
438
439namespace Mp4FormatExtensionIds {
440enum KnownValue : std::uint32_t {
442 = 0x67616D61,
443 FieldHandling = 0x6669656C,
445 DefaultHuffmanTable = 0x6D6A6874,
447 = 0x65736473,
450 = 0x61766343,
451 PixelAspectRatio = 0x70617370,
452 ColorParameters = 0x636F6C72,
453 CleanAperature = 0x636C6170,
454};
455}
456
509
510namespace Mpeg4ElementaryStreamTypeIds {
526
527TAG_PARSER_EXPORT std::string_view streamTypeName(std::uint8_t streamTypeId);
528
529} // namespace Mpeg4ElementaryStreamTypeIds
530
577
627
628extern std::uint32_t mpeg4SamplingFrequencyTable[13];
629
646
670
671namespace Mpeg2VideoCodes {
672enum KnownValue : std::uint8_t { Pic = 0x00, Seq = 0xB3, Ext = 0xB5, Gop = 0xB8 };
673}
674
678enum class Mp4TagMediaType : std::uint8_t {
679 Movie = 0,
680 Music = 1,
681 Audiobook = 2,
682 MusicVideo = 6,
683 Movie2 = 9,
684 TvShow = 10,
685 Booklet = 11,
686 Ringtone = 14
687};
688
692enum class Mp4TagContentRating : std::uint8_t {
693 None = 0,
694 Clean = 2,
695 Explicit = 4
696};
697
701enum class AccountType : std::uint8_t { Itunes = 0, Aol = 1, Undefined = 255 };
702
706enum class CountryCode {
707 Usa = 143441,
708 Fra = 143442,
709 Deu = 143443,
710 Gbr = 143444,
711 Aut = 143445,
712 Bel = 143446,
713 Fin = 143447,
714 Grc = 143448,
715 Irl = 143449,
716 Ita = 143450,
717 Lux = 143451,
718 Nld = 143452,
719 Prt = 143453,
720 Esp = 143454,
721 Can = 143455,
722 Swe = 143456,
723 Nor = 143457,
724 Dnk = 143458,
725 Che = 143459,
726 Aus = 143460,
727 Nzl = 143461,
728 Jpn = 143462,
729 Undefined = 0
730};
731
732} // namespace TagParser
733
734#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:431
@ WindowsMediaAudio9Professional
Definition mp4ids.h:409
@ Yuv422HardwareAccelerationCodecYuvs1
Definition mp4ids.h:427
@ Yuv422HardwareAccelerationCodecYuvs3
Definition mp4ids.h:429
@ Yuv422HardwareAccelerationCodecYuvs4
Definition mp4ids.h:430
@ Yuv422HardwareAccelerationCodecYuvs2
Definition mp4ids.h:428
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:370
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:436
@ FrontCenterFrontLeftFrontRightBackLeftBackRightLFEChannel
Definition mp4ids.h:638
@ FrontCenterFrontLeftFrontRightSideLeftSideRightBackLeftBackRightLFEChannel
Definition mp4ids.h:639
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:463
TAG_PARSER_EXPORT MediaFormat streamObjectTypeFormat(std::uint8_t streamObjectTypeId)
Returns the TagParser::MediaFormat denoted by the specified MPEG-4 stream ID.
Definition mp4ids.cpp:218
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:328
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
AccountType
Specifies the account type.
Definition mp4ids.h:701
Mp4TagContentRating
Specifies the tag content rating.
Definition mp4ids.h:692
CountryCode
Specifies the country.
Definition mp4ids.h:706
Mp4TagMediaType
Specifies the tag type.
Definition mp4ids.h:678
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:426
The Av1Configuration struct provides a parser for AV1 configuration found in ISOBMFF files.
The AvcConfiguration struct provides a parser for AVC configuration.