Image-ExifTool

 view release on metacpan or  search on metacpan

lib/Image/ExifTool/QuickTime.pm  view on Meta::CPAN

        Name => 'ChromaSamplePosition',
        Mask => 0x03,
        PrintConv => {
            0 => 'Unknown',
            1 => 'Vertical',
            2 => 'Colocated',
            3 => '(reserved)',
        },
    },
    3 => {
        Name => 'InitialDelaySamples',
        RawConv => '$val & 0x10 ? undef : ($val & 0x0f) + 1',
        Unknown => 1,
    },
);

# ref https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/MPEG4Writer.cpp
%Image::ExifTool::QuickTime::ContentLightLevel = (
    PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
    GROUPS => { 2 => 'Video' },
    FIRST_ENTRY => 0,
    FORMAT => 'int16u',
    0 => 'MaxContentLightLevel',
    1 => 'MaxPicAverageLightLevel',
);

%Image::ExifTool::QuickTime::ItemRef = (
    PROCESS_PROC => \&ProcessMOV,
    WRITE_PROC => \&WriteQuickTime,
    GROUPS => { 2 => 'Image' },
    # (Note: ExifTool's ItemRefVersion may be used to test the iref version number)
    NOTES => q{
        The Item reference entries listed in the table below contain information about
        the associations between items in the file.  This information is used by
        ExifTool, but these entries are not extracted as tags.
    },
    dimg => {
        Name => 'DerivedImageRef',
        # also parse these for the ID of the primary 'tmap' item
        # (tone-mapped image in HDRGainMap HEIC by iPhone 15 and 16)
        RawConv => \&ParseContentDescribes,
        WriteHook => \&ParseContentDescribes,
    },
    thmb => { Name => 'ThumbnailRef',      RawConv => 'undef' },
    auxl => { Name => 'AuxiliaryImageRef', RawConv => 'undef' },
    cdsc => {
        Name => 'ContentDescribes',
        RawConv => \&ParseContentDescribes,
        WriteHook => \&ParseContentDescribes,
    },
);

%Image::ExifTool::QuickTime::ItemInfo = (
    PROCESS_PROC => \&ProcessMOV,
    WRITE_PROC => \&WriteQuickTime,
    GROUPS => { 2 => 'Image' },
    # avc1 - AVC image
    # hvc1 - HEVC image
    # lhv1 - L-HEVC image
    # infe - ItemInformationEntry
    # infe types: avc1,hvc1,lhv1,Exif,xml1,iovl(overlay image),grid,mime,tmap,hvt1(tile image)
    # ('tmap' has something to do with the new gainmap written by iPhone 15 and 16)
    infe => {
        Name => 'ItemInfoEntry',
        RawConv => \&ParseItemInfoEntry,
        WriteHook => \&ParseItemInfoEntry,
        Notes => 'parsed, but not extracted as a tag',
    },
);

# track reference atoms
%Image::ExifTool::QuickTime::TrackRef = (
    PROCESS_PROC => \&ProcessMOV,
    GROUPS => { 1 => 'Track#', 2 => 'Video' },
    chap => { Name => 'ChapterListTrackID',     Format => 'int32u' },
    tmcd => { Name => 'TimecodeTrack',          Format => 'int32u' },
    mpod => { #PH (FLIR MP4)
        Name => 'ElementaryStreamTrack',
        Format => 'int32u',
        ValueConv => '$val =~ s/^1 //; $val',  # (why 2 numbers? -- ignore the first if "1")
    },
    # also: iTunesInfo
    cdsc => {
        Name => 'ContentDescribes',
        Format => 'int32u',
        PrintConv => '"Track $val"',
    },
    clcp => { Name => 'ClosedCaptionTrack',     Format => 'int32u' }, #29
    fall => { Name => 'AlternateFormatTrack',   Format => 'int32u' }, #29
    folw => { Name => 'SubtitleTrack',          Format => 'int32u' }, #29
    forc => { Name => 'ForcedSubtitleTrack',    Format => 'int32u' }, #29
    scpt => { Name => 'TranscriptTrack',        Format => 'int32u' }, #29
    ssrc => { Name => 'Non-primarySourceTrack', Format => 'int32u' }, #29
    sync => { Name => 'SyncronizedTrack',       Format => 'int32u' }, #29
    # hint - Original media for hint track (ref 29)
    # cdep (Structural Dependency QT tag?)
);

# track aperture mode dimensions atoms
# (ref https://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap2/qtff2.html)
%Image::ExifTool::QuickTime::TrackAperture = (
    PROCESS_PROC => \&ProcessMOV,
    GROUPS => { 1 => 'Track#', 2 => 'Video' },
    clef => {
        Name => 'CleanApertureDimensions',
        Format => 'fixed32u',
        Count => 3,
        ValueConv => '$val =~ s/^.*? //; $val', # remove flags word
        PrintConv => '$val =~ tr/ /x/; $val',
    },
    prof => {
        Name => 'ProductionApertureDimensions',
        Format => 'fixed32u',
        Count => 3,
        ValueConv => '$val =~ s/^.*? //; $val',
        PrintConv => '$val =~ tr/ /x/; $val',
    },
    enof => {
        Name => 'EncodedPixelsDimensions',
        Format => 'fixed32u',
        Count => 3,



( run in 0.671 second using v1.01-cache-2.11-cpan-437f7b0c052 )